Skip to content

Commit e825ce7

Browse files
authored
Merge pull request #87 from effigies/feat/docs
doc: Initialize Sphinx docs
2 parents 13b1925 + 41dc1fb commit e825ce7

18 files changed

+308
-17
lines changed

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-lts-latest
5+
tools:
6+
python: latest
7+
8+
python:
9+
install:
10+
requirements: docs/requirements.txt
11+
12+
sphinx:
13+
configuration: docs/conf.py

README.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
1-
# Deno based bids-validator
1+
# The BIDS Validator
22

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.
46

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
68

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:
811

9-
## Usage
12+
![The web interface to the BIDS Validator with the "Select Dataset Files" button highlighted.
13+
(Dark theme)](_static/web_entrypoint_dark.png){.only-dark width="50%" align=center}
14+
![The web interface to the BIDS Validator with the "Select Dataset Files" button highlighted.
15+
(Light theme)](_static/web_entrypoint_light.png){.only-light width="50%" align=center}
1016

11-
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.
1218

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
1526
```
1627

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.
1831

1932
### Configuration file
2033

@@ -38,13 +51,13 @@ Pass the `--json` flag to see the issues in detail.
3851

3952
### Development tools
4053

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:
4255

4356
```shell
4457
# Run from within the /bids-validator directory
4558
cd bids-validator
4659
# Run validator:
47-
./bids-validator-deno path/to/dataset
60+
./local-run path/to/dataset
4861
```
4962

5063
## Schema validator test suite
@@ -56,12 +69,6 @@ deno test --allow-env --allow-read --allow-write src/
5669

5770
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.
5871

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-
6572
## Modifying and building a new schema
6673

6774
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.

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build/

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/BIDS_logo_black.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)