|
| 1 | +# Developer README |
| 2 | + |
| 3 | +## Contributing |
| 4 | +The project uses: - |
| 5 | + |
| 6 | +- [pre-commit] to enforce linting of files prior to committing them to the |
| 7 | + upstream repository |
| 8 | +- [Commitizen] to enforce a [Conventional Commit] commit message format |
| 9 | +- [Black] as a code formatter |
| 10 | + |
| 11 | +You **MUST** comply with these choices in order to contribute to the project. |
| 12 | + |
| 13 | +To get started review the pre-commit utility and the conventional commit style |
| 14 | +and then setup your local clone by following the **Installation** and |
| 15 | +**Quick Start** sections: - |
| 16 | + |
| 17 | + pip install -r build-requirements.txt |
| 18 | + pre-commit install -t commit-msg -t pre-commit |
| 19 | + |
| 20 | +Now the project's rules will run on every commit, and you can check the |
| 21 | +current health of your clone with: - |
| 22 | + |
| 23 | + pre-commit run --all-files |
| 24 | + |
| 25 | +Create a virtual environment if you're going to develop code. |
| 26 | + |
| 27 | +## Building |
| 28 | +It's a standard Python package, controlled by `setup.py` so familiarity |
| 29 | +with [Python packaging] will help. The project is built and published |
| 30 | +to PyPI automatically from the main branch using GitHub Actions. |
| 31 | + |
| 32 | +To build the package distribution manually run: - |
| 33 | + |
| 34 | + python -m pip install --upgrade build |
| 35 | + python -m build --sdist --wheel --outdir dist/ |
| 36 | + |
| 37 | +> Because you're building outside the CI process the version number of |
| 38 | + the package will be fixed at 1.0.0. DO NOT change this behaviour. |
| 39 | + |
| 40 | +To install the local build, without needing to publish the package run: - |
| 41 | + |
| 42 | + pip install dist/im_jote-1.0.0-py3-none-any.whl |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +[black]: https://black.readthedocs.io/en/stable |
| 47 | +[commitizen]: https://commitizen-tools.github.io/commitizen/ |
| 48 | +[conventional commit]: https://www.conventionalcommits.org/en/v1.0.0/ |
| 49 | +[pre-commit]: https://pre-commit.com |
| 50 | +[python packaging]: https://packaging.python.org/en/latest/tutorials/packaging-projects/ |
0 commit comments