Skip to content

Commit

Permalink
Don't check data file size for old schema versions
Browse files Browse the repository at this point in the history
* Closes #53.
GraemeWatt committed Aug 16, 2023
1 parent 8a56cb8 commit 4bd9005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hepdata_validator/full_submission_validator.py
Original file line number Diff line number Diff line change
@@ -315,8 +315,8 @@ def _check_doc(self, doc):
)
return is_valid_submission_doc

file_size = os.path.getsize(data_file_path)
if file_size > INDIVIDUAL_FILE_SIZE_LIMIT: # 10MB limit for each file
file_size = os.path.getsize(data_file_path) # 10 MB limit for each data file
if file_size > INDIVIDUAL_FILE_SIZE_LIMIT and self.schema_version >= packaging_version.parse("1.1.0"):
self._add_validation_message(
file=data_file_path,
message=f"Size of data_file '{doc['data_file']}' ({file_size} bytes) is bigger than the limit of " \

0 comments on commit 4bd9005

Please sign in to comment.