Page MenuHomeSoftware Heritage

client: Open a paginated list user deposits endpoint
ClosedPublic

Authored by ardumont on May 24 2021, 4:02 PM.

Details

Summary

Next step is to actually open the cli endpoint which will use this to allow deposit
listing [1].

[1] D5770

Related to T2996

Test Plan

tox

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

Build is green

Patch application report for D5769 (id=20631)

Rebasing onto 63c1bc3e0d...

Current branch diff-target is up to date.
Changes applied before test
commit 772df89c40fbc1c949a8fac4d08ae333ae18a7dd
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon May 24 15:55:05 2021 +0200

    client: Open a paginated list user deposits endpoint
    
    Related to T2996

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

Check also the main public api client class

Build is green

Patch application report for D5769 (id=20632)

Rebasing onto 63c1bc3e0d...

Current branch diff-target is up to date.
Changes applied before test
commit 82a8482c9faace59de4976a11aa0c2b79b3a4998
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon May 24 15:55:05 2021 +0200

    client: Open a paginated list user deposits endpoint
    
    Related to T2996

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

  • Drop unneeded comment
  • Make the dict reading instructions more resilient for edge cases

Build is green

Patch application report for D5769 (id=20633)

Rebasing onto 63c1bc3e0d...

Current branch diff-target is up to date.
Changes applied before test
commit fdae25cdd6d9673424c2bc3ea2b6b057c10856b9
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon May 24 15:55:05 2021 +0200

    client: Open a paginated list user deposits endpoint
    
    Related to T2996

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

douardda added inline comments.
swh/deposit/client.py
277–279

I'm always nervous seeing a mutable structure used as default value of a method/function... Canot it be a headers: Option[Dict} = None instead?

swh/deposit/client.py
277–279

Sure.

ardumont edited the summary of this revision. (Show Details)

Adapt according to suggestion

Build is green

Patch application report for D5769 (id=20640)

Rebasing onto 63c1bc3e0d...

Current branch diff-target is up to date.
Changes applied before test
commit 2813abc24c34326709899276c8bae0077083e680
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon May 24 15:55:05 2021 +0200

    client: Open a paginated list user deposits endpoint
    
    Related to T2996

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

Build is green

Patch application report for D5769 (id=20642)

Rebasing onto 63c1bc3e0d...

Current branch diff-target is up to date.
Changes applied before test
commit 88f4ffd13ed4f38a12ff3684f52a09a5d79a19f0
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon May 24 15:55:05 2021 +0200

    client: Open a paginated list user deposits endpoint
    
    Related to T2996

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

I'd like to make a few changes to the endpoint first, that will require changing this diff, so I'll review this later if you don't mind

I'd like to make a few changes to the endpoint first, that will require changing this diff, so I'll review this later if you don't mind

Sure. I guess it's [1] or is there more to it?

[1] D5778

Rebase and adapt according to latest work on the server side implementation

Build is green

Patch application report for D5769 (id=20659)

Rebasing onto 77c229331e...

Current branch diff-target is up to date.
Changes applied before test
commit 104a4e379941b1e95a06e986bd3ca49b4c6cd429
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon May 24 15:55:05 2021 +0200

    client: Open a paginated list user deposits endpoint
    
    Related to T2996

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

vlorentz added inline comments.
swh/deposit/client.py
494

ugh... I hate xmltodict...

This revision is now accepted and ready to land.May 25 2021, 3:32 PM