Motivations:
- it was never implemented because we don't currently need it
- if we ever need it, we might go for SWORDv3's ByReference instead
Differential D4646
Remove specifications of the sparse deposit. vlorentz on Dec 2 2020, 12:35 PM. Authored by
Details
Motivations:
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D4646 (id=16482)Could not rebase; Attempt merge onto b7eac04c53... Updating b7eac04c..02459db1 Fast-forward docs/metadata.rst | 30 +++- docs/specs/index.rst | 1 - docs/specs/metadata_example.xml | 6 +- docs/specs/spec-loading.rst | 3 +- docs/specs/spec-meta-deposit.rst | 1 - docs/specs/spec-sparse-deposit.rst | 100 ----------- docs/specs/swh.xsd | 27 ++- docs/user-manual.rst | 8 +- swh/deposit/api/collection.py | 1 + swh/deposit/api/common.py | 80 +++++++-- swh/deposit/tests/api/test_collection.py | 131 ++++++++++++-- swh/deposit/tests/api/test_collection_post_atom.py | 190 +++++++++++++++++---- .../tests/api/test_collection_post_metadata.py | 2 +- .../api/test_deposit_private_read_metadata.py | 5 +- swh/deposit/tests/api/test_deposit_update.py | 98 ++++++++++- swh/deposit/tests/conftest.py | 5 +- swh/deposit/tests/data/atom/codemeta-sample.xml | 6 + .../tests/data/atom/entry-data-no-origin-url.xml | 26 +++ .../data/atom/entry-data-with-add-to-origin.xml | 13 ++ ...in.xml => entry-data-with-origin-reference.xml} | 0 swh/deposit/tests/data/atom/entry-data0.xml | 9 +- swh/deposit/tests/data/atom/entry-data2.xml | 9 +- .../tests/data/atom/entry-only-create-origin.xml | 10 ++ swh/deposit/tests/data/atom/error-with-decimal.xml | 10 +- ...-with-external-identifier-and-create-origin.xml | 14 ++ .../data/atom/error-with-external-identifier.xml | 3 +- .../error-with-reference-and-create-origin.xml | 16 ++ swh/deposit/tests/data/atom/metadata.xml | 10 +- 28 files changed, 625 insertions(+), 189 deletions(-) delete mode 100644 docs/specs/spec-sparse-deposit.rst create mode 100644 swh/deposit/tests/data/atom/entry-data-no-origin-url.xml create mode 100644 swh/deposit/tests/data/atom/entry-data-with-add-to-origin.xml rename swh/deposit/tests/data/atom/{entry-data-with-origin.xml => entry-data-with-origin-reference.xml} (100%) create mode 100644 swh/deposit/tests/data/atom/entry-only-create-origin.xml create mode 100644 swh/deposit/tests/data/atom/error-with-external-identifier-and-create-origin.xml create mode 100644 swh/deposit/tests/data/atom/error-with-reference-and-create-origin.xml Changes applied before testcommit 02459db1eff46dbbc125453e68641d71a45aa555 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Nov 26 14:59:59 2020 +0100 Remove specifications of the sparse deposit. Motivations: 1. it was never implemented because we don't currently need it 2. if we ever need it, we might go for SWORDv3's ByReference instead commit 717ee249859749d3c1be0f03978db719d0c38472 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Nov 26 13:10:15 2020 +0100 Add tag <swh:add_to_origin>, to replace the Slug header for parent relationships. Computing origin urls based on provider url + slug is brittle. Additionally, the Slug is not designed to define relationships between deposits. commit b75ebd1a74ae6b07bfa299c9aab74ef5d48258df Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 25 19:14:26 2020 +0100 Check origin urls start with the user's provider_url To prevent any user from creating any origin url. commit 441cfe10a4b636ab3ed0311ceeb8e780a90a7e4f Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 25 19:06:33 2020 +0100 Add tag <swh:create_origin>, to replace the Slug header. Computing origin urls based on provider url + slug is brittle. Additionally, it meant basing parenting relationship on reusing values of the slug across deposit, which is clearly not in the spirit of the SWORD specification. See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/469/ for more details. Comment Actions @moranegg heads up ^ We have that reference commit so it's not lost either. Another way could have been to add the status not implemented near its title as discussed in some deposit tasks. So fine. Comment Actions Build is green Patch application report for D4646 (id=16592)Could not rebase; Attempt merge onto b7eac04c53... Updating b7eac04c..498f73cf Fast-forward docs/metadata.rst | 30 ++- docs/specs/index.rst | 1 - docs/specs/metadata_example.xml | 6 +- docs/specs/spec-loading.rst | 3 +- docs/specs/spec-meta-deposit.rst | 1 - docs/specs/spec-sparse-deposit.rst | 100 --------- docs/specs/swh.xsd | 27 ++- docs/user-manual.rst | 8 +- swh/deposit/api/collection.py | 1 + swh/deposit/api/common.py | 80 ++++++- swh/deposit/tests/api/test_collection.py | 131 +++++++++++- swh/deposit/tests/api/test_collection_post_atom.py | 234 ++++++++++++++++++--- .../tests/api/test_collection_post_metadata.py | 2 +- .../api/test_deposit_private_read_metadata.py | 5 +- swh/deposit/tests/api/test_deposit_update.py | 98 ++++++++- swh/deposit/tests/conftest.py | 5 +- swh/deposit/tests/data/atom/codemeta-sample.xml | 6 + .../tests/data/atom/entry-data-no-origin-url.xml | 26 +++ .../data/atom/entry-data-with-add-to-origin.xml | 13 ++ ...ata-with-both-add-to-origin-and-external-id.xml | 14 ++ ...a-with-both-create-origin-and-add-to-origin.xml | 16 ++ ...in.xml => entry-data-with-origin-reference.xml} | 0 swh/deposit/tests/data/atom/entry-data0.xml | 9 +- swh/deposit/tests/data/atom/entry-data2.xml | 9 +- .../tests/data/atom/entry-only-create-origin.xml | 10 + swh/deposit/tests/data/atom/error-with-decimal.xml | 10 +- ...-with-external-identifier-and-create-origin.xml | 14 ++ .../data/atom/error-with-external-identifier.xml | 3 +- .../error-with-reference-and-create-origin.xml | 16 ++ swh/deposit/tests/data/atom/metadata.xml | 10 +- 30 files changed, 699 insertions(+), 189 deletions(-) delete mode 100644 docs/specs/spec-sparse-deposit.rst create mode 100644 swh/deposit/tests/data/atom/entry-data-no-origin-url.xml create mode 100644 swh/deposit/tests/data/atom/entry-data-with-add-to-origin.xml create mode 100644 swh/deposit/tests/data/atom/entry-data-with-both-add-to-origin-and-external-id.xml create mode 100644 swh/deposit/tests/data/atom/entry-data-with-both-create-origin-and-add-to-origin.xml rename swh/deposit/tests/data/atom/{entry-data-with-origin.xml => entry-data-with-origin-reference.xml} (100%) create mode 100644 swh/deposit/tests/data/atom/entry-only-create-origin.xml create mode 100644 swh/deposit/tests/data/atom/error-with-external-identifier-and-create-origin.xml create mode 100644 swh/deposit/tests/data/atom/error-with-reference-and-create-origin.xml Changes applied before testcommit 498f73cfe8381734fc1ddc5ba04da619672c1601 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Nov 26 14:59:59 2020 +0100 Remove specifications of the sparse deposit. Motivations: 1. it was never implemented because we don't currently need it 2. if we ever need it, we might go for SWORDv3's ByReference instead commit b66cfff9e8d59156155140b8a61bc72558a9558b Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Nov 26 13:10:15 2020 +0100 Add tag <swh:add_to_origin>, to replace the Slug header for parent relationships. Computing origin urls based on provider url + slug is brittle. Additionally, the Slug is not designed to define relationships between deposits. commit b75ebd1a74ae6b07bfa299c9aab74ef5d48258df Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 25 19:14:26 2020 +0100 Check origin urls start with the user's provider_url To prevent any user from creating any origin url. commit 441cfe10a4b636ab3ed0311ceeb8e780a90a7e4f Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Wed Nov 25 19:06:33 2020 +0100 Add tag <swh:create_origin>, to replace the Slug header. Computing origin urls based on provider url + slug is brittle. Additionally, it meant basing parenting relationship on reusing values of the slug across deposit, which is clearly not in the spirit of the SWORD specification. See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/472/ for more details. |