Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: IntendedFor errors detected by schema validator #438

Merged
merged 8 commits into from
Apr 26, 2024

Conversation

effigies
Copy link
Contributor

I am also submitting these fixes to the OpenNeuro dataset authors.

Leaving as draft until I get through all of the validator failures.

Closes #437.

@effigies effigies marked this pull request as ready for review April 20, 2024 02:40
@effigies
Copy link
Contributor Author

effigies commented Apr 22, 2024

Status

Dataset Upstream contacted Upstream fix released
ds000117 Yes https://openneuro.org/datasets/ds000117/versions/1.0.6
ds000246 Yes https://openneuro.org/datasets/ds000246/versions/1.0.1
ds000247 Yes https://openneuro.org/datasets/ds000247/versions/1.0.2
eeg_ds003645s_hed_demo Yes
ieeg_* No upstream

@rwblair
Copy link
Member

rwblair commented Apr 22, 2024

I think the leading slash should be required, it was tripping up the exists/filetree.contains check in the schema validator due to how the string was being split.

https://bids-specification.readthedocs.io/en/stable/common-principles.html#specification-of-paths
"Throughout BIDS all such paths MUST be specified using the slash character (/), regardless of the operating system that a particular dataset is curated on or used on."

I'm a fool.

@effigies
Copy link
Contributor Author

That's the separator, not the initializer. It's followed with:

Paths SHOULD NOT be absolute local paths [...]

