Page MenuHomeSoftware Heritage

Reformat optional arguments passed cli tests to make them easier to read
ClosedPublic

Authored by douardda on Nov 6 2020, 11:16 AM.

Details

Summary

keep on the same line the option flagand the argument.

Depends on D4432

Diff Detail

Repository
rDDEP Push deposit
Branch
refactorings
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 17013
Build 26255: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 26254: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4433 (id=15689)

Could not rebase; Attempt merge onto 0f4ec31168...

Updating 0f4ec311..53de2ede
Fast-forward
 swh/deposit/cli/client.py               | 138 +++---------
 swh/deposit/client.py                   | 112 +++++++---
 swh/deposit/tests/cli/test_client.py    | 375 +++++++++++---------------------
 swh/deposit/tests/loader/test_client.py |  99 ++++-----
 4 files changed, 277 insertions(+), 447 deletions(-)
Changes applied before test
commit 53de2ede01849d87eb6eb98d089afd7642a4269b
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:53:23 2020 +0100

    Reformat optional arguments passed cli tests to make them easier to read
    
    keep on the same line the option flagand the argument.

commit 021531bfc7fa6a3e9d359fc9f6d11eccd2bc11ec
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:42:05 2020 +0100

    Simplify `swh deposit upload` cli options
    
    Get rid of the --archive_deposit and --metadata_deposit flags, these can
    be deduced from the presence of --archive and --metadata.

commit 77900028c2c694fc67b1c3fa1046de60aa5e80f5
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Nov 2 14:39:42 2020 +0100

    Refactor BaseApiDepositClient to get rid of the _client argument
    
    This argument was only there to make it easier to mock the HTTP calls
    (via a mocked requests). Thanks to the mockup capabilities, this is in
    fact not necessary. So get rid of it and replace its usage in tests by
    proper use of the mocker pytest fixture.
    
    Also:
    - refactor this BaseApiDepositClient constructor to acces directly
      "url" and "auth" kwargs instead of an unspecified generic config dict
      (still supported but deprecated),
    - get rid of a few actually not really needed fixtures (deposit_config)
    - rewrite PrivateApiDepositClientStatusUpdateTest as a couple of pytest
      functions,
    - get rid of onliners functions in  swh.deposit.cli.client (_client(),
      deposit_create, deposit_update).

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

This revision is now accepted and ready to land.Nov 6 2020, 12:28 PM

Build is green

Patch application report for D4433 (id=15725)

Rebasing onto 7148a257b2...

Current branch diff-target is up to date.
Changes applied before test
commit 5e05355a83ae33a03d2daa60052dda3c600ac9c2
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Nov 2 14:39:42 2020 +0100

    Refactor BaseApiDepositClient to get rid of the _client argument
    
    This argument was only there to make it easier to mock the HTTP calls
    (via a mocked requests). Thanks to the mockup capabilities, this is in
    fact not necessary. So get rid of it and replace its usage in tests by
    proper use of the mocker pytest fixture.
    
    Also:
    - refactor this BaseApiDepositClient constructor to acces directly
      "url" and "auth" kwargs instead of an unspecified generic config dict
      (still supported but deprecated),
    - get rid of a few actually not really needed fixtures (deposit_config)
    - rewrite PrivateApiDepositClientStatusUpdateTest as a couple of pytest
      functions,
    - get rid of onliners functions in  swh.deposit.cli.client (_client(),
      deposit_create, deposit_update).

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

Build is green

Patch application report for D4433 (id=15728)

Could not rebase; Attempt merge onto 7148a257b2...

Updating 7148a257..59e6793a
Fast-forward
 swh/deposit/cli/client.py               | 138 +++---------
 swh/deposit/client.py                   | 112 +++++++---
 swh/deposit/tests/cli/test_client.py    | 375 +++++++++++---------------------
 swh/deposit/tests/loader/test_client.py |  99 ++++-----
 4 files changed, 277 insertions(+), 447 deletions(-)
Changes applied before test
commit 59e6793ab975a9529297d8b296314dd8ecba6a4d
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:53:23 2020 +0100

    Reformat optional arguments passed cli tests to make them easier to read
    
    keep on the same line the option flagand the argument.

commit abec2f3f73c0c9f5136525aae598db863e6b13a7
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:42:05 2020 +0100

    Simplify `swh deposit upload` cli options
    
    Get rid of the --archive_deposit and --metadata_deposit flags, these can
    be deduced from the presence of --archive and --metadata.

commit 5e05355a83ae33a03d2daa60052dda3c600ac9c2
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Nov 2 14:39:42 2020 +0100

    Refactor BaseApiDepositClient to get rid of the _client argument
    
    This argument was only there to make it easier to mock the HTTP calls
    (via a mocked requests). Thanks to the mockup capabilities, this is in
    fact not necessary. So get rid of it and replace its usage in tests by
    proper use of the mocker pytest fixture.
    
    Also:
    - refactor this BaseApiDepositClient constructor to acces directly
      "url" and "auth" kwargs instead of an unspecified generic config dict
      (still supported but deprecated),
    - get rid of a few actually not really needed fixtures (deposit_config)
    - rewrite PrivateApiDepositClientStatusUpdateTest as a couple of pytest
      functions,
    - get rid of onliners functions in  swh.deposit.cli.client (_client(),
      deposit_create, deposit_update).

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

Build is green

Patch application report for D4433 (id=15737)

Could not rebase; Attempt merge onto 7148a257b2...

