diff --git a/src/hermes/commands/harvest/cff.py b/src/hermes/commands/harvest/cff.py index 4cc879b0..e333b27c 100644 --- a/src/hermes/commands/harvest/cff.py +++ b/src/hermes/commands/harvest/cff.py @@ -47,6 +47,7 @@ def __call__(self, command: HermesHarvestCommand) -> t.Tuple[t.Dict, t.Dict]: # Validate the content to be correct CFF cff_dict = self._load_cff_from_file(cff_data) + if command.settings.cff.enable_validation and not self._validate(cff_file, cff_dict): raise HermesValidationError(cff_file) @@ -54,6 +55,8 @@ def __call__(self, command: HermesHarvestCommand) -> t.Tuple[t.Dict, t.Dict]: codemeta_dict = self._convert_cff_to_codemeta(cff_data) # TODO Replace the following temp patch for #112 once there is a new cffconvert version with cffconvert#309 codemeta_dict = self._patch_author_emails(cff_dict, codemeta_dict) + if "version" in codemeta_dict: + codemeta_dict["version"] = str(codemeta_dict["version"]) # Convert Version to string return codemeta_dict, {'local_path': str(cff_file)}