From 54a4a11c2e001a73cfad301ae7b562617868db82 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Wed, 4 Jun 2025 12:52:54 +0200 Subject: [PATCH 1/2] use openMINDS version 3, rather than "latest" --- bids2openminds/main.py | 4 ++-- bids2openminds/utility.py | 6 +++--- pyproject.toml | 2 +- test/test_person.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bids2openminds/main.py b/bids2openminds/main.py index 4639fbb..92401f4 100644 --- a/bids2openminds/main.py +++ b/bids2openminds/main.py @@ -6,8 +6,8 @@ import pandas as pd from nameparser import HumanName -import openminds.latest.core as omcore -import openminds.latest.controlled_terms as controlled_terms +import openminds.v3.core as omcore +import openminds.v3.controlled_terms as controlled_terms from openminds import IRI from .utility import table_filter, pd_table_value, file_hash, file_storage_size, detect_nifti_version diff --git a/bids2openminds/utility.py b/bids2openminds/utility.py index ba557f3..de02208 100644 --- a/bids2openminds/utility.py +++ b/bids2openminds/utility.py @@ -7,9 +7,9 @@ import pandas as pd -import openminds.latest.controlled_terms as controlled_terms -from openminds.latest.core import Hash, QuantitativeValue, ContentType -from openminds.latest.controlled_terms import UnitOfMeasurement +import openminds.v3.controlled_terms as controlled_terms +from openminds.v3.core import Hash, QuantitativeValue, ContentType +from openminds.v3.controlled_terms import UnitOfMeasurement def read_json(file_path: str) -> dict: diff --git a/pyproject.toml b/pyproject.toml index a5957f4..b4c20fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "bids2openminds" -version = "0.1.0" +version = "0.1.1.dev.0" dependencies = [ "bids", "openminds >= 0.2.3", diff --git a/test/test_person.py b/test/test_person.py index a76cbfe..6dd5371 100644 --- a/test/test_person.py +++ b/test/test_person.py @@ -1,7 +1,7 @@ # test for create_openminds_person function in the main import pytest from bids2openminds.main import create_openminds_person -import openminds.latest.core as omcore +import openminds.v3.core as omcore # Test data: (full_name, given_name, family_name) example_names = [("John Ronald Reuel Tolkien", "John Ronald Reuel", "Tolkien"), From 748711d091279f16a89b8af86f3548425ec1df85 Mon Sep 17 00:00:00 2001 From: Peyman Najafi Date: Thu, 5 Jun 2025 12:03:48 +0200 Subject: [PATCH 2/2] Update report.py --- bids2openminds/report.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bids2openminds/report.py b/bids2openminds/report.py index 5c1affb..440a158 100644 --- a/bids2openminds/report.py +++ b/bids2openminds/report.py @@ -9,20 +9,20 @@ def create_report(dataset, dataset_version, collection, dataset_description, inp behavioral_protocols_numbers = 0 for item in collection: - if item.type_ == "https://openminds.ebrains.eu/core/Subject": + if item.type_.endswith("Subject"): subject_number += 1 subject_state_numbers.append(len(item.studied_states)) - if item.type_ == "https://openminds.ebrains.eu/core/File": + if item.type_.endswith("File"): files_number += 1 - if item.type_ == "https://openminds.ebrains.eu/core/FileBundle": + if item.type_.endswith("FileBundle"): file_bundle_number += 1 - if item.type_ == "https://openminds.ebrains.eu/core/BehavioralProtocol": + if item.type_.endswith("BehavioralProtocol"): behavioral_protocols_numbers += 1