Page MenuHomeSoftware Heritage

nixguix/loader: Allow version both as string or integer
ClosedPublic

Authored by ardumont on Jul 6 2020, 4:51 PM.

Event Timeline

Build is green

Patch application report for D3436 (id=12161)

Could not rebase; Attempt merge onto aafac87f5c...

Updating aafac87..13fffa0
Fast-forward
 MANIFEST.in                                        |   1 +
 swh/loader/core/tests/__init__.py                  |   2 +-
 swh/loader/core/tests/test_loader.py               |   2 +-
 swh/loader/package/archive/tests/test_archive.py   |   6 +-
 swh/loader/package/cran/tests/test_cran.py         |   4 +-
 swh/loader/package/debian/tests/test_debian.py     |   4 +-
 swh/loader/package/deposit/tests/test_deposit.py   |   6 +-
 swh/loader/package/nixguix/loader.py               |   3 +-
 .../nixpkgs-swh_sources.json                       |   2 +-
 swh/loader/package/nixguix/tests/test_nixguix.py   |  11 +-
 swh/loader/package/npm/tests/test_npm.py           |   6 +-
 swh/loader/package/pypi/tests/test_pypi.py         |   6 +-
 swh/loader/package/tests/common.py                 |  82 -------
 swh/loader/package/tests/test_common.py            |  89 +-------
 swh/loader/tests/__init__.py                       | 160 +++++++++++++
 swh/loader/tests/common.py                         |  53 -----
 swh/loader/tests/data/0805nexter-1.1.0.tar.gz      |   1 +
 swh/loader/tests/test_common.py                    | 118 ----------
 swh/loader/tests/test_init.py                      | 253 +++++++++++++++++++++
 19 files changed, 443 insertions(+), 366 deletions(-)
 delete mode 100644 swh/loader/tests/common.py
 create mode 120000 swh/loader/tests/data/0805nexter-1.1.0.tar.gz
 delete mode 100644 swh/loader/tests/test_common.py
 create mode 100644 swh/loader/tests/test_init.py
Changes applied before test
commit 13fffa0b66b8817fc51575c559218e0ef3fb8468
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 16:47:55 2020 +0200

    nixguix/loader: Allow version both as string or integer
    
    Related to T2485

commit d2bbe620b0185726b4b2428fd81b3845e7e6f362
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 15:30:17 2020 +0200

    Move remaining common test utility functions to top-level arborescence
    
    It's shared amongst both package and core loaders.
    
    Related to T2481

commit 373e9a16e967ad241865b69f1d8cbdf188b86bac
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 14:49:40 2020 +0200

    Move common test utility function to the top-level arborescence
    
    It's shared amongst both package and core loaders.
    
    Related to T2481

commit 3348e522ccfd8a217c015eada42731cbbc7ca0a3
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 14:41:05 2020 +0200

    Define common test helper function
    
    Related to T2481

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

If we need to support both, there should be a test for both

If we need to support both, there should be a test for both

well, it is, other sources.json have their value with an int (and not a string as this one declares).

If we need to support both, there should be a test for both

well, it is, other sources.json have their value with an int (and not a string as this one declares).

fine, i'll add explicitly the test cases for those ;)

Add test cases around the code change

Properly fix the test cases ¯\_(ツ)_/¯

Build is green

Patch application report for D3436 (id=12167)

Could not rebase; Attempt merge onto 3348e522cc...

Updating 3348e52..eb6b54e
Fast-forward
 swh/loader/core/tests/test_loader.py               |   2 +-
 swh/loader/package/archive/tests/test_archive.py   |   6 +-
 swh/loader/package/cran/tests/test_cran.py         |   4 +-
 swh/loader/package/debian/tests/test_debian.py     |   4 +-
 swh/loader/package/deposit/tests/test_deposit.py   |   6 +-
 swh/loader/package/nixguix/loader.py               |   3 +-
 .../nixpkgs-swh_sources.json                       |   2 +-
 swh/loader/package/nixguix/tests/test_nixguix.py   |  27 +--
 swh/loader/package/npm/tests/test_npm.py           |   6 +-
 swh/loader/package/pypi/tests/test_pypi.py         |   6 +-
 swh/loader/package/tests/common.py                 |  82 --------
 swh/loader/package/tests/test_common.py            |  89 +--------
 swh/loader/tests/__init__.py                       | 132 ++++++++++++-
 swh/loader/tests/common.py                         |  53 ------
 swh/loader/tests/test_common.py                    | 118 ------------
 swh/loader/tests/test_init.py                      | 207 ++++++++++++++++++++-
 16 files changed, 373 insertions(+), 374 deletions(-)
 delete mode 100644 swh/loader/tests/common.py
 delete mode 100644 swh/loader/tests/test_common.py
