Initial commit

This commit is contained in:
Alexander Wainwright 2023-06-01 20:14:37 +10:00
parent 747e53d6b0
commit e7079c2e17
10 changed files with 732 additions and 122 deletions

View file

@ -44,16 +44,3 @@ The decisions `cookiecutter-pypackage-minimal` makes should all be explained her
When installing from source, the user may not have the packages dependencies installed, and importing the package is likely to raise an `ImportError`.
* **setup.py should be the canonical source of package dependencies**
There is no reason to duplicate dependency specifiers (i.e. also using a `requirements.txt` file). See the testing section below for testing dependencies.
### Testing
* **Use [Tox](https://tox.readthedocs.io) to manage test environments**
Tox provides isolation, runs tests across multiple Python versions, and ensures the package can be installed.
* **Uses [pytest](https://docs.pytest.org) as the default test runner**
This can be changed easily, though pytest is a easier, more powerful test library and runner than the standard library's unittest.
* **Define testing dependencies in `tox.ini`**
Avoid duplicating dependency definitions, and use `tox.ini` as the canonical description of how the unittests should be run.
* **`tests` directory should not be a package**
The `tests` directory should not be a Python package unless you want to define some fixtures.
But the best practices are to use [PyTest fixtures](https://docs.pytest.org/en/latest/fixture.html) which provides a better solution.
Therefore, the `tests` directory has no `__init__.py` file.