| 1 |
|
| 2 |
# Contribute |
| 3 |
|
| 4 |
If you'd like to develop or make contributions for sphinx-copybutton, fork |
| 5 |
the repository here: |
| 6 |
|
| 7 |
<https://github.com/ExecutableBookProject/sphinx-copybutton> |
| 8 |
|
| 9 |
pull to your computer and install locally with `pip`: |
| 10 |
|
| 11 |
``` |
| 12 |
pip install -e /path/to/sphinx_copybutton |
| 13 |
``` |
| 14 |
|
| 15 |
**Pull requests** and **Issues** are absolutely welcome! |
| 16 |
|
| 17 |
The package is tested for three things (see `.github/workflows/integration.yml`): |
| 18 |
|
| 19 |
## code style |
| 20 |
|
| 21 |
To adhere to this code style install the package with [pre-commit](https://pre-commit.com/): |
| 22 |
|
| 23 |
```console |
| 24 |
$ pip install .[code_style] |
| 25 |
``` |
| 26 |
|
| 27 |
Then you can run: |
| 28 |
|
| 29 |
```console |
| 30 |
$ pre-commit run --all |
| 31 |
``` |
| 32 |
|
| 33 |
Or setup pre-commit to run on code commits: |
| 34 |
|
| 35 |
```console |
| 36 |
$ pre-commit install |
| 37 |
``` |
| 38 |
|
| 39 |
## JavaScript unit testing |
| 40 |
|
| 41 |
Install the test dependencies with [npm](https://www.npmjs.com/): |
| 42 |
|
| 43 |
```console |
| 44 |
$ npm install ci |
| 45 |
``` |
| 46 |
|
| 47 |
Then run the tests: |
| 48 |
|
| 49 |
```console |
| 50 |
$ npm test |
| 51 |
``` |
| 52 |
|
| 53 |
:::{note} |
| 54 |
NodeJS >= 12 is required |
| 55 |
::: |
| 56 |
|
| 57 |
## Documentation builds |
| 58 |
|
| 59 |
Install the package: |
| 60 |
|
| 61 |
```console |
| 62 |
$ pip install . |
| 63 |
``` |
| 64 |
|
| 65 |
Then run the docs build: |
| 66 |
|
| 67 |
```console |
| 68 |
$ cd doc |
| 69 |
$ make html |
| 70 |
``` |