Skip to content

Commit

Permalink
Merge pull request #291 from softwarepub/feature/281-yaml-changes-ver…
Browse files Browse the repository at this point in the history
…sion-string-to-integerfloat-deposit-error

Convert version to string in CFF
  • Loading branch information
SKernchen authored Dec 19, 2024
2 parents c47cb79 + d1a4bd6 commit 2237728
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hermes/commands/harvest/cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ 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)

# Convert to CodeMeta using cffconvert
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)}

Expand Down

0 comments on commit 2237728

Please sign in to comment.