Changes applied before test
commit eb6b54e2150a5fd4956a7d0557bff460f9c6be36
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 16:47:55 2020 +0200

    nixguix/loader: Allow version both as string or integer
    
    Related to T2485

commit d234a5c74c2b4bafb2f22b7061662062ebbda761
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 15:30:17 2020 +0200

    Move remaining common test utility functions to top-level arborescence
    
    It's shared amongst both package and core loaders.
    
    Related to T2481

commit 4084012c0ad7e451ed229c0dc8220543591adc65
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 14:49:40 2020 +0200

    Move common test utility function to the top-level arborescence
    
    It's shared amongst both package and core loaders.
    
    Related to T2481

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

Build is green

Patch application report for D3436 (id=12168)

Could not rebase; Attempt merge onto 3348e522cc...

Updating 3348e52..1ee4166
Fast-forward
 swh/loader/core/tests/test_loader.py               |   2 +-
 swh/loader/package/archive/tests/test_archive.py   |   6 +-
 swh/loader/package/cran/tests/test_cran.py         |   4 +-
 swh/loader/package/debian/tests/test_debian.py     |   4 +-
 swh/loader/package/deposit/tests/test_deposit.py   |   6 +-
 swh/loader/package/nixguix/loader.py               |   3 +-
 .../nixpkgs-swh_sources.json                       |   2 +-
 swh/loader/package/nixguix/tests/test_nixguix.py   |  28 +--
 swh/loader/package/npm/tests/test_npm.py           |   6 +-
 swh/loader/package/pypi/tests/test_pypi.py         |   6 +-
 swh/loader/package/tests/common.py                 |  82 --------
 swh/loader/package/tests/test_common.py            |  89 +--------
 swh/loader/tests/__init__.py                       | 132 ++++++++++++-
 swh/loader/tests/common.py                         |  53 ------
 swh/loader/tests/test_common.py                    | 118 ------------
 swh/loader/tests/test_init.py                      | 207 ++++++++++++++++++++-
 16 files changed, 374 insertions(+), 374 deletions(-)
 delete mode 100644 swh/loader/tests/common.py
 delete mode 100644 swh/loader/tests/test_common.py
Changes applied before test
commit 1ee416613ca521fc978dd1a66d9d442ca314476e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 16:47:55 2020 +0200

    nixguix/loader: Allow version both as string or integer
    
    Related to T2485

commit d234a5c74c2b4bafb2f22b7061662062ebbda761
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 15:30:17 2020 +0200

    Move remaining common test utility functions to top-level arborescence
    
    It's shared amongst both package and core loaders.
    
    Related to T2481

commit 4084012c0ad7e451ed229c0dc8220543591adc65
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 14:49:40 2020 +0200

    Move common test utility function to the top-level arborescence
    
    It's shared amongst both package and core loaders.
    
    Related to T2481

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

vlorentz added inline comments.
swh/loader/package/nixguix/tests/test_nixguix.py
66

s/are captured/raise an error/

This revision is now accepted and ready to land.Jul 7 2020, 9:39 AM

Build is green

Patch application report for D3436 (id=12179)

Rebasing onto d234a5c74c...

Current branch diff-target is up to date.
Changes applied before test
commit a3d2eb02654ddf8a9c7b4405815c587c3d8476d3
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 6 16:47:55 2020 +0200

    nixguix/loader: Allow version both as string or integer
    
    Related to T2485

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