Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issues
#428 #402
Purpose
Allow original publisher of tool on Zenodo to deprecate it so newer versions (as separate record) can be published by a different user.
Current behaviour
No way to remove outdated zenodo tools from
bosh search
results.No official way to link old version of tool to a newer tool (as separate record).
New behaviour
bosh deprecate [ZID1] --zenodo-token [ZTOKEN]
Optional:
--by [ZID2]
Will add deprecate keyword to the newest version of the tool ZID1 and it will no longer appear in
bosh search
(can be made visible with--verbose
search).If argument
--by [ZID2]
is added, tool ZID1 will have an additionaldeprecated-by-doi:[ZID2]
keyword. As well as a "New versions" related identifier pointing to tool ZID2.Tool descriptor will contain field
'deprecated-by-doi': [True OR ZID2]
depending on whether ZID2 is specified with--by
flag.Implementation Detail
Added deprecate function to
bosh.py
(should update Docs).Checks existing deprecation and prompts with (Y/n) confirmation.
Uses publisher to update tool with new Keywords and Related identifier.
Added
"deprecated-by-doi": {..."type": ["string", "boolean"]...}
field to descriptor schema.Searcher in verbose mode displays deprecated status as a new results column.