Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways to any of the packages that are included in HyRiver project. The workflow is the same for all packages. In this page, a contribution workflow for PyGeoHydro is explained.
Types of Contributions#
Report bugs at cheginit/pygeohydro#issues.
If you are reporting a bug, please include:
Your operating system name and version.
Any details about your local setup that might be helpful in troubleshooting.
Detailed steps to reproduce the bug.
Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.
Other than new features that you might have in mind, you can look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.
PyGeoHydro could always use more documentation, whether as part of the official PyGeoHydro docs, in docstrings, or even on the web in blog posts, articles, and such.
The best way to send feedback is to file an issue at cheginit/pygeohydro#issues.
If you are proposing a feature:
Explain in detail how it would work.
Keep the scope as narrow as possible, to make it easier to implement.
Remember that this is a volunteer-driven project, and that contributions are welcome :)
Ready to contribute? Here’s how to set up PyGeoHydro for local development.
Fork the PyGeoHydro repo through the GitHub website.
Clone your fork locally and add the main PyGeoHydro as the upstream remote:
$ git clone email@example.com:your_name_here/pygeohydro.git $ git remote add upstream firstname.lastname@example.org:cheginit/pygeohydro.git
Install your local copy into a virtualenv. Assuming you have Conda installed, this is how you can set up your fork for local development:
$ cd pygeohydro/ $ conda env create -f ci/requirements/environment.yml $ conda activate pygeohydro-dev $ python -m pip install . --no-deps
Create a branch for local development:
$ git checkout -b bugfix-or-feature/name-of-your-bugfix-or-feature $ git push
Before you first commit, pre-commit hooks needs to be setup:
$ pre-commit install $ pre-commit run --all-files
Now you can make your changes locally, make sure to add a description of the changes to
HISTORY.rstfile and add extra tests, if applicable, to
testsfolder. Also, make sure to give yourself credit by adding your name at the end of the item(s) that you add in the history like this
By `Taher Chegini <https://github.com/cheginit>`_. Then, fetch the latest updates from the remote and resolve any merge conflicts:
$ git fetch upstream $ git merge upstream/name-of-your-branch
Then lint and test the code:
$ make lint
If you are making breaking changes make sure to reflect them in the documentation,
README.rst, and tests if necessary.
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
To run a subset of tests:
$ pytest -k "test_name1 or test_name2"
A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:
$ git tag -a vX.X.X -m "vX.X.X" $ git push --follow-tags
X.X.X is the version number following the
semantic versioning spec i.e., MAJOR.MINOR.PATCH.
Then release the tag from Github and Github Actions will deploy it to PyPi.