Which I would interpret to mean that they shouldn't have an initial /?

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's/\\(.*IntendedFor.: .\\)sub-.../\\1/' sub-01/ses-meg/meg/sub-01_ses-meg_coordsystem.json sub-02/ses-meg/meg/sub-02_ses-meg_coordsystem.json sub-03/ses-meg/meg/sub-03_ses-meg_coordsystem.json sub-04/ses-meg/meg/sub-04_ses-meg_coordsystem.json sub-05/ses-meg/meg/sub-05_ses-meg_coordsystem.json sub-06/ses-meg/meg/sub-06_ses-meg_coordsystem.json sub-07/ses-meg/meg/sub-07_ses-meg_coordsystem.json sub-08/ses-meg/meg/sub-08_ses-meg_coordsystem.json sub-09/ses-meg/meg/sub-09_ses-meg_coordsystem.json sub-10/ses-meg/meg/sub-10_ses-meg_coordsystem.json sub-11/ses-meg/meg/sub-11_ses-meg_coordsystem.json sub-12/ses-meg/meg/sub-12_ses-meg_coordsystem.json sub-13/ses-meg/meg/sub-13_ses-meg_coordsystem.json sub-14/ses-meg/meg/sub-14_ses-meg_coordsystem.json sub-15/ses-meg/meg/sub-15_ses-meg_coordsystem.json sub-16/ses-meg/meg/sub-16_ses-meg_coordsystem.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "ds000117"
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's/\\(.*IntendedFor.:.\\).*sub-0001\\//\\1/' sub-0001/meg/sub-0001_coordsystem.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "ds000246"
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's/\\(.*IntendedFor\":.*\"\\).*sub-000.\\//\\1/' sub-0002/ses-0001/meg/sub-0002_ses-0001_coordsystem.json sub-0003/ses-0001/meg/sub-0003_ses-0001_coordsystem.json sub-0004/ses-0001/meg/sub-0004_ses-0001_coordsystem.json sub-0006/ses-0001/meg/sub-0006_ses-0001_coordsystem.json sub-0007/ses-0001/meg/sub-0007_ses-0001_coordsystem.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "ds000247"
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's/\\(.*AssociatedEmptyRoom\":\"\\)\\//\\1/' sub-0002/ses-0001/meg/sub-0002_ses-0001_task-rest_run-01_meg.json sub-0003/ses-0001/meg/sub-0003_ses-0001_task-rest_run-01_meg.json sub-0004/ses-0001/meg/sub-0004_ses-0001_task-rest_run-01_meg.json sub-0006/ses-0001/meg/sub-0006_ses-0001_task-rest_run-01_meg.json sub-0007/ses-0001/meg/sub-0007_ses-0001_task-rest_run-01_meg.json sub-emptyroom/ses-18901014/meg/sub-emptyroom_ses-18901014_task-noise_run-01_meg.json sub-emptyroom/ses-18901015/meg/sub-emptyroom_ses-18901015_task-noise_run-01_meg.json sub-emptyroom/ses-18910228/meg/sub-emptyroom_ses-18910228_task-noise_run-01_meg.json sub-emptyroom/ses-18910303/meg/sub-emptyroom_ses-18910303_task-noise_run-01_meg.json sub-emptyroom/ses-18910512/meg/sub-emptyroom_ses-18910512_task-noise_run-01_meg.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "ds000247"
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's/\\(.*IntendedFor\":.*\"\\).*sub-03\\//\\1/' sub-004/ses-1/sub-004_ses-1_task-FacePerception_coordsystem.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "eeg_ds003645s_hed_demo"
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e '/.*IntendedFor.*/d' sub-004/ses-1/sub-004_ses-1_task-FacePerception_coordsystem.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "eeg_ds003645s_hed_demo"
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's/\\(.*IntendedFor\":.*\"\\)\\//\\1/' sub-bp/ses-01/ieeg/sub-bp_ses-01_space-ACPC_coordsystem.json sub-bp/ses-01/ieeg/sub-bp_ses-01_space-Talairach_coordsystem.json sub-ca/ses-01/ieeg/sub-ca_ses-01_space-ACPC_coordsystem.json sub-ca/ses-01/ieeg/sub-ca_ses-01_space-Talairach_coordsystem.json sub-cc/ses-01/ieeg/sub-cc_ses-01_space-ACPC_coordsystem.json sub-cc/ses-01/ieeg/sub-cc_ses-01_space-Talairach_coordsystem.json sub-de/ses-01/ieeg/sub-de_ses-01_space-Talairach_coordsystem.json sub-fp/ses-01/ieeg/sub-fp_ses-01_space-Talairach_coordsystem.json sub-gc/ses-01/ieeg/sub-gc_ses-01_space-Talairach_coordsystem.json sub-hh/ses-01/ieeg/sub-hh_ses-01_space-Talairach_coordsystem.json sub-hl/ses-01/ieeg/sub-hl_ses-01_space-ACPC_coordsystem.json sub-hl/ses-01/ieeg/sub-hl_ses-01_space-Talairach_coordsystem.json sub-jc/ses-01/ieeg/sub-jc_ses-01_space-ACPC_coordsystem.json sub-jc/ses-01/ieeg/sub-jc_ses-01_space-Talairach_coordsystem.json sub-jm/ses-01/ieeg/sub-jm_ses-01_space-Talairach_coordsystem.json sub-jt/ses-01/ieeg/sub-jt_ses-01_space-Talairach_coordsystem.json sub-rh/ses-01/ieeg/sub-rh_ses-01_space-Talairach_coordsystem.json sub-rr/ses-01/ieeg/sub-rr_ses-01_space-Talairach_coordsystem.json sub-ug/ses-01/ieeg/sub-ug_ses-01_space-Talairach_coordsystem.json sub-wc/ses-01/ieeg/sub-wc_ses-01_space-ACPC_coordsystem.json sub-wc/ses-01/ieeg/sub-wc_ses-01_space-Talairach_coordsystem.json sub-zt/ses-01/ieeg/sub-zt_ses-01_space-ACPC_coordsystem.json sub-zt/ses-01/ieeg/sub-zt_ses-01_space-Talairach_coordsystem.json",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "ieeg_motorMiller2007"
}
^^^ Do not change lines above ^^^
effigies added a commit to bids-standard/bids-validator that referenced this pull request Apr 26, 2024
@effigies effigies merged commit 47c4da1 into bids-standard:master Apr 26, 2024
7 checks passed
@effigies effigies deleted the fix/intended_fors branch April 26, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad IntendedFors being caught by schema validator
2 participants