Open nuest opened 11 months ago
sure! if you are able to model some tests based on the existing ones that would be great. Similarly, some high-level documentation about this workflow would go a long way
Sure - didn't finish yesterday, more complicated for me to get into the new codebase than anticipated hoped, but I hope to have something by the end of the week.
Quick update: I have a working development version locally now and started some tests.
@cthoyt Can you briefly confirm that none of the existing functions support the updating of a not yet published deposit? update(..)
immediately creates a new version, which I don't need.
Do you have a preference how to solve this? Extend the update()
function (if updating a record, then make a new version; if updating a draft, just upload files and overwrite all metadata), or add a new function update_draft()
?
You should read the ZenodoClient.create()
function, which in three parts:
It might be sufficient to add a flag to explicitly not publish a record in this function, which leaves it in "editable" mode. Alternatively, this function can be factored into smaller pieces
I did add that flag, see work in progress here: https://github.com/cthoyt/zenodo-client/pull/23
When I want to then upload files, the only option I see is ZenodoClient.update()
, but that always starts with a new version, which I do not want.
I changed the code so that my use case should work (would like to finish that implementation first, but I think with the new parameters there should be a few more tests, to have more combinations of data/publish/new_version/files given or missing for the update()
method. That is, if you think the current approach is viable.
I've just started a project using zenodo-client and I'd find this publish toggle feature useful - @nuest @cthoyt do you have plans to finish up PR #28 soon?
@elichad the status is that the PR is nicely tested, but unfortunately there is a merge conflict due to changes I had to make based on updates to the zenodo API. If we can get those conflicts addressed, then there is a quick road towards finishing the PR
@elichad @nuest I just merged #28 and made a new release to PyPI. Is this issue complete now?
I would like to use the tool in a workflow where I want to use the prereserved DOI before publishing the record. Therefore I need to run create and upload, but not publish.
Working on a PR now, let me know if this would be a welcome feature.