Skip to content

Commit

Permalink
Merge pull request #124 from bids-standard/fix_key_soft
Browse files Browse the repository at this point in the history
Fix key for Software + Version
  • Loading branch information
cmaumet authored Sep 19, 2023
2 parents abcbc33 + 6a26142 commit 3fb2379
Show file tree
Hide file tree
Showing 72 changed files with 15,965 additions and 15,965 deletions.
6 changes: 3 additions & 3 deletions bids_prov/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def test_get_default_graph():
# Test the default arguments
graph, agent_id = get_default_graph(label)
assert graph["@context"] == CONTEXT_URL
assert graph["Records"]["prov:Agent"][0]["Label"] == label
assert graph["Records"]["Software"][0]["Label"] == label
assert agent_id is not None

# Test custom arguments
graph, agent_id = get_default_graph(label, context_url, spm_ver)
assert graph["@context"] == context_url
assert graph["Records"]["prov:Agent"][0]["Label"] == label
assert graph["Records"]["prov:Agent"][0]["version"] == spm_ver
assert graph["Records"]["Software"][0]["Label"] == label
assert graph["Records"]["Software"][0]["Version"] == spm_ver
assert agent_id is not None


Expand Down
4 changes: 2 additions & 2 deletions bids_prov/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ def get_default_graph(label: str, context_url: str = CONTEXT_URL, soft_ver: str
"@context": context_url,
"BIDSProvVersion": "dev", # TODO ?
"Records": {
"prov:Agent": [
"Software": [
{
"@id": "urn:" + agent_id,
"RRID": "RRID:SCR_007037",
"@type": "prov:SoftwareAgent",
"Label": label,
"version": soft_ver
"Version": soft_ver
}
],
"Activities": [],
Expand Down
648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_alt_onesided_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_alt_onesided_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_bi_sided_t_test_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_bi_sided_t_test_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_clustconn_18_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_clustconn_18_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_clustconn_26_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_clustconn_26_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_con_f_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_con_f_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_default_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_default_proc_bloc.jsonld

Large diffs are not rendered by default.

632 changes: 316 additions & 316 deletions examples/from_parsers/afni/afni_gam_proc.jsonld

Large diffs are not rendered by default.

466 changes: 233 additions & 233 deletions examples/from_parsers/afni/afni_gam_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_hrf_gammadiff_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_hrf_gammadiff_proc_bloc.jsonld

Large diffs are not rendered by default.

636 changes: 318 additions & 318 deletions examples/from_parsers/afni/afni_hrf_tent_proc.jsonld

Large diffs are not rendered by default.

470 changes: 235 additions & 235 deletions examples/from_parsers/afni/afni_hrf_tent_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_other_template_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_other_template_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_thr_clustfwep05_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_thr_clustfwep05_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_thr_clustunck10_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_thr_clustunck10_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_thr_voxelfdrp05_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_thr_voxelfdrp05_proc_bloc.jsonld

Large diffs are not rendered by default.

648 changes: 324 additions & 324 deletions examples/from_parsers/afni/afni_thr_voxelunct4_proc.jsonld

Large diffs are not rendered by default.

478 changes: 239 additions & 239 deletions examples/from_parsers/afni/afni_thr_voxelunct4_proc_bloc.jsonld

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions examples/from_parsers/afni/narps_do_02_pc_with_sign0.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2,126 +2,126 @@
"@context": "https://raw.githubusercontent.com/bids-standard/BEP028_BIDSprov/master/context.json",
"BIDSProvVersion": "dev",
"Records": {
"prov:Agent": [
"Software": [
{
"@id": "urn:4b894bf9-bd29-4196-ae70-53367dfdf420",
"@id": "urn:a365a7e3-6f69-48f8-aca7-ae5d99434345",
"RRID": "RRID:SCR_007037",
"@type": "prov:SoftwareAgent",
"Label": "AFNI",
"version": "afni24"
"Version": "afni24"
}
],
"Activities": [
{
"@id": "urn:aab53304-9b12-437b-806d-49e31efb24d7",
"@id": "urn:b30cc606-6137-447b-b28e-0fae2ef7dd42",
"Label": "3dpc",
"AssociatedWith": "urn:4b894bf9-bd29-4196-ae70-53367dfdf420",
"AssociatedWith": "urn:a365a7e3-6f69-48f8-aca7-ae5d99434345",
"Command": "3dpc -overwrite -mask ${dset_mask} -pcsave 5 -prefix ${dir_hyp}/PC_hyp${num} ${grp_dset}",
"Parameters": {},
"Used": [
"urn:9eed3a2e-d164-447c-b3bc-d21d5bef7b7e",
"urn:869adb8d-9320-4314-abe1-6b6d044a5c59"
"urn:7479bb7e-54b2-47ea-98d2-43c51aeaa2a4",
"urn:e693c57c-65b6-445b-b9a2-bb2d67afd32b"
]
},
{
"@id": "urn:0b7aab45-33e6-4933-87bf-1f8f951f1bb1",
"@id": "urn:70d7cd80-32f6-4994-a4d4-c3fed4e02383",
"Label": "3dresample",
"AssociatedWith": "urn:4b894bf9-bd29-4196-ae70-53367dfdf420",
"AssociatedWith": "urn:a365a7e3-6f69-48f8-aca7-ae5d99434345",
"Command": "3dresample -overwrite -prefix tmp_REF_DSET.nii.gz -master ${dset_mask} -input \"${ref_dset}\"",
"Parameters": {},
"Used": [
"urn:1eef669f-661f-4568-8142-004f40d9ce57",
"urn:9eed3a2e-d164-447c-b3bc-d21d5bef7b7e"
"urn:af9b4299-4373-4423-8478-02481413a92c",
"urn:7479bb7e-54b2-47ea-98d2-43c51aeaa2a4"
]
},
{
"@id": "urn:46658bb2-25a3-4c69-a644-fecd3b60b9ca",
"@id": "urn:f0664c49-ddd6-4d24-a5ba-c6bbf6b11662",
"Label": "3dMatch",
"AssociatedWith": "urn:4b894bf9-bd29-4196-ae70-53367dfdf420",
"AssociatedWith": "urn:a365a7e3-6f69-48f8-aca7-ae5d99434345",
"Command": "3dMatch -echo_edu -overwrite -mask ${dset_mask} -refset ${dir_hyp}/PC_hyp${num}+tlrc -inset tmp_REF_DSET.nii.gz -prefix tmp_MATCHED",
"Parameters": {},
"Used": [
"urn:f6e52004-da13-4dda-b778-6622f666c503",
"urn:6d3d46ee-7e37-43d2-8ba4-a2bb416a4b5f",
"urn:9eed3a2e-d164-447c-b3bc-d21d5bef7b7e"
"urn:8967c63f-5fc7-44a6-a350-10e4d91420e5",
"urn:b04ba5a4-7187-414c-bf95-ec135e792a53",
"urn:7479bb7e-54b2-47ea-98d2-43c51aeaa2a4"
]
},
{
"@id": "urn:6845abf4-4f03-4e1e-9fb4-e47350f39fe1",
"@id": "urn:b4cb0bba-46e0-4c70-b0ed-fc17fcc0c5d5",
"Label": "3dcalc",
"AssociatedWith": "urn:4b894bf9-bd29-4196-ae70-53367dfdf420",
"AssociatedWith": "urn:a365a7e3-6f69-48f8-aca7-ae5d99434345",
"Command": "3dcalc -echo_edu -overwrite -a ${dir_hyp}/PC_hyp${num}+tlrc -expr \"${signum}*a\" -prefix ${dir_hyp}/PC_hyp${num}_sign0.nii.gz",
"Parameters": {},
"Used": [
"urn:6d3d46ee-7e37-43d2-8ba4-a2bb416a4b5f"
"urn:b04ba5a4-7187-414c-bf95-ec135e792a53"
]
}
],
"Entities": [
{
"@id": "urn:9eed3a2e-d164-447c-b3bc-d21d5bef7b7e",
"@id": "urn:7479bb7e-54b2-47ea-98d2-43c51aeaa2a4",
"Label": "${dset_mask}",
"AtLocation": "${dset_mask}",
"digest": {
"sha256": "aad93a52efcf1938cc27b6cfe707fe2b1f74b1bd4b13217516525ff60fa0a2cd"
}
},
{
"@id": "urn:869adb8d-9320-4314-abe1-6b6d044a5c59",
"@id": "urn:e693c57c-65b6-445b-b9a2-bb2d67afd32b",
"Label": "${grp_dset}",
"AtLocation": "${grp_dset}",
"digest": {
"sha256": "b1baa298b8599a501c11bb588cf53f5f808f115ea112431351bbf5c494bb9298"
}
},
{
"@id": "urn:bca7fdff-cf83-4ed5-86ca-ce6de993d731",
"@id": "urn:7f8dcb20-fc81-454b-bfd1-236e9f7c0c4f",
"Label": "PC_hyp${num}",
"AtLocation": "${dir_hyp}/PC_hyp${num}",
"GeneratedBy": "urn:aab53304-9b12-437b-806d-49e31efb24d7",
"GeneratedBy": "urn:b30cc606-6137-447b-b28e-0fae2ef7dd42",
"digest": {
"sha256": "915832134c7f76c64fd48179b53dfb05de128b50ef451380b440cff2ec1990fb"
}
},
{
"@id": "urn:1eef669f-661f-4568-8142-004f40d9ce57",
"@id": "urn:af9b4299-4373-4423-8478-02481413a92c",
"Label": "\"${ref_dset}\"",
"AtLocation": "\"${ref_dset}\"",
"digest": {
"sha256": "be3e8ce0897c76f6b02c76da87ee56fc125ab1ea836bd57f388f3caf2df02028"
}
},
{
"@id": "urn:f6e52004-da13-4dda-b778-6622f666c503",
"@id": "urn:8967c63f-5fc7-44a6-a350-10e4d91420e5",
"Label": "tmp_REF_DSET.nii.gz",
"AtLocation": "tmp_REF_DSET.nii.gz",
"GeneratedBy": "urn:0b7aab45-33e6-4933-87bf-1f8f951f1bb1",
"GeneratedBy": "urn:70d7cd80-32f6-4994-a4d4-c3fed4e02383",
"digest": {
"sha256": "e943c60b478a75e89c043bc4a7a6e6c629c3f075007ff501f7b2ab3a253e8d3d"
}
},
{
"@id": "urn:6d3d46ee-7e37-43d2-8ba4-a2bb416a4b5f",
"@id": "urn:b04ba5a4-7187-414c-bf95-ec135e792a53",
"Label": "PC_hyp${num}",
"AtLocation": "${dir_hyp}/PC_hyp${num}+tlrc",
"digest": {
"sha256": "c04239860983b8514d0cddedd56525b497ec99d5e4c48976b7cbea1d51baf3a8"
}
},
{
"@id": "urn:8b71facf-7122-43cf-b438-a8fe71f1eb30",
"@id": "urn:39cc23bc-4f4d-4709-9250-e84f23fea27f",
"Label": "tmp_MATCHED",
"AtLocation": "tmp_MATCHED",
"GeneratedBy": "urn:46658bb2-25a3-4c69-a644-fecd3b60b9ca",
"GeneratedBy": "urn:f0664c49-ddd6-4d24-a5ba-c6bbf6b11662",
"digest": {
"sha256": "a251065c7203a21b76c1fb6acd1edb6da1c29896ad2df1f5479c71e16a29c302"
}
},
{
"@id": "urn:74ad9995-210a-4a09-96c1-021ac291fc78",
"@id": "urn:5d71ef67-fdc3-4c22-b0ce-a46353f96da6",
"Label": "PC_hyp${num}_sign0.nii.gz",
"AtLocation": "${dir_hyp}/PC_hyp${num}_sign0.nii.gz",
"GeneratedBy": "urn:6845abf4-4f03-4e1e-9fb4-e47350f39fe1",
"GeneratedBy": "urn:b4cb0bba-46e0-4c70-b0ed-fc17fcc0c5d5",
"digest": {
"sha256": "5f0818d820edebe892295ffc1dd6f69823f2fb843bc2c3b0b5304054fa227af0"
}
Expand Down
50 changes: 25 additions & 25 deletions examples/from_parsers/afni/narps_do_02_pc_with_sign0_bloc.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -2,104 +2,104 @@
"@context": "https://raw.githubusercontent.com/bids-standard/BEP028_BIDSprov/master/context.json",
"BIDSProvVersion": "dev",
"Records": {
"prov:Agent": [
"Software": [
{
"@id": "urn:881e6701-d5f6-4e1d-8b08-b0f422bfc7f7",
"@id": "urn:71935ebf-a6ab-4500-ad8b-7f5e8da5e05e",
"RRID": "RRID:SCR_007037",
"@type": "prov:SoftwareAgent",
"Label": "AFNI",
"version": "afni24"
"Version": "afni24"
}
],
"Activities": [
{
"@id": "urn:3ebb9f9c-0f46-4208-9d6b-8e296d89ad87",
"@id": "urn:f9d9798b-3574-4575-9644-32356a2670e4",
"Label": "",
"AssociatedWith": "urn:881e6701-d5f6-4e1d-8b08-b0f422bfc7f7",
"AssociatedWith": "urn:71935ebf-a6ab-4500-ad8b-7f5e8da5e05e",
"Command": "3dpc -overwrite -mask ${dset_mask} -pcsave 5 -prefix ${dir_hyp}/PC_hyp${num} ${grp_dset}; ",
"Used": [
"urn:c0771e58-a6ad-4067-a247-994db5d57566",
"urn:d751aff5-d3ee-485c-be17-647730723212"
"urn:2b4f94e0-5fc5-4ffe-bef1-0aac47d21a99",
"urn:fe638e60-c25e-4ea2-9402-d0a17266edce"
]
},
{
"@id": "urn:768bdff7-fc79-48ed-b4be-76ffa67c22a7",
"@id": "urn:c5248d48-74a5-470d-8bcb-ad95174cda17",
"Label": "bloc ...",
"AssociatedWith": "urn:881e6701-d5f6-4e1d-8b08-b0f422bfc7f7",
"AssociatedWith": "urn:71935ebf-a6ab-4500-ad8b-7f5e8da5e05e",
"Command": "3dresample -overwrite -prefix tmp_REF_DSET.nii.gz -master ${dset_mask} -input \"${ref_dset}\"; 3dMatch -echo_edu -overwrite -mask ${dset_mask} -refset ${dir_hyp}/PC_hyp${num}+tlrc -inset tmp_REF_DSET.nii.gz -prefix tmp_MATCHED; 3dcalc -echo_edu -overwrite -a ${dir_hyp}/PC_hyp${num}+tlrc -expr \"${signum}*a\" -prefix ${dir_hyp}/PC_hyp${num}_sign0.nii.gz; ",
"Used": [
"urn:eb38131d-32b2-4cbf-9b65-bb40b299df05",
"urn:c0771e58-a6ad-4067-a247-994db5d57566",
"urn:c2684b63-598f-4f5e-b259-31d0868f9fbd",
"urn:c0771e58-a6ad-4067-a247-994db5d57566",
"urn:c2684b63-598f-4f5e-b259-31d0868f9fbd"
"urn:4a3af7a0-3036-4378-9a44-c64d83423ba4",
"urn:2b4f94e0-5fc5-4ffe-bef1-0aac47d21a99",
"urn:e2161cb4-2cf0-4eea-b9fd-88b0157f0df4",
"urn:2b4f94e0-5fc5-4ffe-bef1-0aac47d21a99",
"urn:e2161cb4-2cf0-4eea-b9fd-88b0157f0df4"
]
}
],
"Entities": [
{
"@id": "urn:c0771e58-a6ad-4067-a247-994db5d57566",
"@id": "urn:2b4f94e0-5fc5-4ffe-bef1-0aac47d21a99",
"Label": "${dset_mask}",
"AtLocation": "${dset_mask}",
"digest": {
"sha256": "aad93a52efcf1938cc27b6cfe707fe2b1f74b1bd4b13217516525ff60fa0a2cd"
}
},
{
"@id": "urn:d751aff5-d3ee-485c-be17-647730723212",
"@id": "urn:fe638e60-c25e-4ea2-9402-d0a17266edce",
"Label": "${grp_dset}",
"AtLocation": "${grp_dset}",
"digest": {
"sha256": "b1baa298b8599a501c11bb588cf53f5f808f115ea112431351bbf5c494bb9298"
}
},
{
"@id": "urn:0708ea50-1d83-48c9-be2e-3871dfeb2b0a",
"@id": "urn:b5a1e0ec-f429-4dad-8195-9e71c8861dae",
"Label": "PC_hyp${num}",
"AtLocation": "${dir_hyp}/PC_hyp${num}",
"GeneratedBy": "urn:3ebb9f9c-0f46-4208-9d6b-8e296d89ad87",
"GeneratedBy": "urn:f9d9798b-3574-4575-9644-32356a2670e4",
"digest": {
"sha256": "915832134c7f76c64fd48179b53dfb05de128b50ef451380b440cff2ec1990fb"
}
},
{
"@id": "urn:c0771e58-a6ad-4067-a247-994db5d57566",
"@id": "urn:2b4f94e0-5fc5-4ffe-bef1-0aac47d21a99",
"Label": "${dset_mask}",
"AtLocation": "${dset_mask}",
"digest": {
"sha256": "aad93a52efcf1938cc27b6cfe707fe2b1f74b1bd4b13217516525ff60fa0a2cd"
}
},
{
"@id": "urn:eb38131d-32b2-4cbf-9b65-bb40b299df05",
"@id": "urn:4a3af7a0-3036-4378-9a44-c64d83423ba4",
"Label": "\"${ref_dset}\"",
"AtLocation": "\"${ref_dset}\"",
"digest": {
"sha256": "be3e8ce0897c76f6b02c76da87ee56fc125ab1ea836bd57f388f3caf2df02028"
}
},
{
"@id": "urn:c2684b63-598f-4f5e-b259-31d0868f9fbd",
"@id": "urn:e2161cb4-2cf0-4eea-b9fd-88b0157f0df4",
"Label": "PC_hyp${num}",
"AtLocation": "${dir_hyp}/PC_hyp${num}+tlrc",
"digest": {
"sha256": "c04239860983b8514d0cddedd56525b497ec99d5e4c48976b7cbea1d51baf3a8"
}
},
{
"@id": "urn:9c0f5dac-fd86-459b-b326-320b070d354c",
"@id": "urn:74a19541-23cc-4447-9e24-964b612c2b15",
"Label": "tmp_MATCHED",
"AtLocation": "tmp_MATCHED",
"GeneratedBy": "urn:768bdff7-fc79-48ed-b4be-76ffa67c22a7",
"GeneratedBy": "urn:c5248d48-74a5-470d-8bcb-ad95174cda17",
"digest": {
"sha256": "a251065c7203a21b76c1fb6acd1edb6da1c29896ad2df1f5479c71e16a29c302"
}
},
{
"@id": "urn:6aaedc63-f21c-4f7b-81ae-55afae124789",
"@id": "urn:ba85afc6-5799-4f95-8ec2-1b938e646d31",
"Label": "PC_hyp${num}_sign0.nii.gz",
"AtLocation": "${dir_hyp}/PC_hyp${num}_sign0.nii.gz",
"GeneratedBy": "urn:768bdff7-fc79-48ed-b4be-76ffa67c22a7",
"GeneratedBy": "urn:c5248d48-74a5-470d-8bcb-ad95174cda17",
"digest": {
"sha256": "5f0818d820edebe892295ffc1dd6f69823f2fb843bc2c3b0b5304054fa227af0"
}
Expand Down
Loading

0 comments on commit 3fb2379

Please sign in to comment.