bids-validator-deno 2.2.3__py2.py3-none-macosx_10_12_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bids_validator_deno-2.2.3.data/scripts/bids-validator-deno +0 -0
- bids_validator_deno-2.2.3.dist-info/METADATA +118 -0
- bids_validator_deno-2.2.3.dist-info/RECORD +6 -0
- bids_validator_deno-2.2.3.dist-info/WHEEL +7 -0
- bids_validator_deno-2.2.3.dist-info/entry_points.txt +4 -0
- bids_validator_deno-2.2.3.dist-info/licenses/LICENSE +20 -0
|
Binary file
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: bids-validator-deno
|
|
3
|
+
Version: 2.2.3
|
|
4
|
+
Summary: Typescript implementation of the BIDS validator
|
|
5
|
+
Keywords: BIDS,BIDS validator
|
|
6
|
+
Author: bids-standard developers
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: JavaScript
|
|
13
|
+
Project-URL: Documentation, https://bids-validator.readthedocs.io/
|
|
14
|
+
Project-URL: Source code, https://github.com/bids-standard/bids-validator
|
|
15
|
+
Project-URL: Issues, https://github.com/bids-standard/bids-validator/issues
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
[](https://github.com/bids-standard/bids-validator/actions/workflows/deno_tests.yml)
|
|
19
|
+
[](https://github.com/bids-standard/bids-validator/actions/workflows/web_build.yml)
|
|
20
|
+
[](https://bids-validator.readthedocs.io/en/latest/?badge=latest)
|
|
21
|
+
[](https://doi.org/10.5281/zenodo.3688707)
|
|
22
|
+
|
|
23
|
+
# The BIDS Validator
|
|
24
|
+
|
|
25
|
+
The BIDS Validator is a web application, command-line utility,
|
|
26
|
+
and Javascript/Typescript library for assessing compliance with the
|
|
27
|
+
[Brain Imaging Data Structure (BIDS)][BIDS] standard.
|
|
28
|
+
|
|
29
|
+
## Getting Started
|
|
30
|
+
|
|
31
|
+
In most cases,
|
|
32
|
+
the simplest way to use the validator is to browse to the [BIDS Validator][] web page:
|
|
33
|
+
|
|
34
|
+

|
|
36
|
+

|
|
38
|
+
|
|
39
|
+
The web validator runs in-browser, and does not transfer data to any remote server.
|
|
40
|
+
|
|
41
|
+
In some contexts, such as when working on a remote server,
|
|
42
|
+
it may be easier to use the command-line.
|
|
43
|
+
The BIDS Validator can be run with the [Deno][] runtime
|
|
44
|
+
(see [Deno - Installation][] for detailed installation instructions):
|
|
45
|
+
|
|
46
|
+
```shell
|
|
47
|
+
deno run -ERWN jsr:@bids/validator
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Deno by default sandboxes applications like a web browser.
|
|
51
|
+
`-E`, `-R`, `-W`, and `-N` allow the validator to read environment variables,
|
|
52
|
+
read/write local files, and read network locations.
|
|
53
|
+
|
|
54
|
+
A pre-compiled binary is published to [PyPI][] and may be installed with:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
pip install bids-validator-deno
|
|
58
|
+
bids-validator-deno --help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Configuration file
|
|
62
|
+
|
|
63
|
+
The schema validator accepts a JSON configuration file that reclassifies issues as
|
|
64
|
+
warnings, errors or ignored.
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"ignore": [
|
|
69
|
+
{ "code": "JSON_KEY_RECOMMENDED", "location": "/T1w.json" }
|
|
70
|
+
],
|
|
71
|
+
"warning": [],
|
|
72
|
+
"error": [
|
|
73
|
+
{ "code": "NO_AUTHORS" }
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The issues are partial matches of the `issues` that the validator accumulates.
|
|
79
|
+
Pass the `--json` flag to see the issues in detail.
|
|
80
|
+
|
|
81
|
+
### Development tools
|
|
82
|
+
|
|
83
|
+
From the repository root, use `./local-run` to run with all permissions enabled by default:
|
|
84
|
+
|
|
85
|
+
```shell
|
|
86
|
+
# Run from within the /bids-validator directory
|
|
87
|
+
cd bids-validator
|
|
88
|
+
# Run validator:
|
|
89
|
+
./local-run path/to/dataset
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Schema validator test suite
|
|
93
|
+
|
|
94
|
+
```shell
|
|
95
|
+
# Run tests:
|
|
96
|
+
deno test --allow-env --allow-read --allow-write src/
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This test suite includes running expected output from bids-examples and may throw some expected failures for bids-examples datasets where either the schema or validator are misaligned with the example dataset while under development.
|
|
100
|
+
|
|
101
|
+
## Modifying and building a new schema
|
|
102
|
+
|
|
103
|
+
To modify the schema a clone of bids-standard/bids-specification will need to be made. README and schema itself live here https://github.com/bids-standard/bids-specification/tree/master/src/schema.
|
|
104
|
+
|
|
105
|
+
After changes to the schema have been made to a local copy the dereferenced single json file used by the validator will need to be built. The `bidsschematools` python package does this. It can be installed from pypi via pip or a local installation can be made. It lives in the specification repository here https://github.com/bids-standard/bids-specification/tree/master/tools/schemacode
|
|
106
|
+
|
|
107
|
+
The command to compile a dereferenced schema is `bst -v export --schema src/schema --output src/schema.json` (this assumes you are in the root of the bids-specification repo). Once compiled it can be passed to the validator via the `-s` flag, `./bids-validator-deno -s <path to schema> <path to dataset>`
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## Documentation
|
|
111
|
+
|
|
112
|
+
The BIDS validator documentation is available on [Read the Docs](https://bids-validator.readthedocs.io/en/latest/).
|
|
113
|
+
|
|
114
|
+
[BIDS]: https://bids.neuroimaging.io
|
|
115
|
+
[BIDS Validator]: https://bids-standard.github.io/bids-validator/
|
|
116
|
+
[Deno]: https://deno.com/
|
|
117
|
+
[Deno - Installation]: https://docs.deno.com/runtime/getting_started/installation/
|
|
118
|
+
[PyPI]: https://pypi.org/project/bids-validator-deno/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
bids_validator_deno-2.2.3.data/scripts/bids-validator-deno,sha256=YBDUin0I-uj47XcvrXmXH7m0Jq4fRLt1QjjPeYu6Zjo,142598608
|
|
2
|
+
bids_validator_deno-2.2.3.dist-info/RECORD,,
|
|
3
|
+
bids_validator_deno-2.2.3.dist-info/WHEEL,sha256=hUK_eJQZ3NYn4htwc0ams8EtErd-wXIt1Fz9VSOB2Hk,168
|
|
4
|
+
bids_validator_deno-2.2.3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
5
|
+
bids_validator_deno-2.2.3.dist-info/METADATA,sha256=mc8KVslGzGwUk1G3hZS5sflIr-HXuuPl8Xm_kvYWFeg,5084
|
|
6
|
+
bids_validator_deno-2.2.3.dist-info/licenses/LICENSE,sha256=taiKo4hSfclPHHLO2tdj9Da-Fdgdxr4mj8Jy1rpOB1o,1128
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 The Board of Trustees of the Leland Stanford Junior University
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|