From 1c7d100a5db2cdbcbde2da3ee4d13a9948552eeb Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Tue, 18 Aug 2026 09:58:59 +0200 Subject: [PATCH 1/2] fix warning about invalid escape --- pipeline/translator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/translator.py b/pipeline/translator.py index 90847026..b44cb15e 100644 --- a/pipeline/translator.py +++ b/pipeline/translator.py @@ -50,7 +50,7 @@ def customize_description(property, obj_title): elif "UBERON" in obj_title: obj_title_readable = obj_title else: - obj_title_readable = re.sub("([A-Z])", " \g<0>", obj_title).strip().lower() + obj_title_readable = re.sub("([A-Z])", r" \g<0>", obj_title).strip().lower() doc = property.get("description", "no description available") doc = doc.replace("someone or something", f"the {obj_title_readable}") doc = doc.replace("something or somebody", f"the {obj_title_readable}") From 3411b5ac7808bda87682815f9f3a653ed4766407 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Tue, 18 Aug 2026 10:10:53 +0200 Subject: [PATCH 2/2] Release 0.6.0 Update CHANGELOG and set the version identifier to 0.6.0. This is a minor rather than a patch release because #100 adds new options to `by_name()`, and because #95 and #101 both change behaviour in ways that may require changes in downstream code, even though they are bug fixes. --- CHANGELOG.md | 17 +++++++++++++++++ build.py | 2 +- pipeline/src/codemeta.json | 6 ++++++ pipeline/src/pyproject_template.toml.txt | 3 ++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1e279c5..e9e01e83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,3 +96,20 @@ For more detail see #29. ## Release 0.5.1 (2026-04-02) - Changed `embed_linked_nodes` from boolean to LinkedNodeEmbedding enum [#92](https://github.com/openMetadataInitiative/openMINDS_Python/pull/92). This adds an option "if necessary", which embeds linked nodes inline when they lack an @id, and otherwise uses a reference — useful for mixed scenarios where some nodes don't yet have identifiers. This is backwards compatible: True is accepted in place of "always" and False in place of "never. + + +## Release 0.6.0 (2026-08-18) + +Note that this release contains two changes in behaviour which, although they are bug fixes, may require changes in downstream code. See "Changes in behaviour" below. + +- New options for the `by_name()` method [#100](https://github.com/openMetadataInitiative/openMINDS_Python/pull/100): + - `case_sensitive` (default `True`); set it to `False` to ignore case when matching. + - a third `match` mode, `"within"`, which finds instances whose name-like property is contained in the string you provide (the mirror image of `"contains"`). +- Bug fixes in `by_name()` [#100](https://github.com/openMetadataInitiative/openMINDS_Python/pull/100): + - a crash when an instance did not have one of the name-like properties set. + - `by_name(..., all=True)` could return the same instance more than once, where it matched through several keys (e.g. a name that is also listed as one of its own synonyms). + +### Changes in behaviour + +- Cross-references between instance library instances are now resolved to typed openMINDS objects instead of being left as raw dicts [#95](https://github.com/openMetadataInitiative/openMINDS_Python/pull/95), fixing [#94](https://github.com/openMetadataInitiative/openMINDS_Python/issues/94). For example, `Accessibility.direct_virtual_open_access.payment_models[0]` is now a `PaymentModelType` object, where previously it was a dict. Code that treated such values as dicts will need updating. As part of this fix, `Node._resolve_links()` now keeps an unresolvable `Link` in a list-valued property rather than raising `KeyError`. +- IRI validation has moved from the `IRI` constructor to the `validate()` method [#101](https://github.com/openMetadataInitiative/openMINDS_Python/pull/101), fixing [#93](https://github.com/openMetadataInitiative/openMINDS_Python/issues/93). Creating an `IRI` with an invalid value no longer raises `ValueError`; the problem is instead reported as a validation failure, with a specific hint to replace spaces with "%20" where that would make the IRI valid. diff --git a/build.py b/build.py index 7510c962..e828ab20 100644 --- a/build.py +++ b/build.py @@ -154,7 +154,7 @@ fp.write(f"from . import ({', '.join(sorted(module_list))})\n") context = { - "version": "0.5.1", + "version": "0.6.0", } with open("target/pyproject.toml", "w") as fp: diff --git a/pipeline/src/codemeta.json b/pipeline/src/codemeta.json index 7c293558..94cfc26c 100644 --- a/pipeline/src/codemeta.json +++ b/pipeline/src/codemeta.json @@ -58,6 +58,12 @@ "@id": "https://orcid.org/0000-0003-4509-6969", "givenName": "Reema", "familyName": "Gupta" + }, + { + "@type": "Person", + "@id": "https://orcid.org/0000-0002-2247-2418", + "givenName": "Geneviève", + "familyName": "Fleury" } ] } diff --git a/pipeline/src/pyproject_template.toml.txt b/pipeline/src/pyproject_template.toml.txt index 71e231ba..6a01b8a5 100644 --- a/pipeline/src/pyproject_template.toml.txt +++ b/pipeline/src/pyproject_template.toml.txt @@ -9,7 +9,8 @@ authors = [ { name="Louisa Köhnen" }, { name="Peyman Najafi" }, { name="Raphaël Gazzotti" }, - { name="Reema Gupta" } + { name="Reema Gupta" }, + { name="Geneviève Fleury" } ] requires-python = ">=3.9" license = "MIT"