|
| 1 | +# Contributing to the BIDS website |
| 2 | + |
| 3 | +**Welcome to the BIDS website repository!** |
| 4 | + |
| 5 | +_We're so excited you're here and want to contribute._ |
| 6 | + |
| 7 | +We hope that these guidelines are designed to make it as easy as possible to get involved. |
| 8 | +If you have any questions that aren't discussed below, please let us know |
| 9 | +by [opening an issue](https://github.com/bids-standard/bids-website/issues/new). |
| 10 | + |
| 11 | +If you are not familiar with Git ansd GitHub, |
| 12 | +check our [generic contributing guidelines](https://bids-website.readthedocs.io/en/latest/collaboration/bids_github/CONTRIBUTING.html). |
| 13 | + |
| 14 | +If you want to contribute to the BIDS website, |
| 15 | +make sure you also read the instructions below. |
| 16 | + |
| 17 | +## Serving locally |
| 18 | + |
| 19 | +### Requirements |
| 20 | + |
| 21 | +- python >= 3.10 |
| 22 | + |
| 23 | +Even though this is not required, having `make` installed |
| 24 | +will make it easier to easily serve the website locally. |
| 25 | + |
| 26 | +### Install and serve |
| 27 | + |
| 28 | +Fork and clone the repository and its submodules |
| 29 | + |
| 30 | +```bash |
| 31 | +git clone https://github.com/YOUR_USER_NAME/bids-website.git --recurse-submodules |
| 32 | +``` |
| 33 | + |
| 34 | +Create a virtual environment using `conda`, `venv` of what other environment management tool you prefer. |
| 35 | + |
| 36 | +Install all the dependencies. |
| 37 | + |
| 38 | +```bash |
| 39 | +pip install -r requirements.txt |
| 40 | +``` |
| 41 | + |
| 42 | +Generate all the content required for the build. |
| 43 | + |
| 44 | +```bash |
| 45 | +make update |
| 46 | +``` |
| 47 | + |
| 48 | +Serve the website with the mkdocs. |
| 49 | + |
| 50 | +```bash |
| 51 | +mkdocs serve |
| 52 | +``` |
| 53 | + |
| 54 | +## Maintenance |
| 55 | + |
| 56 | +### Requirements |
| 57 | + |
| 58 | +Same as for the install but you will also need to install `tox`. |
| 59 | + |
| 60 | +```bash |
| 61 | +pip install tox |
| 62 | +``` |
| 63 | +<!-- TODO find minimal version of node and npm --> |
| 64 | +For some quality checks and rare operations, you will need node.js and npm. |
| 65 | + |
| 66 | +## Update all files |
| 67 | + |
| 68 | +```bash |
| 69 | +make update |
| 70 | +``` |
| 71 | + |
| 72 | +## Run all formatting / linting tools |
| 73 | + |
| 74 | +```bash |
| 75 | +tox |
| 76 | +make remark |
| 77 | +``` |
0 commit comments