Page MenuHomeSoftware Heritage

collection_list.xml: use a <feed> of <entry>s
ClosedPublic

Authored by vlorentz on May 25 2021, 2:41 PM.

Details

Summary

Instead of having a single <entry> that contains a <deposits> tag
that contains a list of <deposit>

  1. Follows the spirit of Atom
  2. Follows the AtomPub spec https://datatracker.ietf.org/doc/html/rfc5023\#section-5.2 and the SWORD spec http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html\#protocoloperations_listingcollections
  3. Consistent with the format in state.xml and deposit_receipt.xml
  4. Avoids introducing a new tag

Related to T2996

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 D5779 (id=20654)

Could not rebase; Attempt merge onto 63c1bc3e0d...

Updating 63c1bc3e..77c22933
Fast-forward
 swh/deposit/api/collection.py                     | 44 ++++++++++++++++-
 swh/deposit/api/collection_list.py                | 57 -----------------------
 swh/deposit/api/urls.py                           | 17 +------
 swh/deposit/config.py                             |  1 -
 swh/deposit/templates/deposit/collection_list.xml | 22 ++++-----
 swh/deposit/tests/api/test_collection_list.py     | 24 ++++------
 6 files changed, 63 insertions(+), 102 deletions(-)
 delete mode 100644 swh/deposit/api/collection_list.py
Changes applied before test
commit 77c229331e143860c7fda28345656c5b21bc927b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue May 25 14:40:39 2021 +0200

    collection_list.xml: use a <feed> of <entry>s
    
    Instead of having a single <entry> that contains a <deposits> tag
    that contains a list of <deposit>
    
    1. Follows the spirit of Atom
    2. Follows the AtomPub spec https://datatracker.ietf.org/doc/html/rfc5023\#section-5.2
       and the SWORD spec http://swordapp.github.io/SWORDv2-Profile/SWORDProfile.html\#protocoloperations_listingcollections
    3. Consistent with the format in state.xml and deposit_receipt.xml
    4. Avoids introducing a new tag

commit c6ac1dfe15013a60d7d6d97468d722543a22691f
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue May 25 14:30:10 2021 +0200

    Make the collection list available with 'GET Col-IRI'
    
    1. Follows the AtomPub <https://datatracker.ietf.org/doc/html/rfc5023\#section-5.2\>
       spec
    2. Discoverable from the service document
    3. Makes more sense semantically to have the list of items in a path
       at the root of that path.

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

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