Page MenuHomeSoftware Heritage

Clean up loader, add types and update docstrings
ClosedPublic

Authored by ardumont on Nov 9 2021, 6:20 PM.

Details

Summary

This also drops either no longer used or ineffective parameters from the loader to ease
readability.

Related to T3719

Diff Detail

Event Timeline

Build is green

Patch application report for D6630 (id=24094)

Rebasing onto e36caff0a4...

Current branch diff-target is up to date.
Changes applied before test
commit 0ba8accc6c8770684468d1498f4eb81e015bbd4b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Nov 9 18:18:00 2021 +0100

    Clean up loader, add types and more docstring
    
    This drops either no longer used or ineffective parameters from the loader.
    
    Related to T3719

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

ardumont retitled this revision from Clean up loader, add types and more docstring to Clean up loader, add types and update docstrings.Nov 9 2021, 7:01 PM
ardumont edited the summary of this revision. (Show Details)
ardumont added a subscriber: anlambert.
ardumont added inline comments.
swh/loader/svn/loader.py
388

Now that the post_load actually execute that check as the last step, i'm wondering whether we want that check to stay at all.

@anlambert btw ^ (just worth mentioning, if we decide to drop it, it will be in another diff)

Build is green

Patch application report for D6630 (id=24095)

Rebasing onto e36caff0a4...

Current branch diff-target is up to date.
Changes applied before test
commit 15718d3205d95c58f5d2785c29bcd65c003dfcba
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Nov 9 18:18:00 2021 +0100

    Clean up loader, add types and update docstrings
    
    This also drops either no longer used or ineffective parameters from the loader to ease
    readability.
    
    Related to T3719

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

Align docstring definition with task module

Build is green

Patch application report for D6630 (id=24096)

Rebasing onto e36caff0a4...

Current branch diff-target is up to date.
Changes applied before test
commit a3d88d518bf8e961c6309b6d279189321d85fc57
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Nov 9 18:18:00 2021 +0100

    Clean up loader, add types and update docstrings
    
    This also drops either no longer used or ineffective parameters from the loader to ease
    readability.
    
    Related to T3719

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

Build is green

Patch application report for D6630 (id=24099)

Rebasing onto e36caff0a4...

Current branch diff-target is up to date.
Changes applied before test
commit 21d0d9cb99f4a5c25d7cd45f7fde54ea4436e293
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Nov 9 18:18:00 2021 +0100

    Clean up loader, add types and update docstrings
    
    This also drops either no longer used or ineffective parameters from the loader to ease
    readability.
    
    Related to T3719

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

Build is green

Patch application report for D6630 (id=24101)

Rebasing onto e36caff0a4...

Current branch diff-target is up to date.
Changes applied before test
commit 9ddf7115b8e6bc3825bc5e931a23608226450fc6
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Nov 9 18:18:00 2021 +0100

    Clean up loader, add types and update docstrings
    
    This also drops either no longer used or ineffective parameters from the loader to ease
    readability.
    
    Related to T3719

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

vlorentz added a subscriber: vlorentz.

Why is check_revision not a boolean?

This revision is now accepted and ready to land.Nov 10 2021, 11:17 AM

Why is check_revision not a boolean?

iirc, to allow the user to tell how many revisions in between check they want to do.
If it's a boolean, you need to hardcode it to a pre-defined number.

And that check you don't really want to do it at each revision [1] as an svn export instruction is involved.

[1] for debug purposes it's fine but not for production.

swh/loader/svn/loader.py
388

@vlorentz regarding your previous question, here is the check if you want to follow through from there ;)