-
Notifications
You must be signed in to change notification settings - Fork 58
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
[ENH] update validator page #572
Open
Remi-Gau
wants to merge
2
commits into
main
Choose a base branch
from
validator
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,18 +5,18 @@ that checks if a dataset is compliant with the BIDS standard. | |||||
The validator is available for use within several different environments | ||||||
to best suit individual user preferences and use cases, those versions are: | ||||||
|
||||||
- A web browser based version | ||||||
- Command line version | ||||||
- Docker based version | ||||||
- A python library installable via pip | ||||||
- [A web browser based version](https://bids-standard.github.io/bids-validator/) | ||||||
- [Command line version](https://bids-validator.readthedocs.io/en/latest/user_guide/command-line.html) | ||||||
- [Docker based version](https://hub.docker.com/r/bids/validator) | ||||||
- A [python library](https://github.com/bids-standard/python-validator) installable from [pypi](https://pypi.org/project/bids-validator/) or [conda-forge](https://anaconda.org/conda-forge/bids-validator) | ||||||
|
||||||
Instructions to install and use these versions can be found | ||||||
within the [quickstart guide](https://github.com/bids-standard/bids-validator) | ||||||
at the BIDS Validator repository. | ||||||
|
||||||
## Data Privacy and Confidentiality | ||||||
|
||||||
Please note that the web app is entirely browser(not server) based. | ||||||
Please note that the web app is entirely browser (not server) based. | ||||||
As such, there is no file uploading as part of the validation. | ||||||
|
||||||
## Browser Version | ||||||
|
@@ -25,7 +25,7 @@ As such, there is no file uploading as part of the validation. | |||||
It requires that you use the Chrome or Firefox browser, | ||||||
since those are the only ones in which you can select a whole folder rather than individual files. | ||||||
|
||||||
![home](../assets/img/YD38eTE.png) | ||||||
![home](https://github.com/bids-standard/bids-validator/raw/main/docs/_static/web_entrypoint_dark.png#gh-dark-mode-only) | ||||||
|
||||||
1. You can then choose the **folder** that you wish to validate | ||||||
|
||||||
|
@@ -36,126 +36,91 @@ As such, there is no file uploading as part of the validation. | |||||
This response indicates that your dataset is not BIDS compliant. | ||||||
Try following the suggestions listed to make the appropriate corrections. | ||||||
|
||||||
![Error](../assets/img//PEz9hbd.png) | ||||||
![Error](../assets/img/validator_error.png) | ||||||
|
||||||
!!! warning | ||||||
|
||||||
This response indicates that your dataset is BIDS compliant, | ||||||
but there are some non-critical problems | ||||||
(such as optional fields missing, or differences between participants). | ||||||
(such as recommended fields missing, or differences between participants). | ||||||
|
||||||
![Warning](../assets/img//Gqwc1q9.png) | ||||||
![Warning](../assets/img/validator_warning.png) | ||||||
|
||||||
!!! success "Success :rocket:" | ||||||
|
||||||
This response indicates that your folder contains a valid BIDS Dataset! | ||||||
|
||||||
![Valid](../assets/img/DPFVXOR.png) | ||||||
<!-- ![Valid](../assets/img/DPFVXOR.png) --> | ||||||
|
||||||
## Command Line Version | ||||||
|
||||||
### Verifying a BIDS compliant data set | ||||||
|
||||||
After [installation with npm](https://github.com/bids-standard/bids-validator) | ||||||
After [installation with deno](https://bids-validator.readthedocs.io/en/latest/user_guide/command-line.html#using-the-command-line) | ||||||
using the CLI is relatively simple. | ||||||
Locate a bids data set similar to the one below: | ||||||
|
||||||
```bash | ||||||
user@host:~/bids-examples$ tree sub001/ | ||||||
user@host:~/bids-examples$ tree pet001 | ||||||
|
||||||
sub001/ | ||||||
├── dataset_description.json | ||||||
├── participants.json | ||||||
├── participants.tsv | ||||||
├── README | ||||||
└── sub-01 | ||||||
├── ses-baseline | ||||||
│ ├── anat | ||||||
│ │ ├── sub-01_ses-baseline_T1w.json | ||||||
│ │ └── sub-01_ses-baseline_T1w.nii.gz | ||||||
│ └── pet | ||||||
│ ├── sub-01_ses-baseline_pet.json | ||||||
│ └── sub-01_ses-baseline_pet.nii.gz | ||||||
└── ses-intervention | ||||||
└── ses-01 | ||||||
├── anat | ||||||
│ ├── sub-01_ses-intervention_T1w.json | ||||||
│ └── sub-01_ses-intervention_T1w.nii.gz | ||||||
│ ├── sub-01_ses-01_T1w.json | ||||||
│ └── sub-01_ses-01_T1w.nii | ||||||
└── pet | ||||||
├── sub-01_ses-intervention_task-eyes_events.json | ||||||
├── sub-01_ses-intervention_task-eyes_events.tsv | ||||||
├── sub-01_ses-intervention_task-eyes_pet.json | ||||||
└── sub-01_ses-intervention_task-eyes_pet.nii.gz | ||||||
├── sub-01_ses-01_trc-CIMBI36_pet.json | ||||||
├── sub-01_ses-01_trc-CIMBI36_pet.nii.gz | ||||||
├── sub-01_ses-01_trc-CIMBI36_recording-autosampler_blood.json | ||||||
├── sub-01_ses-01_trc-CIMBI36_recording-autosampler_blood.tsv | ||||||
├── sub-01_ses-01_trc-CIMBI36_recording-manual_blood.json | ||||||
└── sub-01_ses-01_trc-CIMBI36_recording-manual_blood.tsv | ||||||
``` | ||||||
|
||||||
Now simply point the bids validator at the folder path of the subject(s) in | ||||||
question: | ||||||
Now simply point the bids validator at the folder path of the subject(s) in question: | ||||||
|
||||||
```bash | ||||||
user@host:~/bids-examples$ bids-validator sub001 | ||||||
user@host:~/bids-examples$ bids-validator pet001 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably prefer to give an accurate command, though I can see the argument that simple might be better here:
Suggested change
|
||||||
``` | ||||||
|
||||||
### Types of Feedback | ||||||
|
||||||
!!! failure "Error" | ||||||
|
||||||
As is the case w/ the browser or any version of the validator follow | ||||||
the `[ERR]` messages and correct until bids-validator returns 0 errors after running. | ||||||
As is the case with the browser or any version of the validator follow | ||||||
the `[ERROR]` messages and correct until bids-validator returns 0 errors after running. | ||||||
|
||||||
```bash | ||||||
user@host:~/bids-examples$ bids-validator sub001 | ||||||
|
||||||
[email protected] | ||||||
|
||||||
1: [ERR] Invalid JSON file. The file is not formatted according the schema. (code: 55 - JSON_SCHEMA_VALIDATION_ERROR) | ||||||
./sub-01/ses-baseline/pet/sub-01_ses-baseline_pet.json | ||||||
Evidence: should have property InjectedRadioactivityUnits when property InjectedRadioactivity is present | ||||||
./sub-01/ses-baseline/pet/sub-01_ses-baseline_pet.json | ||||||
Evidence: should have required property 'InjectedMassUnits' | ||||||
... | ||||||
... | ||||||
... and 3 more files having this issue (Use --verbose to see them all). | ||||||
|
||||||
Please visit https://neurostars.org/search?q=JSON_SCHEMA_VALIDATION_ERROR for existing conversations about this issue. | ||||||
|
||||||
|
||||||
Summary: Available Tasks: Available Modalities: | ||||||
14 Files, 5.72MB T1w | ||||||
1 - Subject pet | ||||||
2 - Sessions events | ||||||
|
||||||
[ERROR] NIFTI_HEADER_UNREADABLE We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled. | ||||||
/sub-01/ses-01/anat/sub-01_ses-01_T1w.nii | ||||||
|
||||||
If you have any questions, please post on https://neurostars.org/tags/bids. | ||||||
Please visit https://neurostars.org/search?q=NIFTI_HEADER_UNREADABLE for existing conversations about this issue. | ||||||
``` | ||||||
|
||||||
!!! warning | ||||||
|
||||||
As stated with the browser version above, one may elect to ignore warnings, | ||||||
but the information provided via the validator should help to pinpoint | ||||||
where and how to resolve some of these warnings. | ||||||
When in doubt consult the [BIDS Spec](https://bids-specification.readthedocs.io/en/latest/) | ||||||
When in doubt consult the [BIDS specification](https://bids-specification.readthedocs.io/en/latest/) | ||||||
|
||||||
```bash | ||||||
user@host:~/bids-examples$ bids-validator sub001/ | ||||||
[WARNING] JSON_KEY_RECOMMENDED A JSON file is missing a key listed as recommended. | ||||||
DatasetType | ||||||
/dataset_description.json | ||||||
|
||||||
[email protected] | ||||||
GeneratedBy | ||||||
/dataset_description.json | ||||||
|
||||||
1: [WARN] Tabular file contains custom columns not described in a data dictionary (code: 82 - CUSTOM_COLUMN_WITHOUT_DESCRIPTION) | ||||||
./sub-01/func/sub-01_task-balloonanalogrisktask_run-01_events.tsv | ||||||
... | ||||||
... | ||||||
... and 38 more files having this issue (Use --verbose to see them all). | ||||||
SourceDatasets | ||||||
/dataset_description.json | ||||||
|
||||||
Please visit https://neurostars.org/search?q=CUSTOM_COLUMN_WITHOUT_DESCRIPTION for existing conversations about this issue. | ||||||
|
||||||
|
||||||
Summary: Available Tasks: Available Modalities: | ||||||
134 Files, 411.53KB balloon analog risk task T1w | ||||||
16 - Subjects inplaneT2 | ||||||
1 - Session bold | ||||||
events | ||||||
|
||||||
|
||||||
If you have any questions, please post on https://neurostars.org/tags/bids. | ||||||
Please visit https://neurostars.org/search?q=JSON_KEY_RECOMMENDED for existing conversations about this issue. | ||||||
``` | ||||||
|
||||||
!!! success "Success :rocket:" | ||||||
|
@@ -164,15 +129,10 @@ user@host:~/bids-examples$ bids-validator sub001 | |||||
|
||||||
```bash | ||||||
user@host:~/bids-examples$ bids-validator sub001 | ||||||
[email protected] | ||||||
|
||||||
This dataset appears to be BIDS compatible. | ||||||
|
||||||
Summary: Available Tasks: Available Modalities: | ||||||
12 Files, 218.75KB T1w | ||||||
1 - Subject pet | ||||||
1 - Session blood | ||||||
|
||||||
Summary: Available Tasks: Available Modalities: | ||||||
12 Files, 224 kB PET | ||||||
1 - Subjects 1 - Sessions MRI | ||||||
|
||||||
If you have any questions, please post on https://neurostars.org/tags/bids | ||||||
If you have any questions, please post on https://neurostars.org/tags/bids. | ||||||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main change of the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTML version
https://bids-website--572.org.readthedocs.build/en/572/tools/validator.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@effigies maybe have a quick look at the html page see if there is anything I should add for now.