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/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 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"),