Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

submission: uploading hepdata tarballs via API / CLI #203

Closed
kratsg opened this issue Apr 29, 2020 · 4 comments · Fixed by #219
Closed

submission: uploading hepdata tarballs via API / CLI #203

kratsg opened this issue Apr 29, 2020 · 4 comments · Fixed by #219
Assignees

Comments

@kratsg
Copy link

kratsg commented Apr 29, 2020

This is a proposal/feature [and I'm not sure this is currently supported in HEPData yet].

The idea of the workflow is that when a HEPData record is created / instantiated, it also comes with an access token (or "client secret") that allows for API access for that particular record. Then I could imagine something like this happening: hepdata upload foo.tar.gz --token ABC123abc$#@! which will upload the tarball (or update the existing one w/ versioning).

This would be useful to somehow automate the entire workflow for submission to HEPData on some level.

@GraemeWatt
Copy link
Member

Thanks for opening this issue. I remember you made this suggestion after my talk at the LHC reinterpretation workshop in London last year and I meant to record it as a GitHub issue. I think Zenodo already has this functionality (see https://developers.zenodo.org), so it would probably be possible with HEPData if the appropriate software tools were developed.

@kratsg
Copy link
Author

kratsg commented Apr 29, 2020

This might be very much ATLAS-specific, but I'll explain our organization a little bit. We use GitLab for our publication process, and make a group for each analysis -- which contains multiple repositories for the internal documentation as well as the paper in-progress.

I was thinking of extending this to also create a "HEPData" project/repository as well, which would contain the CI that does the HEPData checks we do internally in the collaboration, as well as preparing the HEPData for submission, and then submit ("deploy"). It would finish up that chain there, plus makes it very highly-trackable for us.

@GraemeWatt
Copy link
Member

@kratsg: CLI or API upload to HEPData records is now possible with v0.2.0 of hepdata-cli released today. The appropriate upload command is included in the automated invitation emails sent to Uploaders and it could be run in a CI/CD workflow. We decided to require authentication with an email address and password in addition to an access token for greater security. Please ensure that the user's password is not stored in plain text on any GitLab repositories (even if access is restricted to ATLAS collaborators). Credentials could be set as encrypted environment variables passed to the hepdata-cli upload command, e.g.

hepdata-cli upload submission.tar.gz -e $HEPDATA_EMAIL -r $HEPDATA_RECORD -i $HEPDATA_COOKIE -s False -p $HEPDATA_PASSWORD

@kratsg
Copy link
Author

kratsg commented Oct 16, 2020

./cc @madbaron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants