-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOC: Add instructions for contributing to Cartopy
Set up a development environment and outline the steps required for contributing code.
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. _contribute: | ||
|
||
Contributing to Cartopy | ||
======================= | ||
|
||
Cartopy is an open-source project that welcomes contributions from anyone. A good place | ||
to start contributing is by fixing typos, adding examples, or improving the explanations | ||
of the functions. | ||
|
||
To contribute new features or bug fixes, you can create a pull request with your code changes | ||
on GitHub. The easiest way to get started contributing code is to clone the repository to your | ||
local system and install the conda development environment included with the source code. | ||
|
||
.. code:: | ||
git clone git@github.com:YOUR-USERNAME/cartopy.git | ||
cd cartopy | ||
conda env create -f environment.yml | ||
conda activate cartopy-dev | ||
This will install all of the required dependencies for compiling the code, running the tests, and | ||
building the documentation. Remember to activate the `cartopy-dev` environment. | ||
|
||
A development and test workflow may look something like the following code block. | ||
|
||
.. code:: | ||
# Activate your development environment | ||
conda activate cartopy-dev | ||
# Checkout a new feature branch | ||
git checkout -b my-cool-feature | ||
# Make your code changes here, including tests for the changes! | ||
# add and commit the changes with a useful commit message | ||
# describing what changes you made | ||
git add lib/cartopy/my-changed-file.py | ||
git commit | ||
# Test your code on 4 processors | ||
pytest -n 4 lib/cartopy | ||
# push your changes to your GitHub account | ||
git push --set-upstream origin my-coll-feature | ||
# Go to GitHub and make a Pull Request to Cartopy |
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
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