|
| 1 | +# Contributing to python-utils |
| 2 | + |
| 3 | +Bug reports, code and documentation contributions are welcome. You can help this |
| 4 | +project also by using the development version and by reporting any bugs you might encounter |
| 5 | + |
| 6 | +## 1. Reporting bugs |
| 7 | +It's important to provide following details when submitting a bug |
| 8 | +- Python version |
| 9 | +- python-utils version |
| 10 | +- OS details |
| 11 | + |
| 12 | +If possible also provide a minimum reproducible working code. |
| 13 | +## 2. Contributing Code and Docs |
| 14 | + |
| 15 | +Before working on a new feature or a bug, please browse [existing issues](https://github.com/WoLpH/python-utils/issues) |
| 16 | +to see whether it has previously been discussed. |
| 17 | + |
| 18 | +If your change alters python-util's behaviour or interface, it's a good idea to |
| 19 | +discuss it before you start working on it. |
| 20 | + |
| 21 | +If you are fixing an issue, the first step should be to create a test case that |
| 22 | +reproduces the incorrect behaviour. That will also help you to build an |
| 23 | +understanding of the issue at hand. |
| 24 | + |
| 25 | +Make sure to add relevant tests and update documentation in order to get |
| 26 | +your PRs merged. We strictly adhere to 100% code coverage. |
| 27 | + |
| 28 | +### Development Environment |
| 29 | + |
| 30 | +#### Getting the code |
| 31 | + |
| 32 | +Go to <https://github.com/WoLpH/python-utils> and fork the project repository. |
| 33 | + |
| 34 | +```bash |
| 35 | +# Clone your fork |
| 36 | +$ git clone git@github.com:<YOU>/python-utils.git |
| 37 | + |
| 38 | +# Enter the project directory |
| 39 | +$ cd python-utils |
| 40 | + |
| 41 | +# Create a branch for your changes |
| 42 | +$ git checkout -b my_awesome_branch |
| 43 | +``` |
| 44 | + |
| 45 | +#### Testing |
| 46 | +Before submitting any PR make sure your code passes all the tests. |
| 47 | + |
| 48 | +Create virtual environment and activate |
| 49 | +``` |
| 50 | +$ python3 -m venv venv |
| 51 | +$ source venv/bin/activate |
| 52 | +``` |
| 53 | +Install test requirements |
| 54 | +``` |
| 55 | +$ cd python-utils |
| 56 | +$ pip install -r _python_utils_tests/requirements.txt |
| 57 | +``` |
| 58 | +Run tests |
| 59 | +``` |
| 60 | +$ tox |
| 61 | +``` |
0 commit comments