Skip to content

Commit

Permalink
more fixes in compliance with updated context
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaumet committed Sep 4, 2023
1 parent 2f9adbc commit 4edd71b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bids_prov/spm/spm_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def get_entities_from_ext_config(conf_dic: dict, activity_name: str, activity_id
for activity in conf_dic.keys():
if activity in activity_name:
# {'name': 'segment', 'outputs': ['c1xxx.nii.gz','c2xxx.nii.gz']}
# act_preproc = next((activity for activity in records["prov:Activity"] if activity['@id'] ==
# act_preproc = next((activity for activity in records["Activities"] if activity['@id'] ==
# activity_id), None)
for output in conf_dic[activity]['outputs']:
name = conf_dic[activity]['name']
Expand Down Expand Up @@ -293,7 +293,7 @@ def get_records(task_groups: dict, agent_id: str, verbose=False) -> dict:
Returns
-------
dict[str, list]
records : dict with key "@context", ... "Records":{"prov:Agent": ..."prov:Activity":..."Entities":....}
records : dict with key "@context", ... "Records":{"prov:Agent": ..."Activities":..."Entities":....}
"""

Expand Down
2 changes: 1 addition & 1 deletion bids_prov/tests/samples_test/batch_example_spm_ref.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"version": "SPM12r7224"
}
],
"prov:Activity": [
"Activities": [
{
"@id": "urn:3f372617-f0ba-4f3a-86f0-ce2ea6ec39c1",
"Label": "Move file",
Expand Down
2 changes: 1 addition & 1 deletion bids_prov/tests/samples_test/partial_conjunction.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"version": "SPM12r7224"
}
],
"prov:Activity": [
"Activities": [
{
"@id": "urn:3f372617-f0ba-4f3a-86f0-ce2ea6ec39c1",
"Label": "Move file",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"version": "SPM12r7224"
}
],
"prov:Activity": [
"Activities": [
{
"@id": "urn:3f372617-f0ba-4f3a-86f0-ce2ea6ec39c1",
"Label": "Move file",
Expand Down
4 changes: 2 additions & 2 deletions bids_prov/tests/test_spm_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_get_records_copy_attributes():
]
)
recs = get_records(task_groups, str(uuid.uuid4()))
attrs = [activity["parameters"] for activity in recs["prov:Activity"]]
attrs = [activity["parameters"] for activity in recs["Activities"]]
assert "action.copyto" in json.dumps(attrs)


Expand All @@ -126,7 +126,7 @@ def test_get_records_attrs():
".fwhm = 5;", ]
)
recs = get_records(task_groups, "agentUUID")
attrs = [activity["parameters"] for activity in recs["prov:Activity"]]
attrs = [activity["parameters"] for activity in recs["Activities"]]
assert "4" in json.dumps(attrs)


Expand Down
2 changes: 1 addition & 1 deletion bids_prov/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_default_graph(label: str, context_url: str = CONTEXT_URL, soft_ver: str
"version": soft_ver
}
],
"prov:Activity": [],
"Activities": [],
"Entities": [],
},
}, agent_id
Expand Down

0 comments on commit 4edd71b

Please sign in to comment.