Page MenuHomeSoftware Heritage

Convert the 'metadata' and 'info' cached-properties/lazy-attributes into methods.
ClosedPublic

Authored by vlorentz on Jul 31 2020, 6:03 PM.

Details

Summary

With a single implementation of the caching logic.

Depends on D3677 and D3678.

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Branch
cached_method
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14176
Build 21782: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 21781: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3679 (id=12938)

Could not rebase; Attempt merge onto c510d10d23...

Updating c510d10..741f477
Fast-forward
 swh/loader/package/cran/loader.py          |  2 +-
 swh/loader/package/deposit/loader.py       | 20 ++++-----
 swh/loader/package/loader.py               |  2 +-
 swh/loader/package/nixguix/loader.py       |  4 +-
 swh/loader/package/npm/loader.py           | 40 +++++++++++++-----
 swh/loader/package/npm/tests/test_npm.py   | 57 ++++++++++++++++++++++++--
 swh/loader/package/pypi/loader.py          | 47 ++++++++++++++++-----
 swh/loader/package/pypi/tests/test_pypi.py | 65 ++++++++++++++++++++++++++++--
 swh/loader/package/utils.py                | 23 ++++++++++-
 9 files changed, 217 insertions(+), 43 deletions(-)
Changes applied before test
commit 741f4778cf00634c3bff1f6a5c76f17b7abe0a71
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 18:02:39 2020 +0200

    Convert the 'metadata' and 'info' cached-properties/lazy-attributes into methods.
    
    With a single implementation of the caching logic.

commit b958f459e53fbaf8ebd85801ef08840303f45231
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 17:56:10 2020 +0200

    cran: fix call to logger.warning.
    
    It errors in test_cran_parse_date, I don't understand why
    it worked so far.

commit 888d0433da901dc08b2b7c8a4b61395346393c69
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 16:51:06 2020 +0200

    pypi: Load the content of the API's response as extrinsic snapshot metadata.

commit 59ee139191489e002488393410b17f22c7a57e25
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 16:34:34 2020 +0200

    Add a default value for RawExtrinsicMetadataCore.discovery_date

commit deb38d7fdd1fdb1c9ac476f6ca72cf492b0503aa
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 15:44:32 2020 +0200

    npm: Load the content of the API's response as extrinsic snapshot metadata.

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

Build is green

Patch application report for D3679 (id=12939)

Rebasing onto c510d10d23...

Current branch diff-target is up to date.
Changes applied before test
commit d141e48a8de141d9cd939e0b2375234fdc6e13bc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 18:02:39 2020 +0200

    Convert the 'metadata' and 'info' cached-properties/lazy-attributes into methods.
    
    With a single implementation of the caching logic.

commit b958f459e53fbaf8ebd85801ef08840303f45231
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 17:56:10 2020 +0200

    cran: fix call to logger.warning.
    
    It errors in test_cran_parse_date, I don't understand why
    it worked so far.

commit 888d0433da901dc08b2b7c8a4b61395346393c69
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 16:51:06 2020 +0200

    pypi: Load the content of the API's response as extrinsic snapshot metadata.

commit 59ee139191489e002488393410b17f22c7a57e25
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 16:34:34 2020 +0200

    Add a default value for RawExtrinsicMetadataCore.discovery_date

commit deb38d7fdd1fdb1c9ac476f6ca72cf492b0503aa
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 15:44:32 2020 +0200

    npm: Load the content of the API's response as extrinsic snapshot metadata.

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

Build is green

Patch application report for D3679 (id=12954)

Could not rebase; Attempt merge onto c510d10d23...

Updating c510d10..614329b
Fast-forward
 swh/loader/package/cran/loader.py          |  2 +-
 swh/loader/package/deposit/loader.py       | 20 ++++-----
 swh/loader/package/loader.py               |  2 +-
 swh/loader/package/nixguix/loader.py       |  4 +-
 swh/loader/package/npm/loader.py           | 40 +++++++++++++-----
 swh/loader/package/npm/tests/test_npm.py   | 57 ++++++++++++++++++++++++--
 swh/loader/package/pypi/loader.py          | 47 ++++++++++++++++-----
 swh/loader/package/pypi/tests/test_pypi.py | 65 ++++++++++++++++++++++++++++--
 swh/loader/package/utils.py                | 23 ++++++++++-
 9 files changed, 217 insertions(+), 43 deletions(-)
Changes applied before test
commit 614329b7ebafab3fbd38a638cca69e3a769567a6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 18:02:39 2020 +0200

    Convert the 'metadata' and 'info' cached-properties/lazy-attributes into methods.
    
    With a single implementation of the caching logic.

commit d1e87ed7bc109e35c360711cfd4b9e65500da9ca
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 17:56:10 2020 +0200

    cran: fix call to logger.warning.
    
    It errors in test_cran_parse_date, I don't understand why
    it worked so far.

commit 406a26055119d7ac2266b9183f6ea3992893e67d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 16:51:06 2020 +0200

    pypi: Load the content of the API's response as extrinsic snapshot metadata.

commit 8901a06e32fcdeefc90e2b6fd67d75b29a340910
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 16:34:34 2020 +0200

    Add a default value for RawExtrinsicMetadataCore.discovery_date

commit 61aea4a2c1731f118b58ccd2d45225d64518d2bf
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 31 15:44:32 2020 +0200

    npm: Load the content of the API's response as extrinsic snapshot metadata.

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

ardumont added a subscriber: ardumont.

Looks good to me

This revision is now accepted and ready to land.Aug 3 2020, 10:46 AM