We welcome community development! We ask contributors to follow a few guidelines, outlined below.
If you find a bug in the source code, you can help us by submitting an issue. Even better, you can submit a Pull Request with a fix.
You can request a new feature by submitting an issue. If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
- For a major feature, first open an issue and outline your proposal so that it can be discussed. This will allow us to better coordinate our efforts, prevent duplication of work, and help you craft the change so that it is successfully accepted into the project.
- Small features can be crafted and directly submitted as a Pull Request.
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we will systematically ask you to provide a minimal, complete, and verifiable example. Having a minimal, complete, and verifiable example gives us a wealth of important information without going back & forth to you with additional questions like:
- version of
pywatershed
used - and most importantly — a use-case that fails
We will be insisting on a minimal, complete, and verifiable example in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
Unfortunately, we are not able to investigate / fix bugs without a minimal, complete, and verifiable example, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
To submit a pull request (PR) please follow these steps:
-
Search GitHub for an open or closed PR that relates to your submission. You don't want to duplicate effort.
-
Fork the repository.
-
Make your changes in a new branch. Be sure to include test cases.
-
Run
ruff
on thepywatershed
module.Python source code files should be formatted by running
ruff
on thepywatershed
subdirectory before opening a pull request, as CI will fail if the code is not properly formatted. For instance, from the project root:ruff check . ruff format . --check --diff
Note: PRs must pass format checks in GitHub Actions before they can be accepted.
-
Run the full test suite and make sure all tests pass.
Note: PRs must pass all tests in GitHub Actions before they can be accepted.
-
Commit your changes with a descriptive message that follows conventional commit guidelines.
-
Push your branch to your fork.
-
Open a pull request against the upstream repository's
develop
branch. -
If we suggest changes:
a. Make the required updates. b. Rerun the tests, ensuring they still pass. c. If the upstream
develop
has moved on since you opened the PR, rebase your branch and force push to your PR branch. For instance, assuming you have updated your fork'sdevelop
from upstream on GitHub, and your fork's remote is calledorigin
as usual:``` git fetch origin git rebase develop -i git push -f origin <your PR branch> ```
That's it! Thanks for your contribution.