Page MenuHomeSoftware Heritage

Cpan: Cpan loader loads Perl modules from cpan.org
ClosedPublic

Authored by franckbret on Sep 28 2022, 9:41 AM.

Details

Summary

For each origin it calls an http api endpoint to retrieve extrinsic
metadata for each version of a module.
Author and package description are extracted from intrinsic metadata
parsing data from META.json or META.yml at the root of the archive.

Related T2833

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

Build is green

Patch application report for D8557 (id=30870)

Rebasing onto 798f749e66...

Current branch diff-target is up to date.
Changes applied before test
commit d0517a06abf44764f42995b9ba227bcab0e8d894
Author: Franck Bret <franck.bret@octobus.net>
Date:   Wed Sep 28 09:34:25 2022 +0200

    Cpan: Cpan loader loads Perl modules from cpan.org
    
    For each origin it calls an http api endpoint to retrieve extrinsic
    metadata for each version of a module.
    Author and package description are extracted from intrinsic metadata
    parsing data from META.json or META.yml at the root of the archive.
    
    Related T2833

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/loader/package/cpan/loader.py
39–40

why str instead of datetime? The loader parses it anyway

55

you forgot to change that

85–86

why this method?

90–91
141

Could you add a comment to mention this defaults to UTC, as the API does not provide an explicit timezone?

167

Could you assert the name is the same that was passed to the loader?

If not, you should check the name does not contain any whitespace, as it would mess with the release message

This revision now requires changes to proceed.Sep 28 2022, 10:31 AM
franckbret marked 6 inline comments as done.

Some improvments after review

Build is green

Patch application report for D8557 (id=30909)

Rebasing onto 798f749e66...

Current branch diff-target is up to date.
Changes applied before test
commit 173cf79917e3d225a0d70dae149c5c7faddb8b08
Author: Franck Bret <franck.bret@octobus.net>
Date:   Wed Sep 28 09:34:25 2022 +0200

    Cpan: Cpan loader loads Perl modules from cpan.org
    
    For each origin it calls an http api endpoint to retrieve extrinsic
    metadata for each version of a module.
    Author and package description are extracted from intrinsic metadata
    parsing data from META.json or META.yml at the root of the archive.
    
    Related T2833

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

This revision is now accepted and ready to land.Sep 29 2022, 3:00 PM
This revision was landed with ongoing or failed builds.Sep 29 2022, 3:17 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D8557 (id=30949)

Rebasing onto 7375a83c2f...

Current branch diff-target is up to date.
Changes applied before test
commit 2db1a754e3686b8a66b64e8be2ac9ddf0aabe704
Author: Franck Bret <franck.bret@octobus.net>
Date:   Wed Sep 28 09:34:25 2022 +0200

    Cpan: Cpan loader loads Perl modules from cpan.org
    
    For each origin it calls an http api endpoint to retrieve extrinsic
    metadata for each version of a module.
    Author and package description are extracted from intrinsic metadata
    parsing data from META.json or META.yml at the root of the archive.
    
    Related T2833

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