Page MenuHomeSoftware Heritage

Rename swh.web.common module to swh.web.utils
ClosedPublic

Authored by anlambert on Aug 19 2022, 5:32 PM.

Details

Summary

This is such a better naming.

Related to T4398

Depends on D8272

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8273 (id=29877)

Could not rebase; Attempt merge onto f135b35ee5...

Updating f135b35e..1975f2b3
Fast-forward
 docs/developers-info.rst                           |  20 +-
 swh/web/add_forge_now/api_views.py                 |   4 +-
 swh/web/admin/adminurls.py                         |  35 --
 swh/web/admin/urls.py                              |  22 -
 swh/web/api/apidoc.py                              |   2 +-
 swh/web/api/apiresponse.py                         |   6 +-
 swh/web/api/apiurls.py                             |   2 +-
 swh/web/api/throttling.py                          |   2 +-
 swh/web/api/utils.py                               |   6 +-
 swh/web/api/views/content.py                       |   4 +-
 swh/web/api/views/directory.py                     |   2 +-
 swh/web/api/views/graph.py                         |   2 +-
 swh/web/api/views/identifiers.py                   |   6 +-
 swh/web/api/views/metadata.py                      |   5 +-
 swh/web/api/views/origin.py                        |   9 +-
 swh/web/api/views/raw.py                           |   5 +-
 swh/web/api/views/release.py                       |   2 +-
 swh/web/api/views/revision.py                      |   2 +-
 swh/web/api/views/snapshot.py                      |   3 +-
 swh/web/api/views/stat.py                          |   2 +-
 swh/web/api/views/utils.py                         |   2 +-
 swh/web/api/views/vault.py                         |   5 +-
 swh/web/auth/utils.py                              |   4 +-
 swh/web/auth/views.py                              |   4 +-
 swh/web/browse/browseurls.py                       |   2 +-
 swh/web/browse/identifiers.py                      |   2 +-
 swh/web/browse/snapshot_context.py                 |  30 +-
 swh/web/browse/urls.py                             |   2 +-
 swh/web/browse/utils.py                            |  11 +-
 swh/web/browse/views/content.py                    |  16 +-
 swh/web/browse/views/directory.py                  |   9 +-
 swh/web/browse/views/origin.py                     |   8 +-
 swh/web/browse/views/release.py                    |   9 +-
 swh/web/browse/views/revision.py                   |  10 +-
 swh/web/browse/views/snapshot.py                   |   4 +-
 swh/web/common/utils.py                            | 523 ---------------------
 swh/web/config.py                                  |   1 +
 swh/web/{admin => deposit}/__init__.py             |   0
 .../templates/deposit-admin.html}                  |   0
 swh/web/{admin/deposit.py => deposit/urls.py}      |  22 +-
 .../management/commands/process_inbound_email.py   |   2 +-
 swh/web/misc/badges.py                             |   7 +-
 swh/web/misc/coverage.py                           |   6 +-
 swh/web/misc/iframe.py                             |   9 +-
 swh/web/misc/metrics.py                            |   2 +-
 swh/web/misc/urls.py                               |   4 +-
 swh/web/save_code_now/models.py                    |   2 +-
 swh/web/save_code_now/origin_save.py               |  19 +-
 swh/web/settings/common.py                         |  12 +-
 swh/web/settings/development.py                    |   2 +-
 swh/web/settings/production.py                     |   2 +-
 swh/web/templates/layout.html                      |   2 +-
 swh/web/tests/add_forge_now/test_api_views.py      |   4 +-
 swh/web/tests/add_forge_now/test_app.py            |   4 +-
 swh/web/tests/add_forge_now/test_views.py          |   4 +-
 swh/web/tests/api/test_api_lookup.py               |   2 +-
 swh/web/tests/api/test_apidoc.py                   |   6 +-
 swh/web/tests/api/test_apiresponse.py              |   6 +-
 swh/web/tests/api/test_apiurls.py                  |   4 +-
 swh/web/tests/api/test_throttling.py               |   2 +-
 swh/web/tests/api/test_utils.py                    |   4 +-
 swh/web/tests/api/views/test_content.py            |   4 +-
 swh/web/tests/api/views/test_directory.py          |   4 +-
 swh/web/tests/api/views/test_graph.py              |   4 +-
 swh/web/tests/api/views/test_identifiers.py        |   6 +-
 swh/web/tests/api/views/test_metadata.py           |   4 +-
 swh/web/tests/api/views/test_origin.py             |  30 +-
 swh/web/tests/api/views/test_ping.py               |   4 +-
 swh/web/tests/api/views/test_raw.py                |   4 +-
 swh/web/tests/api/views/test_release.py            |   4 +-
 swh/web/tests/api/views/test_revision.py           |   4 +-
 swh/web/tests/api/views/test_snapshot.py           |   4 +-
 swh/web/tests/api/views/test_stat.py               |   6 +-
 swh/web/tests/api/views/test_vault.py              |   8 +-
 swh/web/tests/api/views/utils.py                   |   2 +-
 swh/web/tests/auth/test_views.py                   |   9 +-
 swh/web/tests/browse/test_snapshot_context.py      |   8 +-
 swh/web/tests/browse/test_utils.py                 |   2 +-
 swh/web/tests/browse/views/test_content.py         |  18 +-
 swh/web/tests/browse/views/test_directory.py       |   6 +-
 swh/web/tests/browse/views/test_identifiers.py     |   6 +-
 swh/web/tests/browse/views/test_origin.py          |  12 +-
 swh/web/tests/browse/views/test_release.py         |   6 +-
 swh/web/tests/browse/views/test_revision.py        |   6 +-
 swh/web/tests/browse/views/test_snapshot.py        |   4 +-
 swh/web/tests/conftest.py                          |  11 +-
 swh/web/tests/create_test_users.py                 |   2 +-
 swh/web/tests/data.py                              |   2 +-
 swh/web/tests/{admin => deposit}/__init__.py       |   0
 swh/web/tests/deposit/test_app.py                  |  32 ++
 .../test_deposit.py => deposit/test_views.py}      |   8 +-
 swh/web/tests/{utils.py => helpers.py}             |   0
 swh/web/tests/mailmap/test_app.py                  |   4 +-
 swh/web/tests/mailmap/test_mailmap.py              |   4 +-
 swh/web/tests/misc/test_badges.py                  |   7 +-
 swh/web/tests/misc/test_coverage.py                |   4 +-
 swh/web/tests/misc/test_fundraising.py             |   4 +-
 swh/web/tests/misc/test_iframe.py                  |   4 +-
 swh/web/tests/misc/test_metrics.py                 |   4 +-
 swh/web/tests/save_code_now/test_app.py            |   4 +-
 swh/web/tests/save_code_now/test_django_command.py |   2 +-
 swh/web/tests/save_code_now/test_origin_save.py    |  12 +-
 .../tests/save_code_now/test_origin_save_admin.py  |   4 +-
 .../tests/save_code_now/test_origin_save_api.py    |   6 +-
 .../tests/save_code_now/test_origin_save_views.py  |   4 +-
 swh/web/tests/test_templates.py                    |   6 +-
 swh/web/tests/{common => utils}/__init__.py        |   0
 swh/web/tests/{common => utils}/test_archive.py    |   8 +-
 swh/web/tests/{common => utils}/test_converters.py |   2 +-
 .../tests/{common => utils}/test_highlightjs.py    |   2 +-
 .../tests/{common => utils}/test_identifiers.py    |  10 +-
 .../tests/{common => utils}/test_middlewares.py    |   4 +-
 .../tests/{common => utils}/test_origin_visits.py  |  10 +-
 swh/web/tests/{common => utils}/test_query.py      |  10 +-
 .../tests/{common => utils}/test_templatetags.py   |   2 +-
 swh/web/tests/{common => utils}/test_utils.py      |  93 ++--
 swh/web/tests/views.py                             |   2 +-
 swh/web/urls.py                                    |  10 +-
 swh/web/utils/__init__.py                          | 523 +++++++++++++++++++++
 swh/web/{common => utils}/archive.py               |  14 +-
 swh/web/{common => utils}/converters.py            |   4 +-
 swh/web/{common => utils}/exc.py                   |   0
 swh/web/{common => utils}/highlightjs.py           |   2 +-
 swh/web/{common => utils}/identifiers.py           |  12 +-
 swh/web/{common => utils}/middlewares.py           |   4 +-
 swh/web/{common => utils}/origin_visits.py         |  13 +-
 swh/web/{common => utils}/query.py                 |   2 +-
 swh/web/{common => utils}/swh_templatetags.py      |   4 +-
 swh/web/{common => utils}/typing.py                |   0
 swh/web/{common => utils}/urlsindex.py             |   5 +-
 130 files changed, 953 insertions(+), 982 deletions(-)
 delete mode 100644 swh/web/admin/adminurls.py
 delete mode 100644 swh/web/admin/urls.py
 delete mode 100644 swh/web/common/utils.py
 rename swh/web/{admin => deposit}/__init__.py (100%)
 rename swh/web/{templates/admin/deposit.html => deposit/templates/deposit-admin.html} (100%)
 rename swh/web/{admin/deposit.py => deposit/urls.py} (69%)
 rename swh/web/tests/{admin => deposit}/__init__.py (100%)
 create mode 100644 swh/web/tests/deposit/test_app.py
 rename swh/web/tests/{admin/test_deposit.py => deposit/test_views.py} (93%)
 rename swh/web/tests/{utils.py => helpers.py} (100%)
 rename swh/web/tests/{common => utils}/__init__.py (100%)
 rename swh/web/tests/{common => utils}/test_archive.py (99%)
 rename swh/web/tests/{common => utils}/test_converters.py (99%)
 rename swh/web/tests/{common => utils}/test_highlightjs.py (98%)
 rename swh/web/tests/{common => utils}/test_identifiers.py (99%)
 rename swh/web/tests/{common => utils}/test_middlewares.py (91%)
 rename swh/web/tests/{common => utils}/test_origin_visits.py (97%)
 rename swh/web/tests/{common => utils}/test_query.py (92%)
 rename swh/web/tests/{common => utils}/test_templatetags.py (98%)
 rename swh/web/tests/{common => utils}/test_utils.py (82%)
 rename swh/web/{common => utils}/archive.py (99%)
 rename swh/web/{common => utils}/converters.py (98%)
 rename swh/web/{common => utils}/exc.py (100%)
 rename swh/web/{common => utils}/highlightjs.py (99%)
 rename swh/web/{common => utils}/identifiers.py (98%)
 rename swh/web/{common => utils}/middlewares.py (95%)
 rename swh/web/{common => utils}/origin_visits.py (93%)
 rename swh/web/{common => utils}/query.py (98%)
 rename swh/web/{common => utils}/swh_templatetags.py (97%)
 rename swh/web/{common => utils}/typing.py (100%)
 rename swh/web/{common => utils}/urlsindex.py (95%)
Changes applied before test
commit 1975f2b38b6e55d618d859e53e0607d046112bd9
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 16:11:15 2022 +0200

    Rename swh.web.common module to swh.web.utils
    
    This is such a better naming.
    
    Related to T4398

commit 1f465cfe6a021fc68b154a3eb563ce6ba31f6ccb
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 14:47:19 2022 +0200

    Remove no longer needed admin folder
    
    Related to T4398

commit bde7e0f1c8ab3c1da8dddf86c8914e5f6f2fa444
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jul 22 14:42:37 2022 +0200

    deposit: Move administration view into a dedicated django application
    
    Related to T4398

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1992/ for more details.

This revision is now accepted and ready to land.Aug 19 2022, 6:05 PM