Page MenuHomeSoftware Heritage

api/deposit_status: Make swh-id be a directory id derivative
ClosedPublic

Authored by ardumont on Jul 20 2018, 3:34 PM.

Details

Summary

Adds:

  • swh-id as directory derivative persistent identifier
  • swh-id-context the same as swh-id with origin as context in the pid
  • swh-anchor-id as revision derivative persistent identifier
  • swh-anchor-id-context the same as swh-anchor-id with origin as context in the pid

Impacts:

  • deposit status api
  • private deposit update api
  • loader
  • deposit client (returned status endpoint result)

Related T1152

Note that you cannot arc patch locally this diff as the commit parent
is the prior opened diff (D394).

Test Plan

Tests are ok

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

swh/deposit/client/__init__.py
375

I disklike that part.

Since the recent changes on the xml parsing, i think we can now merge the way it's done between server and client part (meaning, we could and should use the same code ;).

As that has nothing to do with the current diff, I will refactor this in another commit (and diff).
That should not be a blocker for that part ;)

swh/deposit/loader/loader.py
112

It's a dict of one key (revision id) and the associated full dict.
So here, we solve the id to retrieve further information (directory id) after that.
That's the current state of the loader.

swh/deposit/migrations/0014_auto_20180720_1221.py
11

That's why i cannot make a diff starting from master...
If i do, when you'll try to 'mount' the db model, that will fail as that does not exist in master (it's another branch)...

ardumont added inline comments.
swh/deposit/client/__init__.py
375

done in D397

This revision was not accepted when it landed; it landed in state Needs Review.Jul 23 2018, 11:56 AM
This revision was automatically updated to reflect the committed changes.
ardumont marked an inline comment as done.