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

[MISC] Rewrite and update html build instructions #1032

Merged
merged 13 commits into from Mar 29, 2022
56 changes: 26 additions & 30 deletions CONTRIBUTING.md
Expand Up @@ -306,7 +306,22 @@ before you insert the macro call into the markdown document.
We are using mkdocs to render our specification.
Please follow these instructions if you would like to build the specification locally.

#### 1. Install mkdocs, the material theme and the required extensions
#### 1. Download the BIDS specification [repository](https://github.com/bids-standard/bids-specification/tree/master) onto your computer

This can be done by clicking the green button on the right titled "Clone or
download"
or using [this link](https://github.com/bids-standard/bids-specification/archive/master.zip).

sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
#### 2. In the terminal (command line) navigate to your local version of the specification

This location will have the same files you see on our
[main specification page](https://github.com/bids-standard/bids-specification).
Note that a file browser window may not show the hidden files
(those that start with a period, like `.remarkrc`).

sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
Enter all commands below from the command line prompt located at the root of the local version of the specification.

#### 3. Install mkdocs, the material theme and the required extensions

In the following links, you can find more information about

Expand All @@ -318,40 +333,21 @@ You will also need several other mkdocs plugins, like `branchcustomization` and
To install all of this make sure you have a recent version of Python on your computer.
The [DataLad Handbook](http://handbook.datalad.org/en/latest/intro/installation.html#python-3-all-operating-systems) provides helpful instructions for setting up Python.

An easy way to install the correct version of mkdocs and all the other required extensions
is to use the `requirements.txt` file contained in this repository,
by using the following command:
In general, we strongly recommend that you install all dependencies in an isolated Python environment.
For example using `conda`, as described in the section on Python in the DataLad Handbook, linked above.
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
Or alternatively using `venv`, as described in this [Real Python tutorial](https://realpython.com/python-virtual-environments-a-primer/).
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved

```bash
pip install -r requirements.txt
```

However this will also install some other packages you might not want to have (like `numpy`).
So if you only want to install what you need to build the specification,
use the following command:
Once you have activated your isolated Python environment,
an easy way to install the correct version of mkdocs and all the other required extensions
is to use the `requirements.txt` file contained in this repository as follows:

```bash
pip install \
mkdocs \
mkdocs-material \
pymdown-extensions \
mkdocs-branchcustomization-plugin \
mkdocs-macros-plugin \
tabulate
pip install -U pip
pip install -r requirements.txt
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
```

#### 2. Download the BIDS specification [repository](https://github.com/bids-standard/bids-specification/tree/master) onto your computer

This can be done by clicking the green button on the right titled "Clone or
download"
or using [this link](https://github.com/bids-standard/bids-specification/archive/master.zip).

#### 3. In the terminal (command line) navigate to your local version of the specification

This location will have the same files you see on our
[main specification page](https://github.com/bids-standard/bids-specification).
Note: A finder window may not show the hidden files (those that start with a
period, like `.remarkrc`)
The first command ensures you are using an up to date version of `pip`,
and the second command installs all dependencies.
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved

#### 4. Ready to build!

Expand Down