Skip to content

Commit

Permalink
Merge pull request openMetadataInitiative#41 from Peyman-N/repository…
Browse files Browse the repository at this point in the history
…_IRI

Adding IRI for file repository
  • Loading branch information
apdavison authored May 17, 2024
2 parents deb2799 + fa59b62 commit 458ea7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bids2openminds/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ def create_subjects(subject_id, layout_df, layout, collection):

def create_file(layout_df, BIDS_path, collection):

BIDS_directory_path = os.path.dirname(BIDS_path)
file_repository = omcore.FileRepository()
file_repository = omcore.FileRepository(
iri=IRI(pathlib.Path(BIDS_path).absolute().as_uri()))
collection.add(file_repository)
files_list = []
for index, file in layout_df.iterrows():
Expand All @@ -306,7 +306,7 @@ def create_file(layout_df, BIDS_path, collection):
data_types = None
extension = file["extension"]
path = file["path"]
iri = IRI(pathlib.Path(path).as_uri())
iri = IRI(pathlib.Path(path).absolute().as_uri())
name = os.path.basename(path)
hashes = file_hash(path)
storage_size = file_storage_size(path)
Expand Down

0 comments on commit 458ea7e

Please sign in to comment.