Skip to content

Commit ff4ed31

Browse files
authored
List key development dependencies to install for new contributors (#1783)
* List some of the key dev dependencies for developing pygmt locally * Reorganize development dependencies in environment.yml into subsections * Explicitly use conda env create --file environment.yml
1 parent d24c0a6 commit ff4ed31

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

doc/contributing.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,23 @@ It will make your life a lot easier!
192192

193193
The repository includes a conda environment file `environment.yml` with the
194194
specification for all development requirements to build and test the project.
195+
In particular, these are some of the key development dependencies you will need
196+
to install to build the documentation and run the unit tests locally:
197+
198+
- git (for cloning the repo and tracking changes in code)
199+
- dvc (for downloading baseline images used in tests)
200+
- pytest-mpl (for checking that generated plots match the baseline)
201+
- sphinx-gallery (for building the gallery example page)
202+
195203
See the [`environment.yml`](https://github.com/GenericMappingTools/pygmt/blob/main/environment.yml)
196-
file for the list of dependencies and the environment name (`pygmt`).
204+
file for the full list of dependencies and the environment name (`pygmt`).
197205
Once you have forked and cloned the repository to your local machine, you can
198206
use this file to create an isolated environment on which you can work.
199207
Run the following on the base of the repository to create a new conda
200208
environment from the `environment.yml` file:
201209

202210
```bash
203-
conda env create
211+
conda env create --file environment.yml
204212
```
205213

206214
Before building and testing the project, you have to activate the environment
@@ -210,7 +218,6 @@ Before building and testing the project, you have to activate the environment
210218
conda activate pygmt
211219
```
212220

213-
214221
We have a [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile)
215222
that provides commands for installing, running the tests and coverage analysis,
216223
running linters, etc. If you don't want to use `make`, open the `Makefile` and

environment.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,26 @@ dependencies:
1313
- packaging
1414
# Optional dependencies
1515
- geopandas
16-
# Development dependencies
16+
# Development dependencies (general)
17+
- dvc
18+
- ipython
19+
- jupyter
20+
- make
21+
# Dev dependencies (style checks)
1722
- black
1823
- blackdoc
1924
- docformatter
20-
- dvc
2125
- flake8
22-
- ipython
2326
- isort>=5
24-
- jupyter
25-
- make
26-
- matplotlib
27-
- myst-parser
2827
- pylint
28+
# Dev dependencies (unit testing)
29+
- matplotlib
2930
- pytest-cov
3031
- pytest-doctestplus
3132
- pytest-mpl
3233
- pytest>=6.0
34+
# Dev dependencies (building documentation)
35+
- myst-parser
3336
- sphinx
3437
- sphinx-copybutton
3538
- sphinx-gallery

0 commit comments

Comments
 (0)