Page MenuHomeSoftware Heritage

cli.client: Adapt metadata generation so server side checks pass
ClosedPublic

Authored by ardumont on Wed, Oct 14, 5:55 PM.

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Wed, Oct 14, 5:55 PM
ardumont added inline comments.
swh/deposit/tests/cli/test_client.py
163

With this ^, we won't have that kind of unpleasant surprise any more.

Build is green

Patch application report for D4261 (id=15057)

Could not rebase; Attempt merge onto 4bb8a36d7a...

Updating 4bb8a36d..31779569
Fast-forward
 docs/images/.gitignore               |   2 +-
 docs/images/deposit-create-chart.png | Bin 53678 -> 0 bytes
 docs/images/deposit-create-chart.svg |  38 ++++++++++++++++++++++
 docs/images/deposit-delete-chart.png | Bin 56979 -> 0 bytes
 docs/images/deposit-delete-chart.svg |  45 ++++++++++++++++++++++++++
 docs/images/deposit-delete-chart.uml |  29 +++++++----------
 docs/images/deposit-update-chart.png | Bin 61584 -> 0 bytes
 docs/images/deposit-update-chart.svg |  51 +++++++++++++++++++++++++++++
 docs/images/deposit-update-chart.uml |  20 ++++++------
 docs/specs/blueprint.rst             |  60 +++++++++++++++++++++++------------
 swh/deposit/api/deposit_update.py    |  24 ++++++++++++++
 swh/deposit/cli/client.py            |  28 +++++++++-------
 swh/deposit/tests/cli/test_client.py |  58 +++++++++++++++++++++++++--------
 13 files changed, 281 insertions(+), 74 deletions(-)
 delete mode 100644 docs/images/deposit-create-chart.png
 create mode 100644 docs/images/deposit-create-chart.svg
 delete mode 100644 docs/images/deposit-delete-chart.png
 create mode 100644 docs/images/deposit-delete-chart.svg
 delete mode 100644 docs/images/deposit-update-chart.png
 create mode 100644 docs/images/deposit-update-chart.svg
Changes applied before test
commit 31779569861def4b7f01b527b97431a7eb69c360
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 17:51:43 2020 +0200

    cli.client: Adapt metadata generation so server side checks pass
    
    Related to T2701

commit efceba23b6ae68c53fa2885bceadcc6cc11f6dcb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 15:34:30 2020 +0200

    specs/blueprint: Align current status names and definitions
    
    Related to T2618

commit 6a9f76b85b3dc90ec78a14865245c8e97540e8b3
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 15:06:19 2020 +0200

    deposit-create-chart: Drop png and integrate svg output

commit 080ced795c5aab33ab77a67ab7b44aafc73d5107
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 14:55:15 2020 +0200

    deposit-delete-chart: Clarify schema
    
    There is no need for the while loop in there.
    Also the status ready does not exist, it's name 'deposited' status.

commit e39814c4af487fca889106b6cfe223b00f7672b7
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 14:54:30 2020 +0200

    deposit-update-chart: Clarify schema
    
    There is no need for the while loop in there

commit 92634764f00a0c561523f4fed8073cd9132a5c81
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 11:44:08 2020 +0200

    Add validation step after metadata ingestion of a metadata-only deposit
    
    Related to T2681

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

vlorentz requested changes to this revision.Thu, Oct 15, 10:33 AM
vlorentz added a subscriber: vlorentz.

thanks!

just one small request

swh/deposit/cli/client.py
98

yay, I like it when we avoid default namespaces

109–110

could you add a comment explaining which fields are mandatory (and why the duplicates, etc.)

You can probably just copy-paste my comment on T2701

This revision now requires changes to proceed.Thu, Oct 15, 10:33 AM
ardumont added inline comments.Thu, Oct 15, 10:35 AM
swh/deposit/cli/client.py
98

yes, i don't like it either, I just did not understand how to properly use those before.

109–110

ok

ardumont updated this revision to Diff 15073.Thu, Oct 15, 11:02 AM
  • Adapt according to review (add explanations)
  • Rebase

Build is green

Patch application report for D4261 (id=15073)

Could not rebase; Attempt merge onto 4bb8a36d7a...

