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

Improve tool configuration and usability #586

@Mr-Pepe

Description

@Mr-Pepe

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions