You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-17Lines changed: 24 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,33 @@
1
-
# Deno based bids-validator
1
+
# The BIDS Validator
2
2
3
-
## Intro
3
+
The BIDS Validator is a web application, command-line utility,
4
+
and Javascript/Typescript library for assessing compliance with the
5
+
[Brain Imaging Data Structure][BIDS] standard.
4
6
5
-
This is a full rewrite of the bids-validator JavaScript implementation designed to use the [bids-specification schema](https://github.com/bids-standard/bids-specification/tree/master/src/schema) to apply the majority of validation rules.
7
+
## Getting Started
6
8
7
-
Deno is a JavaScript and TypeScript runtime that is used to run the schema based validator. Deno is simpler than Node.js and only requires one tool to use, the Deno executable itself. To install Deno, follow these [install instructions for your platform](https://deno.land/manual/getting_started/installation).
9
+
In most cases,
10
+
the simplest way to use the validator is to browse to the [BIDS Validator][] web page:
8
11
9
-
## Usage
12
+
![The web interface to the BIDS Validator with the "Select Dataset Files" button highlighted.
To use the latest validator hosted at https://deno.land/x/bids_validator, use the following command:
17
+
The web validator runs in-browser, and does not transfer data to any remote server.
12
18
13
-
```console
14
-
$ deno run --allow-read --allow-env https://deno.land/x/bids_validator/bids-validator.ts path/to/dataset
19
+
In some contexts, such as when working on a remote server,
20
+
it may be easier to use the command-line.
21
+
The BIDS Validator can be run with the [Deno] runtime
22
+
(see [Deno - Installation][] for detailed installation instructions):
23
+
24
+
```shell
25
+
deno run -ERN jsr:@bids/validator
15
26
```
16
27
17
-
Deno by default sandboxes applications like a web browser. `--allow-read` allows the validator to read local files, and `--allow-env` enables OS-specific features.
28
+
Deno by default sandboxes applications like a web browser.
29
+
`-E`, `-R` and `-N` allow the validator to read environment variables,
30
+
local files, and network locations.
18
31
19
32
### Configuration file
20
33
@@ -38,13 +51,13 @@ Pass the `--json` flag to see the issues in detail.
38
51
39
52
### Development tools
40
53
41
-
From the repository root, use `bids-validator/bids-validator-deno` to run with all permissions enabled by default:
54
+
From the repository root, use `./local-run` to run with all permissions enabled by default:
42
55
43
56
```shell
44
57
# Run from within the /bids-validator directory
45
58
cd bids-validator
46
59
# Run validator:
47
-
./bids-validator-deno path/to/dataset
60
+
./local-run path/to/dataset
48
61
```
49
62
50
63
## Schema validator test suite
@@ -56,12 +69,6 @@ deno test --allow-env --allow-read --allow-write src/
56
69
57
70
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.
58
71
59
-
## Refreshing latest specification
60
-
61
-
If you are validating with the latest specification instead of a specific version, the validator will hold onto a cached version. You can request the newest version by adding the `--reload` argument to obtain the newest specification definition.
62
-
63
-
`deno run --reload=https://bids-specification.readthedocs.io/en/latest/schema.json src/main.ts`
64
-
65
72
## Modifying and building a new schema
66
73
67
74
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.
0 commit comments