Updating 7148a257..3af5661a
Fast-forward
 swh/deposit/cli/client.py               | 135 +++---------
 swh/deposit/client.py                   | 107 ++++++---
 swh/deposit/tests/cli/test_client.py    | 375 +++++++++++---------------------
 swh/deposit/tests/loader/test_client.py |  95 +++-----
 4 files changed, 265 insertions(+), 447 deletions(-)
Changes applied before test
commit 3af5661adee12c44cbc94d2c9511adce4b35637d
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:53:23 2020 +0100

    Reformat optional arguments passed cli tests to make them easier to read
    
    keep on the same line the option flagand the argument.

commit 62c1001a8cafa9de7b8fb8c2ebc10f05f4fbe354
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:42:05 2020 +0100

    Simplify `swh deposit upload` cli options
    
    Get rid of the --archive_deposit and --metadata_deposit flags, these can
    be deduced from the presence of --archive and --metadata.

commit 7e69a87f813630102696a2a0a4238cf5cf7545ff
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Nov 2 14:39:42 2020 +0100

    Refactor BaseApiDepositClient to get rid of the _client argument
    
    This argument was only there to make it easier to mock the HTTP calls
    (via a mocked requests). Thanks to the mockup capabilities, this is in
    fact not necessary. So get rid of it and replace its usage in tests by
    proper use of the mocker pytest fixture.
    
    Also:
    - refactor this BaseApiDepositClient constructor to acces directly
      "url" and "auth" kwargs instead of an unspecified generic config dict
      (still supported but deprecated),
    - get rid of a few actually not really needed fixtures (deposit_config)
    - rewrite PrivateApiDepositClientStatusUpdateTest as a couple of pytest
      functions,
    - get rid of onliners functions in  swh.deposit.cli.client (_client(),
      deposit_create, deposit_update).

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

Build is green

Patch application report for D4433 (id=15782)

Could not rebase; Attempt merge onto 018500c195...

Updating 018500c1..c4bc11c3
Fast-forward
 swh/deposit/cli/client.py               | 137 +++---------
 swh/deposit/client.py                   | 107 ++++++---
 swh/deposit/tests/cli/test_client.py    | 375 +++++++++++---------------------
 swh/deposit/tests/loader/test_client.py |  95 +++-----
 4 files changed, 266 insertions(+), 448 deletions(-)
Changes applied before test
commit c4bc11c3d2ebf04d4468930ec4a220325a2061ca
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:53:23 2020 +0100

    Reformat optional arguments passed cli tests to make them easier to read
    
    keep on the same line the option flagand the argument.

commit d0ea340251cdae349463c8f2fc192eaf692e6bec
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:42:05 2020 +0100

    Simplify `swh deposit upload` cli options
    
    Get rid of the --archive_deposit and --metadata_deposit flags, these can
    be deduced from the presence of --archive and --metadata.

commit c7e397e527a13fc09ffb314c3a2cc9df69712160
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Nov 2 14:39:42 2020 +0100

    Refactor BaseApiDepositClient to get rid of the _client argument
    
    This argument was only there to make it easier to mock the HTTP calls
    (via a mocked requests). Thanks to the mockup capabilities, this is in
    fact not necessary. So get rid of it and replace its usage in tests by
    proper use of the mocker pytest fixture.
    
    Also:
    - refactor this BaseApiDepositClient constructor to acces directly
      "url" and "auth" kwargs instead of an unspecified generic config dict
      (still supported but deprecated),
    - get rid of a few actually not really needed fixtures (deposit_config)
    - rewrite PrivateApiDepositClientStatusUpdateTest as a couple of pytest
      functions,
    - get rid of onliners functions in  swh.deposit.cli.client (_client(),
      deposit_create, deposit_update).

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

Build is green

Patch application report for D4433 (id=15803)

Could not rebase; Attempt merge onto c815bbf19a...

Updating c815bbf1..b5da4cdd
Fast-forward
 swh/deposit/cli/client.py               | 169 +++++---------
 swh/deposit/client.py                   | 107 ++++++---
 swh/deposit/tests/cli/test_client.py    | 375 +++++++++++---------------------
 swh/deposit/tests/loader/test_client.py |  95 +++-----
 4 files changed, 293 insertions(+), 453 deletions(-)
Changes applied before test
commit b5da4cdd68dbb14ce686c16391faa08e6263ed84
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:53:23 2020 +0100

    Reformat optional arguments passed cli tests to make them easier to read
    
    keep on the same line the option flagand the argument.

commit 7421887510ba497519e3650a836cc4708c4686ce
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 3 11:42:05 2020 +0100

    Simplify `swh deposit upload` cli options
    
    Get rid of the --archive_deposit and --metadata_deposit flags, these can
    be deduced from the presence of --archive and --metadata.
    
    Keep the cli options and advertize them as deprecated.

commit 1129a092e6718c1c7bfc8bd467d4f389066f6b65
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Nov 2 14:39:42 2020 +0100

    Refactor BaseApiDepositClient to get rid of the _client argument
    
    This argument was only there to make it easier to mock the HTTP calls
    (via a mocked requests). Thanks to the mockup capabilities, this is in
    fact not necessary. So get rid of it and replace its usage in tests by
    proper use of the mocker pytest fixture.
    
    Also:
    - refactor this BaseApiDepositClient constructor to acces directly
      "url" and "auth" kwargs instead of an unspecified generic config dict
      (still supported but deprecated),
    - get rid of a few actually not really needed fixtures (deposit_config)
    - rewrite PrivateApiDepositClientStatusUpdateTest as a couple of pytest
      functions,
    - get rid of onliners functions in  swh.deposit.cli.client (_client(),
      deposit_create, deposit_update).

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