Skip to content

Commit 1de5871

Browse files
authored
Merge pull request #117 from Materials-Data-Science-and-Informatics/fix/cff_format
Fix/cff format
2 parents d96bc94 + 988ded1 commit 1de5871

9 files changed

Lines changed: 47 additions & 27 deletions

File tree

.somesy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "somesy"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
description = "A CLI tool for synchronizing software project metadata."
55
keywords = ["metadata", "FAIR"]
66
license = "MIT"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Here we provide notes that summarize the most important changes in each released
44

55
Please consult the changelog to inform yourself about breaking changes and security issues.
66

7+
## [v0.7.2](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.7.2) <small>(2025-03-10)</small> { id="0.7.2" }
8+
9+
- fix CITATION.CFF formatting
10+
- fix codemeta.json missing maintainer property
11+
- fix somesy model validator missing return
12+
713
## [v0.7.1](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.7.1) <small>(2025-03-07)</small> { id="0.7.1" }
814

915
- fix poetry v2 license format and urls format problem

CITATION.cff

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ type: software
33
message: If you use this software, please cite it using this metadata.
44

55
title: somesy
6-
version: 0.7.1
6+
version: 0.7.2
77
abstract: A CLI tool for synchronizing software project metadata.
88
url: https://materials-data-science-and-informatics.github.io/somesy
99
repository-code: https://github.com/Materials-Data-Science-and-Informatics/somesy
1010
license: MIT
1111
keywords:
12-
- metadata
13-
- FAIR
12+
- metadata
13+
- FAIR
1414
authors:
15-
- orcid: https://orcid.org/0000-0003-2637-0432
16-
email: m.soylu@fz-juelich.de
17-
given-names: Mustafa
18-
family-names: Soylu
19-
- email: a.pirogov@fz-juelich.de
20-
orcid: https://orcid.org/0000-0002-5077-7497
21-
family-names: Pirogov
22-
given-names: Anton
23-
- email: v.hofmann@fz-juelich.de
24-
orcid: https://orcid.org/0000-0002-5149-603X
25-
family-names: Hofmann
26-
given-names: Volker
27-
- email: s.sandfeld@fz-juelich.de
28-
orcid: https://orcid.org/0000-0001-9560-4728
29-
family-names: Sandfeld
30-
given-names: Stefan
15+
- orcid: https://orcid.org/0000-0003-2637-0432
16+
email: m.soylu@fz-juelich.de
17+
given-names: Mustafa
18+
family-names: Soylu
19+
- email: a.pirogov@fz-juelich.de
20+
orcid: https://orcid.org/0000-0002-5077-7497
21+
family-names: Pirogov
22+
given-names: Anton
23+
- email: v.hofmann@fz-juelich.de
24+
orcid: https://orcid.org/0000-0002-5149-603X
25+
family-names: Hofmann
26+
given-names: Volker
27+
- email: s.sandfeld@fz-juelich.de
28+
orcid: https://orcid.org/0000-0001-9560-4728
29+
family-names: Sandfeld
30+
given-names: Stefan
3131
contact:
32-
- email: m.soylu@fz-juelich.de
33-
family-names: Soylu
34-
given-names: Mustafa
35-
orcid: https://orcid.org/0000-0003-2637-0432
32+
- email: m.soylu@fz-juelich.de
33+
family-names: Soylu
34+
given-names: Mustafa
35+
orcid: https://orcid.org/0000-0003-2637-0432

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ file in the root folder of your repository:
176176
repos:
177177
# ... (your other hooks) ...
178178
- repo: https://github.com/Materials-Data-Science-and-Informatics/somesy
179-
rev: 'v0.7.1'
179+
rev: 'v0.7.2'
180180
hooks:
181181
- id: somesy
182182
```

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
],
2828
"name": "somesy",
2929
"description": "A CLI tool for synchronizing software project metadata.",
30-
"version": "0.7.1",
30+
"version": "0.7.2",
3131
"keywords": [
3232
"metadata",
3333
"FAIR"

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "somesy"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
description = "A CLI tool for synchronizing software project metadata."
55
readme = "README.md"
66
keywords = [
@@ -40,6 +40,7 @@ maintainers = [
4040
{name = "Mustafa Soylu",email = "m.soylu@fz-juelich.de"},
4141
]
4242

43+
4344
license = {text = "MIT"}
4445

4546
[project.urls]

src/somesy/cff/writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def __init__(
2626
"""
2727
self._yaml = YAML()
2828
self._yaml.preserve_quotes = True
29+
self._yaml.indent(mapping=2, sequence=4, offset=2)
2930

3031
mappings: FieldKeyMapping = {
3132
"name": ["title"],

src/somesy/codemeta/writer.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ def authors(self, authors: List[Union[Person, Entity]]) -> None:
8383
authors_dict = [self._from_person(a) for a in authors]
8484
self._set_property(self._get_key("authors"), authors_dict)
8585

86+
@property
87+
def maintainers(self):
88+
"""Return the maintainers of the codemeta.json file."""
89+
return self._get_property(self._get_key("maintainers"))
90+
91+
@maintainers.setter
92+
def maintainers(self, maintainers: List[Union[Person, Entity]]) -> None:
93+
"""Set the maintainers of the project."""
94+
maintainers_dict = [self._from_person(m) for m in maintainers]
95+
self._set_property(self._get_key("maintainers"), maintainers_dict)
96+
8697
@property
8798
def contributors(self):
8899
"""Return the contributors of the codemeta.json file."""

src/somesy/core/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ def set_origin(self):
780780
"""Set the origin of the input file."""
781781
if self.config and self.config.input_file:
782782
self._origin = self.config.input_file
783+
return self
783784

784785
def is_somesy_file(self) -> bool:
785786
"""Return whether this somesy input is from a somesy config file.

0 commit comments

Comments
 (0)