This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Description
#584 started a little discussion on where to put tool configurations (for mypy, pytest, etc).
I would like to propose the following steps to improve the pipeline:
mypy
The mypy configuration has already been moved to pyproject.toml in #584.
- Change
mypy src/ to mypy . in tox.ini (this currently leads to two easy to fix issues)
pytest
- Move the
[pytest] section from tox.ini to a [tool.pytest] section in pyproject.toml
- Add
--cache-clear and -vv to the [tool.pytest] section of pyproject.toml and remove them as command line arguments in tox.ini
- Move
src/tests to tests and change pytest src/tests {posargs} to pytest {posargs} in tox.ini
pydocstyle
- Move the
[py257] section from tox.ini to a [tool.pydocstyle] section in pyproject.toml
Where is this configuration used in the pipeline? I don't see pydocstyle being invoked anywhere.
black
- Change
black --check src/pydocstyle to black --check . in tox.ini
isort
- Change
isort --check src/pydocstyle to isort --check . in tox.ini
The aforementioned changes allow simply running pytest, mypy ., black . and isort . in the project folder. Furthermore, the changes facilitate setting up these tools in an IDE (e.g., format on save in VS Code) without having to specify any options.