Skip to content

Commit

Permalink
Updated developer guide to use mypy and pytype tests (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
roshanmaskey authored Oct 31, 2024
1 parent e859ade commit bff9298
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/developers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,24 @@ There are **two** locations to register new modules:

It is recommended to run tests locally to discover issues early in the development lifecycle.

```shell
pip install pylint
pylint --rcfile .pylintrc UPDATED_SOURCE_FILE
```

```bash
pip install poetry
poetry install
poetry run python -m unittest discover -s tests -p '*.py'
poetry run mypy --install-types --cache-dir .mypy_cache --non-interactive -p dftimewolf
poetry run pytype --config pytype.conf
```

Docker equivalent:

```bash
cd docker/dev
docker compose run --rm dftw tests
docker compose run --rm -v `pwd`/../../:/app dftw poetry run mypy --install-types --cache-dir /tmp/.mypy_cache --non-interactive -p dftimewolf
docker compose run --rm -v `pwd`/../../:/app dftw poetry run pytype --config /app/pytype.conf
```

0 comments on commit bff9298

Please sign in to comment.