From 777f59ca150a2608e85c640522fa1867294f4d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Cl=C3=A9net?= Date: Thu, 5 Sep 2024 15:35:56 +0200 Subject: [PATCH] Updating parsers after changes in default_graph --- bids_prov/afni/afni_parser.py | 3 ++- bids_prov/fsl/fsl_parser.py | 2 +- bids_prov/spm/spm_parser.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bids_prov/afni/afni_parser.py b/bids_prov/afni/afni_parser.py index d1ab9a7a6..b4692babd 100644 --- a/bids_prov/afni/afni_parser.py +++ b/bids_prov/afni/afni_parser.py @@ -454,7 +454,8 @@ def afni_to_bids_prov(filename: str, context_url=CONTEXT_URL, output_file=None, """ commands_block = readlines(filename) - graph, agent_id = get_default_graph(label="AFNI", context_url=context_url, soft_ver=soft_ver) + graph, agent_id = get_default_graph( + soft_label="AFNI", context_url=context_url, soft_version=soft_ver) records, bloc_act = build_records(commands_block, agent_id, verbose=verbose) graph["Records"].update(records) diff --git a/bids_prov/fsl/fsl_parser.py b/bids_prov/fsl/fsl_parser.py index 29315854d..2aec75bc4 100644 --- a/bids_prov/fsl/fsl_parser.py +++ b/bids_prov/fsl/fsl_parser.py @@ -525,7 +525,7 @@ def fsl_to_bids_prov(filename: str, context_url=CONTEXT_URL, output_file=None, soft_ver="xxx", indent=2, verbose=False) -> bool: # TODO : add fsl version graph, agent_id = get_default_graph( - label="FSL", context_url=context_url, soft_ver=soft_ver) + soft_label="FSL", context_url=context_url, soft_version=soft_ver) lines = readlines(filename) records = build_records(lines, agent_id) diff --git a/bids_prov/spm/spm_parser.py b/bids_prov/spm/spm_parser.py index 7306192cb..8b75cd6c1 100644 --- a/bids_prov/spm/spm_parser.py +++ b/bids_prov/spm/spm_parser.py @@ -427,7 +427,8 @@ def spm_to_bids_prov(filename: str, context_url=CONTEXT_URL, output_file=None, s If true, nothing is written in memory because the existing file (if it exists) contains the same content. """ - graph, agent_id = get_default_graph(label="SPM", context_url=context_url, soft_ver=spm_ver) + graph, agent_id = get_default_graph( + soft_label='SPM', context_url=context_url, soft_version=spm_ver) lines = readlines(filename) tasks = group_lines(lines) # same as list(lines) to expand generator records = get_records(tasks, agent_id, verbose=verbose)