Skip to content

Latest commit

 

History

History
102 lines (61 loc) · 3.37 KB

CONTRIBUTING.md

File metadata and controls

102 lines (61 loc) · 3.37 KB

Contributions

Contributions are welcome in the form of pull requests.

Once the implementation of a piece of functionality is considered to be bug free and properly documented (both API docs and an example script), it can be incorporated into the main branch.

To help developing mne-bids, you will need a few adjustments to your installation as shown below.

Running tests

(Optional) Install development version of MNE-Python

If you want to run the tests with a development version of MNE-Python, you can install it by running

$ pip install -U https://github.com/mne-tools/mne-python/archive/main.zip

Install development version of MNE-BIDS

First, you should fork the mne-bids repository. Then, clone the fork and install it in "editable" mode.

$ git clone https://github.com/<your-GitHub-username>/mne-bids
$ pip install -e ./mne-bids

Install Python packages required to run tests

You can install the testing requirements using the test_requirements.txt file from the root of the mne-bids repository.

$ pip install -r test_requirements.txt

Install the BIDS validator

Finally, it is necessary to install the BIDS validator. The outputs of MNE-BIDS are run through the BIDS validator to check if the conversion worked properly and produced datasets that conforms to the BIDS specifications.

You will need the command line version of the validator.

Global (system-wide) installation

  • First, install Node.js.
  • For installing the stable version of bids-validator, please follow the instructions as detailed in the README of the bids-validator repository.
  • For installing the development version of bids-validator, see here.

Test your installation by running:

$ bids-validator --version

Local (per-user) development installation

Install Node.js. If you're use conda, you can install the nodejs package from conda-forge by running conda install -c conda-forge nodejs.

Then, retrieve the validator and install all its dependencies via npm.

$ git clone git@github.com:bids-standard bids-validator.git
$ cd bids-validator/bids-validator
$ npm install

Test your installation by running:

$ ./bin/bids-validator --version

Invoke pytest

Now you can finally run the tests by running pytest in the mne-bids directory.

$ pytest

If you have installed the bids-validator on a per-user basis, set the environment variable VALIDATOR_EXECUTABLE to point to the path of the bids-validator before invoking pytest:

$ VALIDATOR_EXECUTABLE=../bids-validator/bids-validator/bin/bids-validator pytest

Building the documentation

The documentation can be built using sphinx. You can install the documentation requirements using the requirements.txt file in the doc/ directory of the mne-bids repository.

$ pip install -r doc/requirements.txt

To build the documentation locally, one can run:

$ make build-doc

or, if you don't want to run the examples to build the documentation:

$ make -C doc/ html-noplot

The latter command will result in a faster build but produce no plots in the examples.