Page MenuHomeSoftware Heritage

Add structure ExtrinsicMetadataItem, to replace tuples.
ClosedPublic

Authored by vlorentz on Fri, Jul 24, 4:30 PM.

Details

Summary

It makes it clearer what it contains.

Depends D3614

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Fri, Jul 24, 4:30 PM

Build is green

Patch application report for D3615 (id=12718)

Could not rebase; Attempt merge onto 14f700d0fa...

Updating 14f700d..6ff8bc8
Fast-forward
 swh/loader/package/archive/loader.py             |  10 +-
 swh/loader/package/archive/tests/test_archive.py |   4 +-
 swh/loader/package/cran/loader.py                |   6 +-
 swh/loader/package/debian/loader.py              |   6 +-
 swh/loader/package/deposit/loader.py             |  58 ++++---
 swh/loader/package/deposit/tests/test_deposit.py |  46 ++++-
 swh/loader/package/loader.py                     | 138 ++++++++++++++-
 swh/loader/package/nixguix/loader.py             |   6 +-
 swh/loader/package/npm/loader.py                 |  10 +-
 swh/loader/package/pypi/loader.py                |   6 +-
 swh/loader/package/tests/test_loader.py          |   1 -
 swh/loader/package/tests/test_loader_metadata.py | 206 +++++++++++++++++++++++
 12 files changed, 444 insertions(+), 53 deletions(-)
 create mode 100644 swh/loader/package/tests/test_loader_metadata.py
Changes applied before test
commit 6ff8bc8d874e4873e05f55a29319517b07aa5fa8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 16:25:15 2020 +0200

    Add structure ExtrinsicMetadataItem, to replace tuples.
    
    It makes it clearer what it contains.

commit 1645cf8bf4fe7c5c811dfcd98934b20798bab24d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 14:38:25 2020 +0200

    deposit loader: Write revision metadata to the metadata storage.
    
    In addition to writing them in the 'metadata' field of revision objects,
    for now.

commit 24f8137107c558ad4c5849d36f153782758a0cca
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 14:04:04 2020 +0200

    Make the base PackageLoader write extrinsic revision metadata.
    
    For now, no loader outside the tests use it; but DepositLoader will soon.

commit ec522be394ebe8eefd489a85e21a3d7ac593851d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 14:00:17 2020 +0200

    Rename PackageInfo.raw to PackageInfo.raw_info and remove it from BasePackageInfo.
    
    The rename is to disambiguate with 'raw metadata', which may differ from the
    raw info.
    And the base PackageLoader doesn't need to access this field, so removing
    it from BasePackageInfo.

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

Build is green

Patch application report for D3615 (id=12721)

Could not rebase; Attempt merge onto 14f700d0fa...

Updating 14f700d..0b07f0d
Fast-forward
 swh/loader/package/archive/loader.py             |  10 +-
 swh/loader/package/archive/tests/test_archive.py |   4 +-
 swh/loader/package/cran/loader.py                |   6 +-
 swh/loader/package/debian/loader.py              |   6 +-
 swh/loader/package/deposit/loader.py             |  58 +++++---
 swh/loader/package/deposit/tests/test_deposit.py |  46 ++++++-
 swh/loader/package/loader.py                     | 132 +++++++++++++++++-
 swh/loader/package/nixguix/loader.py             |   6 +-
 swh/loader/package/npm/loader.py                 |  10 +-
 swh/loader/package/pypi/loader.py                |   6 +-
 swh/loader/package/tests/test_loader.py          |   1 -
 swh/loader/package/tests/test_loader_metadata.py | 162 +++++++++++++++++++++++
 12 files changed, 396 insertions(+), 51 deletions(-)
 create mode 100644 swh/loader/package/tests/test_loader_metadata.py
Changes applied before test
commit 0b07f0d4a05ce9d6bd339ed9571ff5d072fce9bc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 16:25:15 2020 +0200

    Add structure ExtrinsicMetadataItem, to replace tuples.
    
    It makes it clearer what it contains.

commit 7d255ac66701b5f7b21a84dd6af21dcbe98b9a25
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 14:38:25 2020 +0200

    deposit loader: Write revision metadata to the metadata storage.
    
    In addition to writing them in the 'metadata' field of revision objects,
    for now.

commit 8851951fc1689b402f44f087dad49d8ffc62d15e
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 14:04:04 2020 +0200

    Make the base PackageLoader write extrinsic revision metadata.
    
    For now, no loader outside the tests use it; but DepositLoader will soon.

commit ec522be394ebe8eefd489a85e21a3d7ac593851d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 24 14:00:17 2020 +0200

    Rename PackageInfo.raw to PackageInfo.raw_info and remove it from BasePackageInfo.
    
    The rename is to disambiguate with 'raw metadata', which may differ from the
    raw info.
    And the base PackageLoader doesn't need to access this field, so removing
    it from BasePackageInfo.

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

ardumont accepted this revision.Fri, Jul 24, 4:58 PM
ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/loader/package/loader.py
92

Yep, clearer ;)

This revision is now accepted and ready to land.Fri, Jul 24, 4:58 PM