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

Validation of output tarballs #189

Merged
merged 13 commits into from
Dec 13, 2021
Merged

Validation of output tarballs #189

merged 13 commits into from
Dec 13, 2021

Conversation

AndreasAlbert
Copy link
Collaborator

With this PR, Submission.create_files now automatically calls the hepdata validator on the output file. An AssertionError is thrown if the tar ball is found to be invalid.

Closes #160

@AndreasAlbert
Copy link
Collaborator Author

I also added a new remove_old option to create_files. If set to True, the output directory is deleted before the new files are written. This ensures that no unrelated files accidentally end up in the tar ball, which the validator would identify as an error. Since many of our notebooks use the same output directory naming, consecutive execution of the notebooks -- as done in our tests -- can provoke this error if the folder is not removed between executions.

Copy link
Collaborator

@clelange clelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of hidden gems in this PR ;-)

@clelange
Copy link
Collaborator

I forgot, shall we remove Python2 support with this PR? That would mean removing it from https://github.com/HEPData/hepdata_lib/blob/master/setup.py#L30

@AndreasAlbert
Copy link
Collaborator Author

Removed python2 from setup.py now

Copy link
Collaborator

@clelange clelange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and there goes Python2!

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 this pull request may close these issues.

Validate submission created by create_files method
3 participants