We have many of those now; and keeping them all their tests in the same file
is messy
This causes these tests to run after Celery tests, which breaks them;
so this commit also renames Celery tests to make them run last.
Differential D8048
Move mapping-specific tests to a new directory vlorentz on Jun 29 2022, 1:47 PM. Authored by
Details
We have many of those now; and keeping them all their tests in the same file This causes these tests to run after Celery tests, which breaks them;
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D8048 (id=29035)Could not rebase; Attempt merge onto 1be4e184d4... Updating 1be4e18..72f76f6 Fast-forward swh/indexer/metadata.py | 41 +- swh/indexer/metadata_detector.py | 8 +- swh/indexer/metadata_dictionary/base.py | 26 +- swh/indexer/metadata_dictionary/npm.py | 4 +- swh/indexer/metadata_dictionary/ruby.py | 7 +- swh/indexer/tests/metadata_dictionary/__init__.py | 0 swh/indexer/tests/metadata_dictionary/test_cff.py | 220 ++++ .../tests/metadata_dictionary/test_codemeta.py | 175 +++ .../tests/metadata_dictionary/test_maven.py | 365 ++++++ swh/indexer/tests/metadata_dictionary/test_npm.py | 322 +++++ .../tests/metadata_dictionary/test_python.py | 114 ++ swh/indexer/tests/metadata_dictionary/test_ruby.py | 134 ++ swh/indexer/tests/test_metadata.py | 1277 -------------------- swh/indexer/tests/zz_celery/README | 2 + swh/indexer/tests/zz_celery/__init__.py | 0 swh/indexer/tests/{ => zz_celery}/test_tasks.py | 2 + 16 files changed, 1385 insertions(+), 1312 deletions(-) create mode 100644 swh/indexer/tests/metadata_dictionary/__init__.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_cff.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_codemeta.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_maven.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_npm.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_python.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_ruby.py create mode 100644 swh/indexer/tests/zz_celery/README create mode 100644 swh/indexer/tests/zz_celery/__init__.py rename swh/indexer/tests/{ => zz_celery}/test_tasks.py (99%) Changes applied before testcommit 72f76f63f204bb09c8c433c64b622df3d11f5dc6 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 13:43:14 2022 +0200 Move mapping-specific tests to a new directory We have many of those now; and keeping them all their tests in the same file is messy This causes these tests to run after Celery tests, which breaks them; so this commit also renames Celery tests to make them run last. commit e002b2ee66b305c98a153cc2b57088c179a3fc68 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:19:00 2022 +0200 Remove given/when/then comments commit 65edef32831949de7b8e14846ecd4fa43bc619ee Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:08:49 2022 +0200 Remove SingleFileMapping from JsonMapping's base classes Extrinsic metadata indexers will not use a 'file' as input, but will typically use RawExtrinsicMetadata containing formats in JSON. commit f7a4bf4e04b3ac4c2fa89cf9b8a5c22e5f0c4d12 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 11:01:35 2022 +0200 Add typing to detect_metadata() and related functions See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/289/ for more details. Comment Actions Build is green Patch application report for D8048 (id=29036)Could not rebase; Attempt merge onto 1be4e184d4... Updating 1be4e18..244bf36 Fast-forward swh/indexer/metadata.py | 41 +- swh/indexer/metadata_detector.py | 8 +- swh/indexer/metadata_dictionary/base.py | 26 +- swh/indexer/metadata_dictionary/npm.py | 4 +- swh/indexer/metadata_dictionary/ruby.py | 7 +- swh/indexer/tests/metadata_dictionary/__init__.py | 0 swh/indexer/tests/metadata_dictionary/test_cff.py | 220 ++++ .../tests/metadata_dictionary/test_codemeta.py | 175 +++ .../tests/metadata_dictionary/test_maven.py | 365 ++++++ swh/indexer/tests/metadata_dictionary/test_npm.py | 322 +++++ .../tests/metadata_dictionary/test_python.py | 114 ++ swh/indexer/tests/metadata_dictionary/test_ruby.py | 134 ++ swh/indexer/tests/test_metadata.py | 1277 -------------------- swh/indexer/tests/zz_celery/README | 2 + swh/indexer/tests/zz_celery/__init__.py | 0 swh/indexer/tests/{ => zz_celery}/test_tasks.py | 0 16 files changed, 1383 insertions(+), 1312 deletions(-) create mode 100644 swh/indexer/tests/metadata_dictionary/__init__.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_cff.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_codemeta.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_maven.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_npm.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_python.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_ruby.py create mode 100644 swh/indexer/tests/zz_celery/README create mode 100644 swh/indexer/tests/zz_celery/__init__.py rename swh/indexer/tests/{ => zz_celery}/test_tasks.py (100%) Changes applied before testcommit 244bf36f55fb919f9b9da8503db309a6d816fd30 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 13:43:14 2022 +0200 Move mapping-specific tests to a new directory We have many of those now; and keeping them all their tests in the same file is messy This causes these tests to run after Celery tests, which breaks them; so this commit also renames Celery tests to make them run last. commit e002b2ee66b305c98a153cc2b57088c179a3fc68 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:19:00 2022 +0200 Remove given/when/then comments commit 65edef32831949de7b8e14846ecd4fa43bc619ee Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:08:49 2022 +0200 Remove SingleFileMapping from JsonMapping's base classes Extrinsic metadata indexers will not use a 'file' as input, but will typically use RawExtrinsicMetadata containing formats in JSON. commit f7a4bf4e04b3ac4c2fa89cf9b8a5c22e5f0c4d12 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 11:01:35 2022 +0200 Add typing to detect_metadata() and related functions See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/290/ for more details. Comment Actions Don't like the zz-celery hack, but well, that's life. Did not check the new test files actually correspond to old test_metadata.py content. If this only test being moved or are there other (eg new tests) coming along? If so, please specify it in the commit message. Comment Actions Build is green Patch application report for D8048 (id=29115)Could not rebase; Attempt merge onto 1be4e184d4... Updating 1be4e18..f000287 Fast-forward swh/indexer/metadata.py | 44 +- swh/indexer/metadata_detector.py | 8 +- swh/indexer/metadata_dictionary/base.py | 26 +- swh/indexer/metadata_dictionary/npm.py | 4 +- swh/indexer/metadata_dictionary/ruby.py | 7 +- swh/indexer/tests/metadata_dictionary/__init__.py | 0 swh/indexer/tests/metadata_dictionary/test_cff.py | 220 ++++ .../tests/metadata_dictionary/test_codemeta.py | 175 +++ .../tests/metadata_dictionary/test_maven.py | 365 ++++++ swh/indexer/tests/metadata_dictionary/test_npm.py | 322 +++++ .../tests/metadata_dictionary/test_python.py | 114 ++ swh/indexer/tests/metadata_dictionary/test_ruby.py | 134 ++ swh/indexer/tests/test_metadata.py | 1277 -------------------- swh/indexer/tests/zz_celery/README | 2 + swh/indexer/tests/zz_celery/__init__.py | 0 swh/indexer/tests/{ => zz_celery}/test_tasks.py | 0 16 files changed, 1384 insertions(+), 1314 deletions(-) create mode 100644 swh/indexer/tests/metadata_dictionary/__init__.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_cff.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_codemeta.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_maven.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_npm.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_python.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_ruby.py create mode 100644 swh/indexer/tests/zz_celery/README create mode 100644 swh/indexer/tests/zz_celery/__init__.py rename swh/indexer/tests/{ => zz_celery}/test_tasks.py (100%) Changes applied before testcommit f00028724a986a8557c2d361d76764f2df599a37 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 13:43:14 2022 +0200 Move mapping-specific tests to a new directory We have many of those now; and keeping them all their tests in the same file is messy This causes these tests to run after Celery tests, which breaks them; so this commit also renames Celery tests to make them run last. commit 1801806843e41352e0099042f116fae1f4611625 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:19:00 2022 +0200 Remove given/when/then comments commit 62932303c8b8a2a551697f562b0406c03b457712 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:08:49 2022 +0200 Remove SingleFileMapping from JsonMapping's base classes Extrinsic metadata indexers will not use a 'file' as input, but will typically use RawExtrinsicMetadata containing formats in JSON. commit dc035a669329272713b0b977ba2f685501e80ba0 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 11:01:35 2022 +0200 Add typing to detect_metadata() and related functions This also moves the call to `detect_metadata()` to `translate_directory_intrinsic_metadata` so type annotations make more sense; and remove a dead/broken code branch in `DirectoryMetadataIndexer.index()` that was detected by mypy. See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/310/ for more details. Comment Actions Build was aborted Patch application report for D8048 (id=29118)Could not rebase; Attempt merge onto 1be4e184d4... Updating 1be4e18..3074268 Fast-forward swh/indexer/metadata.py | 52 +- swh/indexer/metadata_detector.py | 8 +- swh/indexer/metadata_dictionary/base.py | 26 +- swh/indexer/metadata_dictionary/npm.py | 4 +- swh/indexer/metadata_dictionary/ruby.py | 7 +- swh/indexer/tests/metadata_dictionary/__init__.py | 0 swh/indexer/tests/metadata_dictionary/test_cff.py | 220 ++++ .../tests/metadata_dictionary/test_codemeta.py | 175 +++ .../tests/metadata_dictionary/test_maven.py | 365 ++++++ swh/indexer/tests/metadata_dictionary/test_npm.py | 322 +++++ .../tests/metadata_dictionary/test_python.py | 114 ++ swh/indexer/tests/metadata_dictionary/test_ruby.py | 134 ++ swh/indexer/tests/test_metadata.py | 1277 -------------------- swh/indexer/tests/zz_celery/README | 2 + swh/indexer/tests/zz_celery/__init__.py | 0 swh/indexer/tests/{ => zz_celery}/test_tasks.py | 0 16 files changed, 1387 insertions(+), 1319 deletions(-) create mode 100644 swh/indexer/tests/metadata_dictionary/__init__.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_cff.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_codemeta.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_maven.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_npm.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_python.py create mode 100644 swh/indexer/tests/metadata_dictionary/test_ruby.py create mode 100644 swh/indexer/tests/zz_celery/README create mode 100644 swh/indexer/tests/zz_celery/__init__.py rename swh/indexer/tests/{ => zz_celery}/test_tasks.py (100%) Changes applied before testcommit 3074268b1b7d5409dc162a6125db2eb325b96add Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 13:43:14 2022 +0200 Move mapping-specific tests to a new directory We have many of those now; and keeping them all their tests in the same file is messy This causes these tests to run after Celery tests, which breaks them; so this commit also renames Celery tests to make them run last. commit f4d1ce835ca392213a0a9bda1cc210d2a4525a5d Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:19:00 2022 +0200 Remove given/when/then comments commit e6b03db91c994fc1d680b76bf0798054a8120b79 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 12:08:49 2022 +0200 Remove SingleFileMapping from JsonMapping's base classes Extrinsic metadata indexers will not use a 'file' as input, but will typically use RawExtrinsicMetadata containing formats in JSON. commit 8c5a84459d4436af7b4b751e48091a99bce0a7d1 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Jun 29 11:01:35 2022 +0200 Add typing to detect_metadata() and related functions This also moves the call to `detect_metadata()` to `translate_directory_intrinsic_metadata` so type annotations make more sense; and remove a dead/broken code branch in `DirectoryMetadataIndexer.index()` that was detected by mypy. Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/313/ |