Page MenuHomeSoftware Heritage

Use decorator to avoid flag repetition
ClosedPublic

Authored by ardumont on Dec 15 2020, 7:47 PM.

Details

Summary

This should allow to deprecate or simplify those when we start using a `swh
deposit --config-file` or swh --config-file deposit or even moving those
flags up to the main swh deposit command.

Note that this includes a secondary commit which drops spurious noqa comment.

Test Plan

tox

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17972
Build 27762: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 27761: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4748 (id=16816)

Rebasing onto c660d81dbb...

Current branch diff-target is up to date.
Changes applied before test
commit e38ae26c04b9f5419752ce93b034e3d297b72a31
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Dec 15 19:46:22 2020 +0100

    Drop spurious noqa comment

commit d93692b2223f86f7a543833eb3ab5ce85a85b621
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Dec 15 19:41:00 2020 +0100

    Use decorator to avoid flag repetition
    
    This should allow to deprecate or simplify those when we start using a `swh
    deposit --config-file` or `swh --config-file deposit` or even moving those
    flags up to the main `swh deposit` command.

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

nitpicks on the names:

  • authenticated_decorator -> credentials_decorator
  • formatted_output_decorator -> output_format_decorator
This revision is now accepted and ready to land.Dec 17 2020, 11:56 AM

Build is green

Patch application report for D4748 (id=16842)

Rebasing onto c660d81dbb...

Current branch diff-target is up to date.
Changes applied before test
commit 90507a44a128349ab6df13302c58db5ebc3f8439
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Dec 15 19:46:22 2020 +0100

    Drop spurious noqa comment

commit f65cf41b0b3e5dce4cd7fdb204e7b72d64ad149b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Dec 15 19:41:00 2020 +0100

    Use decorator to avoid flag repetition
    
    This should allow to deprecate or simplify those when we start using a `swh
    deposit --config-file` or `swh --config-file deposit` or even moving those
    flags up to the main `swh deposit` command.

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