From aca820cc0a59ca90f15e3126e5b62401cc2af82b Mon Sep 17 00:00:00 2001 From: Alison Clarke Date: Wed, 6 Oct 2021 15:35:09 +0100 Subject: [PATCH 1/2] Check schema version before checking whether all files are included --- hepdata_validator/full_submission_validator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hepdata_validator/full_submission_validator.py b/hepdata_validator/full_submission_validator.py index 6ac7c63..4d00311 100644 --- a/hepdata_validator/full_submission_validator.py +++ b/hepdata_validator/full_submission_validator.py @@ -1,6 +1,7 @@ from enum import Enum import gzip import os.path +from packaging import version as packaging_version import shutil import tempfile from urllib.parse import urlparse, urlunsplit @@ -203,7 +204,7 @@ def validate(self, directory=None, file=None, archive=None): self.valid_files[type] = [self._remove_temp_directory(self.submission_file_path)] # Check all files in directory are in included_files - if not self.single_yaml_file: + if not self.single_yaml_file and self.schema_version >= packaging_version.parse("1.1.0"): for f in os.listdir(self.directory): file_path = os.path.join(self.directory, f) if file_path not in self.included_files: From 621a207167a8328ce44e90d35ff158b531876cda Mon Sep 17 00:00:00 2001 From: Alison Clarke Date: Wed, 6 Oct 2021 15:45:15 +0100 Subject: [PATCH 2/2] Bump version --- hepdata_validator/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hepdata_validator/version.py b/hepdata_validator/version.py index 8ef5bd4..bad536b 100644 --- a/hepdata_validator/version.py +++ b/hepdata_validator/version.py @@ -27,4 +27,4 @@ from __future__ import absolute_import, print_function -__version__ = "0.3.0" +__version__ = "0.3.1"