Hello! 👋 Thanks for taking the time to contribute.
There are many ways you can contribute 😄
- Pull Request
- 🩹 Submit an obvious fix (e.g. typo)
- 📝 Work on a bug
- Submit an Issue
- ✨ Request a feature
- 🐛 Report a bug
Remember to follow the code of conduct
We use Poetry to manage the project so make sure you have it. Once you do, set up the virtual environment after you cloned repo
$ poetry install
You can test locally with
$ poe test
Or (if you don't have Poe the poet)
$ poetry run pytest
Doing the following will increase your chances of your pull request to be accepted 👍
- Describe other considered solutions
- Follow the Conventional Commits or Gitmoji commit style
- For all code-related changes follow the code style. Write tests if applicable
- Link to the related issue. If there is none, please make one or maybe the issue is obvious.
If an issue's solution seems obvious or clear (like fixing a typo or link), you may directly create a PR. Remember to fill in the required forms.
If you're making somewhat bigger code changes please write tests if they don't exist already 🧪.
If you're fixing a bug 🐛, please remember link to the applicable issue describing the bug like this (if it exists):
- #issue-number
like
- #42
If you're changing/adding documentation, the above isn't required.
When making tests, try to use Hypothesis (if present in [dev-dependancies]
) for example data as much as possible.
Please have descriptive test function names. Wrap them in a test class if they serve a similar purpose. There should be more than 1 test class per file. Otherwise, unwrap it from the class and instead put it in the file.
For example, if you have
# test_connection.py
class TestConnection:
def test_can_con(self): ...
def test_con_ends_gracefully(self):...
And TestConnection
is the only class in the file, unwrap the tests like so
# test_connection.py
def test_can_con():...
def test_con_ends_gracefully():...
If we're using Ward, tags aren't required but are highly recommended to add.
We use the linters Black, Pylint, and MyPy. We use the formatters Black and Isort.
You can easily fix your code's style with
$ poe format
or
$ shed {{ cookiecutter.module_name }}/**.py
You can run the linters via
$ poe lint
Try to follow my recommended code style or Google's Style Guide
Please remember to fill out all the forms when making an issue 👍. This includes but is not limited to
- Describe the issue
- Reproduction steps
- System information (e.g. Python version)
Or if it's a feature request ✨ (also not limited to)
- Describe the feature
- Why the feature cannot exist without changes to code
- What the new feature might be useful for