Closed AndreasAlbert closed 2 years ago
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.
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
Removed python2 from setup.py now
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