Skip to content

Commit 97e65c2

Browse files
authored
Merge pull request #48 from openMetadataInitiative/prepare-release
Prepare release 0.3.0
2 parents d7d5afa + 96a57cb commit 97e65c2

File tree

7 files changed

+24
-29
lines changed

7 files changed

+24
-29
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ For more detail see #29.
4848

4949
- Update to latest openMINDS schemas and instances
5050
- Internal import statements are now sorted alphabetically
51+
52+
## Release 0.3.0 (2025-04-09)
53+
54+
- Added release candidate for openMINDS v4
55+
- Nodes in a collection are now sorted by ID.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 openMetadataInitiative
3+
Copyright (c) 2025 openMetadataInitiative
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

pipeline/src/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This module contains base classes that define interfaces
33
and contain code common to sub-classes, to avoid code duplication.
44
5-
# Copyright (c) 2023 openMetadataInitiative
5+
# Copyright (c) 2025 openMetadataInitiative
66
"""
77

88
from __future__ import annotations

pipeline/src/codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"programmingLanguage": ["Python"],
1919
"operatingSystem": ["Linux", "Windows", "macOS"],
2020
"softwareRequirements": [
21-
"Python (version >=3.7)"
21+
"Python (version >=3.8)"
2222
],
2323
"relatedLink": [
2424
"https://openminds-documentation.readthedocs.io"

pipeline/src/collection.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ def _get_blank_node_identifier(self):
6363
return fmt.format(identifier=identifier)
6464

6565
def _sort_nodes_by_id(self):
66-
sorted_nodes=dict(sorted(self.nodes.items()))
67-
self.nodes=sorted_nodes
68-
66+
sorted_nodes = dict(sorted(self.nodes.items()))
67+
self.nodes = sorted_nodes
6968

7069
def save(self, path, individual_files=False, include_empty_properties=False):
7170
"""

pipeline/src/properties.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Representations of metadata fields/properties
33
4-
# Copyright (c) 2023 openMetadataInitiative
4+
# Copyright (c) 2025 openMetadataInitiative
55
"""
66

77
from datetime import datetime, date
@@ -163,6 +163,7 @@ def deserialize(self, data):
163163
Args:
164164
data: the JSON-LD data
165165
"""
166+
166167
# todo: check data type
167168
def deserialize_item(item):
168169
if self.types == (str,):

pipeline/tests/test_collections.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -82,53 +82,43 @@ def test_collection_sort_by_id():
8282
uni1 = omcore.Organization(full_name="University of This Place", id="_:002")
8383
uni2 = omcore.Organization(full_name="University of That Place", id="_:001")
8484
person.affiliations = [
85-
omcore.Affiliation(member_of = uni1),
86-
omcore.Affiliation(member_of = uni2),
85+
omcore.Affiliation(member_of=uni1),
86+
omcore.Affiliation(member_of=uni2),
8787
]
8888

89-
c = Collection(person,uni1,uni2)
89+
c = Collection(person, uni1, uni2)
9090
output_paths = c.save("test_collection_sort_by_id.jsonld", individual_files=False, include_empty_properties=False)
91-
91+
9292
assert output_paths == ["test_collection_sort_by_id.jsonld"]
9393

9494
with open(output_paths[0]) as fp:
9595
saved_data = json.load(fp)
9696
os.remove("test_collection_sort_by_id.jsonld")
9797

98-
expected_saved_data={
98+
expected_saved_data = {
9999
"@context": {"@vocab": "https://openminds.om-i.org/props/"},
100100
"@graph": [
101101
{
102102
"@id": "_:001",
103103
"@type": "https://openminds.om-i.org/types/Organization",
104-
"fullName": "University of That Place"
104+
"fullName": "University of That Place",
105105
},
106106
{
107107
"@id": "_:002",
108108
"@type": "https://openminds.om-i.org/types/Organization",
109-
"fullName": "University of This Place"
109+
"fullName": "University of This Place",
110110
},
111111
{
112112
"@id": "_:004",
113113
"@type": "https://openminds.om-i.org/types/Person",
114114
"affiliation": [
115-
{
116-
"@type": "https://openminds.om-i.org/types/Affiliation",
117-
"memberOf": {
118-
"@id": "_:002"
119-
}
120-
},
121-
{
122-
"@type": "https://openminds.om-i.org/types/Affiliation",
123-
"memberOf": {
124-
"@id": "_:001"
125-
}
126-
}
115+
{"@type": "https://openminds.om-i.org/types/Affiliation", "memberOf": {"@id": "_:002"}},
116+
{"@type": "https://openminds.om-i.org/types/Affiliation", "memberOf": {"@id": "_:001"}},
127117
],
128118
"familyName": "Professor",
129-
"givenName": "A"
130-
}
131-
]
119+
"givenName": "A",
120+
},
121+
],
132122
}
133123

134124
assert saved_data == expected_saved_data

0 commit comments

Comments
 (0)