SORSE / sorse.github.io

Website of the SORSE20 conference
https://sorse.github.io
Creative Commons Attribution 4.0 International
4 stars 14 forks source link

Zenodo upload #395

Closed johanphilips closed 3 years ago

johanphilips commented 3 years ago

This PR adds a script to upload the events to Zenodo and update the .md and .pdf files with the received DOIs. At this stage, the files in ci/ have phony DOIs from the Zenodo Sandbox enviornment. We should review the updated files and if all is well, run the script again on the real Zenodo platform (this basically means using a different access token)

johanphilips commented 3 years ago

One issue is that I do not store the deposition ids, so everything needs to go in one run. Let's assume you run it without --publish, then all .md and .pdfs have changed with the new DOIs but afterwards you wish to publish you have to run this again and all .mds will be skipped because they already have a DOI...

johanphilips commented 3 years ago

One issue is that I do not store the deposition ids, so everything needs to go in one run. Let's assume you run it without --publish, then all .md and .pdfs have changed with the new DOIs but afterwards you wish to publish you have to run this again and all .mds will be skipped because they already have a DOI...

I could add a return list and one line at the end of the loop: depositions.append({ 'deposition_id': deposition_id, 'event_path': path, 'published': publish}) to track if we have published items or not, and then add a function to publish based on deposition id. I assume Zenodo will allow this from within a new session.

Chilipp commented 3 years ago

I could add a return list and one line at the end of the loop: depositions.append({ 'deposition_id': deposition_id, 'event_path': path, 'published': publish}) to track if we have published items or not, and then add a function to publish based on deposition id. I assume Zenodo will allow this from within a new session.

sounds good to me. Sure, zenodo does not have a problem with this

johanphilips commented 3 years ago

I could add a return list and one line at the end of the loop: depositions.append({ 'deposition_id': deposition_id, 'event_path': path, 'published': publish}) to track if we have published items or not, and then add a function to publish based on deposition id. I assume Zenodo will allow this from within a new session.

sounds good to me. Sure, zenodo does not have a problem with this

Made the changes. not that convinced yet about the workflow, but will have another look tonight.

Chilipp commented 3 years ago

Maybe it would be good to just output the urls at the end and then one can review each submission on zenodo and publish it manually

johanphilips commented 3 years ago

Maybe it would be good to just output the urls at the end and then one can review each submission on zenodo and publish it manually

That might be easier yes, but the URL contains the token in plaintext :smile:

Chilipp commented 3 years ago

Ah sorry, I did mean the url to the archive on zenodo.org, not the url to publish it. But the latter is possible, too of course. You could just replace the token by $ZENODO_TOKEN or something similar

johanphilips commented 3 years ago

for reference, if we'd like to keep the drafted depositions and publish them :smile: I assume this will only work with my personal token, although GET https://zenodo.org/api/deposit/depositions/4298650 is accessible without $ACCESS_TOKEN

https://zenodo.org/api/deposit/depositions/4298650/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298652/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298655/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298657/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298659/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298661/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298663/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298665/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298667/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298669/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298671/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298673/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298675/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298677/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298679/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298681/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298683/actions/publish?access_token=$ACCESS_TOKEN https://zenodo.org/api/deposit/depositions/4298685/actions/publish?access_token=$ACCESS_TOKEN

Chilipp commented 3 years ago

hey @johanphilips! sorry, for the delay!

although GET https://zenodo.org/api/deposit/depositions/4298650 is accessible without $ACCESS_TOKEN

no, it's not accessible (at least not to me). I am getting the message You don't have the permission to access the requested resource. It is either read-protected or not readable by the server

if we'd like to keep the drafted depositions and publish them smile I assume this will only work with my personal token

no, we should not use them. I just merged #389 which needed some change for the latex template. If you are ok with it, I'd very much like to do it myself as I processed all the events that went on this website and know about the difficulties they have. Is this okay for you?

Anyway, I think we are good to go with this now, are we? Thank you so much for your support!

johanphilips commented 3 years ago

Ok, no problem! Go ahead and let me know if you run into issues.

On 2 Dec 2020, at 22:56, Philipp S. Sommer notifications@github.com wrote:

 hey @johanphilips! sorry, for the delay!

although GET https://zenodo.org/api/deposit/depositions/4298650 is accessible without $ACCESS_TOKEN

no, it's not accessible (at least not to me). I am getting the message You don't have the permission to access the requested resource. It is either read-protected or not readable by the server

if we'd like to keep the drafted depositions and publish them smile I assume this will only work with my personal token

no, we should not use them. I just merged #389 which needed some change for the latex template. If you are ok with it, I'd very much like to do it myself as I processed all the events that went on this website and know about the difficulties they have. Is this okay for you?

Anyway, I think we are good to go with this now, are we? Thank you so much for your support!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Chilipp commented 3 years ago

alright, I published the PDF files and they are now all accessible via https://zenodo.org/communities/sorse/search?page=1&size=50

There is another test failure in the CI but this is not related to this PR (see https://github.com/SORSE/sorse.github.io/issues/416). So let's merge this. Thanks again very much @johanphilips!

johanphilips commented 3 years ago

Cool! You're welcome, glad I could help a little bit 😄