diff --git a/doc/contributing.md b/doc/contributing.md index 0332d923013..6fe55a909fd 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -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 @@ -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 diff --git a/environment.yml b/environment.yml index 3fb89717c7f..ae160a97a7c 100644 --- a/environment.yml +++ b/environment.yml @@ -13,22 +13,25 @@ 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-mpl - pytest>=6.0 + # Dev dependencies (building documentation) + - myst-parser - sphinx - sphinx-copybutton - sphinx-gallery