cthoyt / zenodo-client

A tool for automated uploading and version management of scientific data to Zenodo
MIT License
25 stars 5 forks source link

Add toggle for publishing #28

Closed nuest closed 5 months ago

nuest commented 12 months ago

This is the first part of #23

nuest commented 12 months ago

I had to add considerable timeouts to the post requests, maybe the new sandbox has some throttling issues? I also got a few 504 Gateway Timeout errors on the "publish" action, but the record is published just fine in the sandbox, see https://sandbox.zenodo.org/records/10001337

cthoyt commented 12 months ago

@nuest maybe you're aware, but Zenodo just did a full backend upgrade last week. It might be the case that the zenodo-client doesn't work at all anymore, I haven't had time to look and see to what extent the API changed

nuest commented 12 months ago

I was aware, but I rather attributed this to performance issues with the sandbox.

Let me check if I can see what changed for the publish action!

nuest commented 12 months ago

Well https://developers.zenodo.org/ seems down, so I think we'll have to revisit this later.

nuest commented 12 months ago

It seems like the client hast do create a draft first, and that the action URL for publishing then also changes:

https://inveniordm.docs.cern.ch/reference/rest_api_drafts_records/#edit-a-published-record-create-a-draft-record-from-a-published-record

I somehow see the needed changes, but your are the more experienced Python developer and it's your library, so I'll wait for you how to handle this. It seems there is no edit action anymore, but you go POST .../draft. So, the internal function _action(...) probably needs quite a few changes.

nuest commented 11 months ago

@cthoyt https://developers.zenodo.org/ is back up, so that's at least a chance to take a look at the changes. It's hard for me to commit a specific amount of time, but it would be really useful to get the lib working again, so let me know if you need help, e.g., with testing.

nuest commented 10 months ago

@cthoyt Hi! :wave: Did you give the API updates a look? Shall I rebase my changes, or can I do some testing?

cthoyt commented 10 months ago

@nuest thanks, I updated with the new API in 0468a69ba773b8ac8d93d504711df2eff26cb2d0 and updated your branch. I also moved some of the new docs out of the README and into the more detailed docs, to de-clutter the front page. It appears there's still some issues with you missing a zenodo API token in your github secrets. I will try and improve the error message to make this more obvious, but the short version is you need to have this

Screenshot 2023-12-11 at 15 27 26

when you navigate to https://github.com/nuest/zenodo-client/settings/secrets/actions

cthoyt commented 5 months ago

Superseded by #36