-
Notifications
You must be signed in to change notification settings - Fork 161
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
make inheritance applicability explicit for scan.json
#789
Comments
Breeding those identical files is not useful at all: - causes some pains for datalad (git-annex) since committed under annex, and if published online and identical -- there might be thousands of urls associated with that file annex key - BIDS is not explicit (yet) about possibility to have scans.json on top but it seems to follow nicely from inheritance principles. See bids-standard/bids-specification#789 and references there-in - so why waste inodes and clutter the file tree?
Breeding those identical files is not useful at all: - causes some pains for datalad (git-annex) since committed under annex, and if published online and identical -- there might be thousands of urls associated with that file annex key - BIDS is not explicit (yet) about possibility to have scans.json on top but it seems to follow nicely from inheritance principles. See bids-standard/bids-specification#789 and references there-in - so why waste inodes and clutter the file tree?
The top level files schema file says:
It contains files like:
however, due to inheritance many other files could be placed there ... for example a
I feel like with the recent clarifications in #946 this may not be so crucial anymore. But if you have a good idea for an example, why not add it 👍 |
I think the same applies to |
|
I agree with both of you Robert and Kay - but what do you think: Should we add those to the I can see both solutions. What's your opinion @tsalo? |
I am not sure what putting it in the schema would look like or what the trade-offs are. For example, a filename for one of these files can't have a |
I am reticent to directly encode the inheritance principle into the schema. At the moment,
It could have |
I think the user story - linked to which the implementational changes are to be refined - is "as a user I want a dataset with inheritance of the To refine this user story, I suggest to make a test case, see whether the validator breaks.
|
I just came across this issue as we ran into the error with the legacy validator, which does not accept a |
FWIW since original filing the number of scans.json files among openneuro datasets grew up$> ls -ls ds00*/*scans.json | nl
1 4 -rw-r----- 1 yoh datalad 656 Oct 23 2020 ds003242/scans.json
2 4 -rw-r----- 1 yoh datalad 411 Jan 18 2022 ds003812/scans.json
3 4 -rw------- 1 yoh datalad 339 Aug 22 2022 ds004141/scans.json
4 4 -rw------- 1 yoh datalad 339 Aug 22 2022 ds004142/scans.json
5 4 -rw------- 1 yoh datalad 339 Dec 19 2022 ds004331/scans.json
6 4 -rw------- 1 yoh datalad 339 May 25 2023 ds004466/scans.json
7 4 -rw------- 1 yoh datalad 186 Jun 5 11:49 ds004636/scans.json
8 4 -rw------- 1 yoh datalad 339 Sep 23 2023 ds004693/scans.json
9 4 -rw------- 1 yoh datalad 339 Apr 29 10:51 ds004920/scans.json
10 4 -rw------- 1 yoh datalad 339 Apr 29 10:54 ds004943/scans.json
11 4 -rw------- 1 yoh datalad 339 Apr 29 10:56 ds004956/scans.json
12 4 -rw------- 1 yoh datalad 339 Jun 5 11:27 ds005085/scans.json
13 4 -rw------- 1 yoh datalad 339 Jun 5 11:33 ds005123/scans.json
14 4 -rw------- 1 yoh datalad 339 Sep 23 16:09 ds005134/scans.json
15 4 -rw------- 1 yoh datalad 339 Sep 23 16:14 ds005238/scans.json
16 4 -rw------- 1 yoh datalad 645 Sep 23 16:07 ds005250/scans.json
17 4 -rw------- 1 yoh datalad 339 Sep 23 16:09 ds005365/scans.json
18 4 -rw------- 1 yoh datalad 339 Sep 23 16:10 ds005374/scans.json
19 4 -rw------- 1 yoh datalad 339 Sep 23 16:14 ds005454/scans.json
20 4 -rw------- 1 yoh datalad 385 Sep 23 16:14 ds005455/scans.json and only the earliest dataset has (only) scans.json explicitly .bidsignored: $> for f in ds00*/*scans.json ; do fs=$(dirname $f)/.bidsignore; grep -l scans.json $fs; done
ds003242/.bidsignore BIDS validation became indeed more schema and principles driven than before. As many pointed out, I think having @monique2208 , what version of legacy bids-validator did you use? I searched myself into which was presumably addressed by but didn't try 3 years ago and theoretically (and based on aforementioned openneuro datasets) should not be the case any more even with legacy one |
Agreed, the issue is comprehensively resolved in the schema validator. The legacy validator can have blind spots due to hand-written regular expressions being the validation mechanism. Adding a top-level I agree this issue can be closed, as the inheritance principle doesn't need to be repeated in the spec just because the validator failed to implement it in some circumstances. |
We were using v1.14, and we got the following error,
We are switching to the newer validator soon, so it should not be problem any longer |
…iple (#1945) * Include entity-less "scans.json" into an example of inheritance principle Clarifies #789 * Apply suggestions from code review --------- Co-authored-by: Remi Gau <[email protected]>
@robertoostenveld in #538 (comment) mentions that "using the inheritance principle there can be a scans.json at the top level". Current inheritance principle formulation seems to suggest that too, but documentation nowhere mentions
scans.json
although it could be quite a common use case.ATM I see only a single dataset with a (broken) scans.json
and which is
$> cat ds003242/.bidsignore scans.json
possibly likely because prior versions of bids-validator choked on it.
So I wonder if we should add
scans.json
?
The text was updated successfully, but these errors were encountered: