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

DOC: Add usage instructions for running from deno.land #1770

Merged
merged 3 commits into from
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions bids-validator/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ Deno is a JavaScript and TypeScript runtime that is used to run the schema based

At the root of the repository there are two directories, `bids-validator` and `bids-validator-web`. These are separate npm packages, the Deno validator lives within the bids-validator package within the `src` directory.

## Schema validator examples
## Usage

Deno by default sandboxes applications like a web browser. To validate datasets located on your local system, you need to use the --allow-read flag to read local files. --allow-env is also required to allow for detection of OS specific features. These flags are included in the script line of the `./bids-validator-deno` script.
To use the latest validator hosted at https://deno.land/x/bids_validator, use the following command:

```console
$ deno run --allow-read --allow-env https://deno.land/x/bids_validator/bids-validator.ts path/to/dataset
```

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.

### Development tools

From the repository root, use `bids-validator/bids-validator-deno` to run with all permissions enabled by default:

```shell
# Run from within the /bids-validator directory
Expand All @@ -19,12 +29,6 @@ cd bids-validator
./bids-validator-deno path/to/dataset
```

By default only schema derived validation rules are run. The legacy validator can be run at the same time with `--legacy` and this may improve coverage for issues not yet implemented in the schema variant.

```shell
./bids-validator-deno --legacy path/to/dataset
```

## Schema validator test suite

```shell
Expand Down
Loading