Skip to content

Latest commit

 

History

History
132 lines (84 loc) · 3.66 KB

CONTRIBUTING.md

File metadata and controls

132 lines (84 loc) · 3.66 KB

Contributing

Hello! 👋 Thanks for taking the time to contribute.

There are many ways you can contribute 😄

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

Pull Request contributing guide

Doing the following will increase your chances of your pull request to be accepted 👍

Fixing an obvious issue

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.

Major PR

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.

Test guide

When making tests, try to use Hypothesis (if present in [dev-dependancies]) for example data as much as possible.

Pytest

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():...

Ward

If we're using Ward, tags aren't required but are highly recommended to add.

Code Style

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

Creating an issue

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