Updating 4bb8a36d..25da12ec
Fast-forward
 docs/images/.gitignore               |   1 +
 docs/images/deposit-create-chart.png | Bin 53678 -> 0 bytes
 docs/images/deposit-delete-chart.png | Bin 56979 -> 0 bytes
 docs/images/deposit-delete-chart.uml |  29 +++++++----------
 docs/images/deposit-update-chart.png | Bin 61584 -> 0 bytes
 docs/images/deposit-update-chart.uml |  20 ++++++------
 docs/specs/blueprint.rst             |  60 +++++++++++++++++++++++------------
 swh/deposit/cli/client.py            |  57 +++++++++++++++++++++------------
 swh/deposit/tests/cli/test_client.py |  58 +++++++++++++++++++++++++--------
 9 files changed, 143 insertions(+), 82 deletions(-)
 delete mode 100644 docs/images/deposit-create-chart.png
 delete mode 100644 docs/images/deposit-delete-chart.png
 delete mode 100644 docs/images/deposit-update-chart.png
Changes applied before test
commit 25da12ec9a442447489cc216f4eec2d46f3e039b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 17:51:43 2020 +0200

    cli.client: Adapt metadata generation so server side checks pass
    
    Related to T2701

commit b82364cc41a6a6e21ba63e56314902cc2d6a14e1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 15:34:30 2020 +0200

    specs/blueprint: Align current status names and definitions
    
    Related to T2618

commit feda207e124ae25100ec8a7342031efbaede02a5
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 15:06:19 2020 +0200

    deposit-create-chart: Drop out-of-sync png sequence diagram

commit 6e894be3749922b9004c1d11c6c19973bcb030d8
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 14:54:30 2020 +0200

    deposit-update-chart: Clarify sequence diagram
    
    There is no loop, either the status is partial, either it's not. Removing it
    clarifies the reading.
    
    This also drops the out-of-sync png diagram from the repository.

commit 2576c73a490956b8fd0c9573af504dbfb7ebdadf
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 14:55:15 2020 +0200

    deposit-delete-chart: Clarify schema
    
    There is no loop, either the status is partial, either it's not. Removing it
    clarifies the reading.
    
    This drops the out-of-sync png diagram from the repository. This also renames
    the inexistent `ready` status to the correct 'deposited' status.

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

Build is green

Patch application report for D4261 (id=15079)

Could not rebase; Attempt merge onto 4bb8a36d7a...

Updating 4bb8a36d..7e05dbe4
Fast-forward
 docs/images/.gitignore               |   1 +
 docs/images/deposit-create-chart.png | Bin 53678 -> 0 bytes
 docs/images/deposit-delete-chart.png | Bin 56979 -> 0 bytes
 docs/images/deposit-delete-chart.uml |  29 +++++++----------
 docs/images/deposit-update-chart.png | Bin 61584 -> 0 bytes
 docs/images/deposit-update-chart.uml |  20 ++++++------
 docs/specs/blueprint.rst             |  60 +++++++++++++++++++++++------------
 swh/deposit/cli/client.py            |  57 +++++++++++++++++++++------------
 swh/deposit/tests/cli/test_client.py |  58 +++++++++++++++++++++++++--------
 9 files changed, 143 insertions(+), 82 deletions(-)
 delete mode 100644 docs/images/deposit-create-chart.png
 delete mode 100644 docs/images/deposit-delete-chart.png
 delete mode 100644 docs/images/deposit-update-chart.png
Changes applied before test
commit 7e05dbe497bc809f462617121d4606635a8174ef
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 17:51:43 2020 +0200

    cli.client: Adapt metadata generation so server side checks pass
    
    Related to T2701

commit 3c1c6675952e3343fb18168e26aa198487b7b102
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 15:34:30 2020 +0200

    specs/blueprint: Align current status names and definitions
    
    Related to T2618

commit d178775952b790a3f5c945635b8461a40a919cbb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 15:06:19 2020 +0200

    deposit-create-chart: Drop out-of-sync png sequence diagram

commit 6097f14b7018f2f013a16aca4653698c7182b9ae
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 14:54:30 2020 +0200

    deposit-update-chart: Clarify sequence diagram
    
    There is no loop, either the status is partial, either it's not. Removing it
    clarifies the reading.
    
    This also drops the out-of-sync png diagram from the repository.

commit 4ee6ab25853c1eb3eb9f10763a4c2f48bfd30696
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 14:55:15 2020 +0200

    deposit-delete-chart: Clarify sequence diagram
    
    There is no loop, either the status is partial, either it's not. Removing it
    clarifies the reading.
    
    This drops the out-of-sync png diagram from the repository. This also renames
    the inexistent `ready` status to the correct 'deposited' status.

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

vlorentz accepted this revision.Thu, Oct 15, 2:02 PM
This revision is now accepted and ready to land.Thu, Oct 15, 2:02 PM