-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List key development dependencies to install for new contributors #1783
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0eb529b
List some of the key dev dependencies for developing pygmt locally
weiji14 26fa507
Merge branch 'main' into doc/clarify-dev-deps
weiji14 ab8ac74
Reorganize development dependencies in environment.yml into subsections
weiji14 1fc43ec
Merge branch 'main' into doc/clarify-dev-deps
weiji14 c2ae7dd
Explicitly use conda env create --file environment.yml
weiji14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,8 +192,16 @@ 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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Building the documentation needs more packages (like sphinx) than listed here. |
||
|
||
- 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 | ||
|
@@ -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 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I feel this sentence is very clear that all dependencies are listed in the environment.yml and people who want to build and test should read the environment.yml file, rather than listing an incompleted list here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A compromise could be to add more sections (via comments) to
environment.yml
that specify which development dependencies are required for building the docs, running the tests, and/or formatting the code (inspiration from numpy and pandas environment files).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that sounds like a good idea actually.
So do we not want to list some of the dev dependencies here in contributing.md? I know it seems redundant, but there are some people who might be from a non-Anaconda/pure-Python-pip sort of world that don't really use that environment.yml file. Listing things like git/dvc/pytest/sphinx here up front will at least give people an idea on what framework PyGMT uses for testing and building documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree.
Fair point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok,
environment.yml
has been reorganized into subsections (general, linters, testing, documentation) in ab8ac74.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this paragraph also include a short sentence on how to install dependencies with a .yml file? Since it's different than the typical
pip install -r requirements.txt
, it would cut down on confusion of how to useenvironment.yml
to install dependencies.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. There's actually a
conda env create
instruction just a few sentences below. I've just added a commit (c2ae7dd) to make it more explicit (conda env create --file environment.yml
).