Skip to content

Commit

Permalink
List key development dependencies to install for new contributors (#1783
Browse files Browse the repository at this point in the history
)

* 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
  • Loading branch information
weiji14 authored Mar 8, 2022
1 parent d24c0a6 commit ff4ed31
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
13 changes: 10 additions & 3 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,23 @@ It will make your life a lot easier!

The repository includes a conda environment file `environment.yml` with the
specification for all development requirements to build and test the project.
In particular, these are some of the key development dependencies you will need
to install to build the documentation and run the unit tests locally:

- git (for cloning the repo and tracking changes in code)
- dvc (for downloading baseline images used in tests)
- pytest-mpl (for checking that generated plots match the baseline)
- sphinx-gallery (for building the gallery example page)

See the [`environment.yml`](https://github.com/GenericMappingTools/pygmt/blob/main/environment.yml)
file for the list of dependencies and the environment name (`pygmt`).
file for the full list of dependencies and the environment name (`pygmt`).
Once you have forked and cloned the repository to your local machine, you can
use this file to create an isolated environment on which you can work.
Run the following on the base of the repository to create a new conda
environment from the `environment.yml` file:

```bash
conda env create
conda env create --file environment.yml
```

Before building and testing the project, you have to activate the environment
Expand All @@ -210,7 +218,6 @@ Before building and testing the project, you have to activate the environment
conda activate pygmt
```


We have a [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile)
that provides commands for installing, running the tests and coverage analysis,
running linters, etc. If you don't want to use `make`, open the `Makefile` and
Expand Down
17 changes: 10 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,26 @@ dependencies:
- packaging
# Optional dependencies
- geopandas
# Development dependencies
# Development dependencies (general)
- dvc
- ipython
- jupyter
- make
# Dev dependencies (style checks)
- black
- blackdoc
- docformatter
- dvc
- flake8
- ipython
- isort>=5
- jupyter
- make
- matplotlib
- myst-parser
- pylint
# Dev dependencies (unit testing)
- matplotlib
- pytest-cov
- pytest-doctestplus
- pytest-mpl
- pytest>=6.0
# Dev dependencies (building documentation)
- myst-parser
- sphinx
- sphinx-copybutton
- sphinx-gallery
Expand Down

0 comments on commit ff4ed31

Please sign in to comment.