Page MenuHomeSoftware Heritage

cran: Reimplement lister using new Lister API
ClosedPublic

Authored by anlambert on Jan 25 2021, 7:48 PM.

Details

Summary

First commit performs an iso-functionalities port of the lister to new API.

Second commit retrieves and parses the package update date from the data
returned by the tools::CRAN_package_db() R function.

Closes T2989

Diff Detail

Repository
rDLS Listers
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 D4945 (id=17603)

Rebasing onto bea9d6d147...

Current branch diff-target is up to date.
Changes applied before test
commit d64cb549d3021c5950edce8a617c3f7b9f8ee2f7
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 25 18:26:22 2021 +0100

    cran: Retrieve last update date for each listed package
    
    R package last update date can be found in the "Packaged" field of
    package info returned by tools::CRAN_package_db().
    
    So retrieve it and parse it as a datetime to provide as last_update
    parameter value in ListedOrigin model.
    
    Closes T2989

commit 4b004a9ccced7b87e207cf8a8eb7af41f64f9a29
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 25 16:59:17 2021 +0100

    cran: Reimplement lister using new Lister API
    
    Related to T2989

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

ardumont added a subscriber: ardumont.

lgtm

some suggestions inline.

swh/lister/cran/lister.py
118

Maybe add a test around this.

Most probably, i should do that in my gitlab lister diff which adds a parsing of the last_update.

120

can be dropped.

This revision is now accepted and ready to land.Jan 26 2021, 12:07 PM

Update: Add test for parse_packaged_date and fix implementation.

swh/lister/cran/lister.py
118

Test added and bug in implementation fixed thanks to it ;-)

Build is green

Patch application report for D4945 (id=17619)

Rebasing onto bea9d6d147...

Current branch diff-target is up to date.
Changes applied before test
commit 5f8632cee333d71be7cfca85410ebf353bbe28f5
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 25 18:26:22 2021 +0100

    cran: Retrieve last update date for each listed package
    
    R package last update date can be found in the "Packaged" field of
    package info returned by tools::CRAN_package_db().
    
    So retrieve it and parse it as a datetime to provide as last_update
    parameter value in ListedOrigin model.
    
    Closes T2989

commit 4b004a9ccced7b87e207cf8a8eb7af41f64f9a29
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 25 16:59:17 2021 +0100

    cran: Reimplement lister using new Lister API
    
    Related to T2989

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

Build is green

Patch application report for D4945 (id=17623)

Rebasing onto aefb260f76...

Current branch diff-target is up to date.
Changes applied before test
commit 22eeb0956ec17cf50f3360a103ea21a5e35d5c29
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 25 18:26:22 2021 +0100

    cran: Retrieve last update date for each listed package
    
    R package last update date can be found in the "Packaged" field of
    package info returned by tools::CRAN_package_db().
    
    So retrieve it and parse it as a datetime to provide as last_update
    parameter value in ListedOrigin model.
    
    Closes T2989

commit 6f40ab4c5730e530c41bd117b37f23b058a67c98
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 25 16:59:17 2021 +0100

    cran: Reimplement lister using new Lister API
    
    Related to T2989

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