This is a copier template for
Python 3.8+
development.
Highly opinionated and made for personal use.
- Testing framework based on doit
and nox.
- Allows replication of continuous integration (=ci) tests locally.
- Continuous integration is conducted with
GitHub Actions
. - Continuous integration tasks are replicable locally with
doit
tasks defined indodo.py
.- Note that
docs
are hosted onReadTheDocs
, the task is only ran in ci to test the building with task that mimicsReadTheDocs
. - An
action exists
that will push to PyPI on tagged commits.
- However this requires a
PYPI_PASSWORD
API token to work. - See end of
doit
job in workflow file.
- However this requires a
- Non-tagged commits simply try building the package without pushing anywhere.
- Note that
- Testing of code is done with pytest.
- Code coverage is checked.
- coverage-badge is
currently locally generated for use in
README.rst
.
- Documentation is generated with
sphinx
- Documentation theme is sphinx-rtd-theme.
- Hosted on
ReadTheDocs
- Requires user setup at https://readthedocs.org/
Run tests for the template with poetry
or nix + poetry
:
- With
nix + poetry
:
# With nix (installs all development dependencies automatically)
# But one dependency is poetry which is used for actual python
# dependency management. Therefore poetry install is required to install
# python dependencies.
nix develop -c poetry install
# After python dependencies (including nox) are installed, nox can be ran
# to run the template tests.
nix develop -c poetry run nox
- With
poetry
:
poetry install
poetry run nox
Testing uses another, scaffolded Python project in ./test_template/
directory. To run tests for supported Python version 3.8, 3.9 and 3.10
you need to have them installed on your system if you do not use
nix
.