From 9e747e02e5b7e78ede0a9ec6955113287d213bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 13 Aug 2024 12:02:00 +0200 Subject: [PATCH] feat: better makefile/tox The make and tox targets that ship with the cookiecutter are a real mess. Here, we reorganise these targets as follows: - tox depends on make commands - make commands do not depend on tox - make commands are more granular, and faster to run. In addition, requirement files are reorganised to avoid circular dependencies and duplicate requirements. Because mypy checks are now run as part of "tox -e quality", we no longer need the mypy github action. Moreover, we introduce the compile-requirements make target, which is useful for compiling requirements without upgrading them. We removed the diff_cover make target, which wasn't working anyway because it defaulted to "--compare-branch=main", and the "main" branch does not exist. --- .github/workflows/mypy.yml | 39 ------------------ .gitignore | 1 + Makefile | 75 +++++++++++++++++++--------------- docs/testing.rst | 15 ++++--- requirements/base.txt | 7 +--- requirements/ci.in | 9 ---- requirements/ci.txt | 30 ++++++-------- requirements/dev.txt | 26 ++++-------- requirements/doc.txt | 39 +++++++----------- requirements/pip-tools.txt | 6 +-- requirements/pip.txt | 2 +- requirements/quality.in | 2 + requirements/quality.txt | 43 ++++++++++++------- requirements/test.in | 3 +- requirements/test.txt | 15 +------ tests/test_views/test_flags.py | 1 - tox.ini | 12 +----- 17 files changed, 121 insertions(+), 204 deletions(-) delete mode 100644 .github/workflows/mypy.yml diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml deleted file mode 100644 index 7a560b91..00000000 --- a/.github/workflows/mypy.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: MyPy Typing Check - -on: - push: - branches: [master] - pull_request: - branches: - - "**" - workflow_dispatch: - -defaults: - run: - shell: bash # opts into error checking - -jobs: - mypy: - name: MyPy Check - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python-version: ['3.11', '3.12'] - - steps: - - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Install MyPy and Dependencies - run: pip install -r requirements/ci.txt - - - name: Run MyPy - run: mypy forum diff --git a/.gitignore b/.gitignore index 481e4edf..5bd68a05 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ pip-log.txt .tox coverage.xml htmlcov/ +pii_report/ # Virtual environments /venv/ diff --git a/Makefile b/Makefile index 147bd879..324455b2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ -.PHONY: clean clean_tox compile_translations coverage diff_cover docs dummy_translations \ - extract_translations fake_translations help pii_check pull_translations push_translations \ - quality requirements selfcheck test test-all upgrade validate install_transifex_client +.PHONY: clean clean_tox compile_translations coverage docs dummy_translations \ + extract_translations fake_translations help pull_translations push_translations \ + quality requirements selfcheck test test-all upgrade install_transifex_client + +SRC_FILES_PROD = forum tests test_utils manage.py +SRC_FILES = ${SRC_FILES_PROD} setup.py test_settings.py .DEFAULT_GOAL := help @@ -32,35 +35,27 @@ docs: ## generate Sphinx HTML documentation, including API docs tox -e docs $(BROWSER)docs/_build/html/index.html -mypy_check: - mypy forum/ tests/ test_utils/ - -# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade. -PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS) - -upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade -upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in - pip install -qr requirements/pip-tools.txt +# Define PIP_COMPILE_OPTS="-v" to get more information during make compile-requirements. +compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade +compile-requirements: ## Re-compile *.in requirements to *.txt + pip install --quiet -r requirements/pip-tools.txt # Make sure to compile files after any other files they include! - $(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in - $(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in - pip install -qr requirements/pip.txt - pip install -qr requirements/pip-tools.txt - $(PIP_COMPILE) -o requirements/base.txt requirements/base.in - $(PIP_COMPILE) -o requirements/test.txt requirements/test.in - $(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in - $(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in - $(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in - $(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in + pip-compile $(COMPILE_OPTS) --allow-unsafe requirements/pip.in + pip-compile $(COMPILE_OPTS) requirements/pip-tools.in + pip install --quiet -r requirements/pip.txt + pip install --quiet -r requirements/pip-tools.txt + pip-compile $(COMPILE_OPTS) requirements/base.in + pip-compile $(COMPILE_OPTS) requirements/test.in + pip-compile $(COMPILE_OPTS) requirements/doc.in + pip-compile $(COMPILE_OPTS) requirements/quality.in + pip-compile $(COMPILE_OPTS) requirements/ci.in + pip-compile $(COMPILE_OPTS) requirements/dev.in # Let tox control the Django version for tests sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp mv requirements/test.tmp requirements/test.txt -quality: ## check coding style with pycodestyle and pylint - tox -e quality - -pii_check: ## check for PII annotations on all Django models - tox -e pii_check +upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in + $(MAKE) compile-requirements COMPILE_OPTS="--upgrade" piptools: ## install pinned version of pip-compile and pip-sync pip install -r requirements/pip.txt @@ -69,17 +64,29 @@ piptools: ## install pinned version of pip-compile and pip-sync requirements: clean_tox piptools ## install development environment requirements pip-sync -q requirements/dev.txt requirements/private.* -test: clean ## run tests in the current virtualenv +test-all: clean test test-quality test-pii selfcheck ## run all tests + +test: ## run unit tests pytest -diff_cover: test ## find diff lines that need test coverage - diff-cover coverage.xml +test-quality: test-lint test-codestyle test-isort test-mypy ## run static coverage tests -test-all: quality pii_check ## run tests on every supported Python/Django combination - tox - tox -e docs +test-lint: ## run pylint + pylint ${SRC_FILES} + +test-codestyle: ## run pycodestyle, pydocstyle + pycodestyle ${SRC_FILES} + pydocstyle ${SRC_FILES} + +test-isort: ## run isort checks + isort --check-only --diff ${SRC_FILES} + +test-mypy: ## run type tests + mypy ${SRC_FILES_PROD} -validate: quality pii_check test ## run tests and quality checks +test-pii: export DJANGO_SETTINGS_MODULE=test_settings +test-pii: ## # check for PII annotations on all Django models + code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage selfcheck: ## check that the Makefile is well-formed @echo "The Makefile is well-formed." diff --git a/docs/testing.rst b/docs/testing.rst index 2810e895..c50ed2ea 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -3,13 +3,12 @@ Testing ####### -forum has an assortment of test cases and code quality -checks to catch potential problems during development. To run them all in the +This project has an assortment of test cases and code quality checks to catch potential problems during development. To run them all in the version of Python you chose for your virtualenv: .. code-block:: bash - $ make validate + $ make test-all To run just the unit tests: @@ -17,24 +16,24 @@ To run just the unit tests: $ make test -To run just the unit tests and check diff coverage +To run just the unit tests and check the difference in coverage with the master branch: .. code-block:: bash - $ make diff_cover + $ diff-cover --compare-branch=master coverage.xml -To run just the code quality checks: +To run just the code quality checks (including mypy checks): .. code-block:: bash - $ make quality + $ make test-quality To run the unit tests under every supported Python version and the code quality checks: .. code-block:: bash - $ make test-all + $ tox -e pii_check,quality,py,docs To generate and open an HTML report of how much of the code is covered by test cases: diff --git a/requirements/base.txt b/requirements/base.txt index 8e729824..3eff6827 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,16 +1,11 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade # asgiref==3.8.1 # via django -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # django - # djangorestframework certifi==2024.7.4 # via requests charset-normalizer==3.3.2 diff --git a/requirements/ci.in b/requirements/ci.in index 4e2f2c5e..631638b2 100644 --- a/requirements/ci.in +++ b/requirements/ci.in @@ -3,12 +3,3 @@ -c constraints.txt -r quality.txt # Core and quality check dependencies - -tox # Virtualenv management for tests - -# mypy for typing checks -mypy - -# add below 2 packages as mypy giving errors of missing stubs -djangorestframework-stubs -types-requests diff --git a/requirements/ci.txt b/requirements/ci.txt index a7eba08a..45e2fd93 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -14,12 +14,6 @@ astroid==3.2.4 # -r requirements/quality.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/quality.txt - # django - # djangorestframework cachetools==5.4.0 # via # -r requirements/quality.txt @@ -74,13 +68,17 @@ django==4.2.15 # django-stubs-ext # djangorestframework django-stubs==5.0.4 - # via djangorestframework-stubs + # via + # -r requirements/quality.txt + # djangorestframework-stubs django-stubs-ext==5.0.4 - # via django-stubs + # via + # -r requirements/quality.txt + # django-stubs djangorestframework==3.15.2 # via -r requirements/quality.txt djangorestframework-stubs==3.15.0 - # via -r requirements/ci.in + # via -r requirements/quality.txt dnspython==2.6.1 # via # -r requirements/quality.txt @@ -123,9 +121,7 @@ mccabe==0.7.0 mongomock==4.1.2 # via -r requirements/quality.txt mypy==1.11.1 - # via - # -r requirements/ci.in - # -r requirements/quality.txt + # via -r requirements/quality.txt mypy-extensions==1.0.0 # via # -r requirements/quality.txt @@ -244,16 +240,15 @@ tomlkit==0.13.0 # -r requirements/quality.txt # pylint tox==4.17.1 - # via - # -r requirements/ci.in - # -r requirements/quality.txt + # via -r requirements/quality.txt types-pyyaml==6.0.12.20240808 # via + # -r requirements/quality.txt # django-stubs # djangorestframework-stubs types-requests==2.32.0.20240712 # via - # -r requirements/ci.in + # -r requirements/quality.txt # djangorestframework-stubs typing-extensions==4.12.2 # via @@ -264,7 +259,6 @@ typing-extensions==4.12.2 # django-stubs-ext # djangorestframework-stubs # mypy - # pylint urllib3==2.2.2 # via # -r requirements/quality.txt diff --git a/requirements/dev.txt b/requirements/dev.txt index a97ea016..f183b652 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -16,13 +16,6 @@ astroid==3.2.4 # -r requirements/quality.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/ci.txt - # -r requirements/quality.txt - # django - # djangorestframework build==1.2.1 # via # -r requirements/pip-tools.txt @@ -101,17 +94,21 @@ django==4.2.15 django-stubs==5.0.4 # via # -r requirements/ci.txt + # -r requirements/quality.txt # djangorestframework-stubs django-stubs-ext==5.0.4 # via # -r requirements/ci.txt + # -r requirements/quality.txt # django-stubs djangorestframework==3.15.2 # via # -r requirements/ci.txt # -r requirements/quality.txt djangorestframework-stubs==3.15.0 - # via -r requirements/ci.txt + # via + # -r requirements/ci.txt + # -r requirements/quality.txt dnspython==2.6.1 # via # -r requirements/ci.txt @@ -139,10 +136,6 @@ idna==3.7 # -r requirements/ci.txt # -r requirements/quality.txt # requests -importlib-metadata==8.2.0 - # via - # -r requirements/pip-tools.txt - # build iniconfig==2.0.0 # via # -r requirements/ci.txt @@ -357,11 +350,13 @@ tox==4.17.1 types-pyyaml==6.0.12.20240808 # via # -r requirements/ci.txt + # -r requirements/quality.txt # django-stubs # djangorestframework-stubs types-requests==2.32.0.20240712 # via # -r requirements/ci.txt + # -r requirements/quality.txt # djangorestframework-stubs typing-extensions==4.12.2 # via @@ -373,7 +368,6 @@ typing-extensions==4.12.2 # django-stubs-ext # djangorestframework-stubs # mypy - # pylint urllib3==2.2.2 # via # -r requirements/ci.txt @@ -389,10 +383,6 @@ wheel==0.44.0 # via # -r requirements/pip-tools.txt # pip-tools -zipp==3.20.0 - # via - # -r requirements/pip-tools.txt - # importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.txt b/requirements/doc.txt index c1607177..fd2084dc 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -18,12 +18,6 @@ babel==2.16.0 # sphinx backports-tarfile==1.2.0 # via jaraco-context -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/test.txt - # django - # djangorestframework beautifulsoup4==4.12.3 # via pydata-sphinx-theme build==1.2.1 @@ -36,6 +30,8 @@ certifi==2024.7.4 # via # -r requirements/test.txt # requests +cffi==1.17.0 + # via cryptography chardet==5.2.0 # via # -r requirements/test.txt @@ -58,6 +54,8 @@ coverage[toml]==7.6.1 # via # -r requirements/test.txt # pytest-cov +cryptography==43.0.0 + # via secretstorage distlib==0.3.8 # via # -r requirements/test.txt @@ -99,12 +97,8 @@ imagesize==1.4.1 # via sphinx importlib-metadata==8.2.0 # via - # build # keyring - # sphinx # twine -importlib-resources==6.4.0 - # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt @@ -115,6 +109,10 @@ jaraco-context==5.3.0 # via keyring jaraco-functools==4.0.2 # via keyring +jeepney==0.8.0 + # via + # keyring + # secretstorage jinja2==3.1.4 # via # -r requirements/test.txt @@ -136,12 +134,6 @@ more-itertools==10.4.0 # via # jaraco-classes # jaraco-functools -mypy==1.11.1 - # via -r requirements/test.txt -mypy-extensions==1.0.0 - # via - # -r requirements/test.txt - # mypy nh3==0.2.18 # via readme-renderer openedx-atlas==0.6.1 @@ -172,6 +164,8 @@ pluggy==1.5.0 # -r requirements/test.txt # pytest # tox +pycparser==2.22 + # via cffi pydata-sphinx-theme==0.14.4 # via sphinx-book-theme pygments==2.18.0 @@ -203,8 +197,6 @@ python-slugify==8.0.4 # via # -r requirements/test.txt # code-annotations -pytz==2024.1 - # via babel pyyaml==6.0.2 # via # -r requirements/test.txt @@ -225,6 +217,8 @@ rfc3986==2.0.0 # via twine rich==13.7.1 # via twine +secretstorage==3.3.3 + # via keyring sentinels==1.0.0 # via # -r requirements/test.txt @@ -271,7 +265,6 @@ tomli==2.0.1 # build # coverage # doc8 - # mypy # pyproject-api # pytest # tox @@ -283,9 +276,7 @@ typing-extensions==4.12.2 # via # -r requirements/test.txt # asgiref - # mypy # pydata-sphinx-theme - # rich urllib3==2.2.2 # via # -r requirements/test.txt @@ -296,6 +287,4 @@ virtualenv==20.26.3 # -r requirements/test.txt # tox zipp==3.20.0 - # via - # importlib-metadata - # importlib-resources + # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 9fa4cfb8..1e415c91 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -8,8 +8,6 @@ build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==8.2.0 - # via build packaging==24.1 # via build pip-tools==7.4.1 @@ -24,8 +22,6 @@ tomli==2.0.1 # pip-tools wheel==0.44.0 # via pip-tools -zipp==3.20.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip.txt b/requirements/pip.txt index a056b764..387a56cf 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade diff --git a/requirements/quality.in b/requirements/quality.in index d9bd64c0..a7b54a87 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -9,3 +9,5 @@ isort # to standardize order of imports pycodestyle # PEP 8 compliance validation pydocstyle # PEP 257 compliance validation mypy +djangorestframework-stubs +types-requests diff --git a/requirements/quality.txt b/requirements/quality.txt index 17f3816b..fb73a98c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -8,16 +8,11 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django + # django-stubs astroid==3.2.4 # via # pylint # pylint-celery -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/test.txt - # django - # djangorestframework cachetools==5.4.0 # via # -r requirements/test.txt @@ -64,9 +59,17 @@ django==4.2.15 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt + # django-stubs + # django-stubs-ext # djangorestframework +django-stubs==5.0.4 + # via djangorestframework-stubs +django-stubs-ext==5.0.4 + # via django-stubs djangorestframework==3.15.2 # via -r requirements/test.txt +djangorestframework-stubs==3.15.0 + # via -r requirements/quality.in dnspython==2.6.1 # via # -r requirements/test.txt @@ -107,13 +110,9 @@ mccabe==0.7.0 mongomock==4.1.2 # via -r requirements/test.txt mypy==1.11.1 - # via - # -r requirements/quality.in - # -r requirements/test.txt + # via -r requirements/quality.in mypy-extensions==1.0.0 - # via - # -r requirements/test.txt - # mypy + # via mypy openedx-atlas==0.6.1 # via -r requirements/test.txt packaging==24.1 @@ -180,7 +179,9 @@ pyyaml==6.0.2 # -r requirements/test.txt # code-annotations requests==2.32.3 - # via -r requirements/test.txt + # via + # -r requirements/test.txt + # djangorestframework-stubs sentinels==1.0.0 # via # -r requirements/test.txt @@ -205,6 +206,7 @@ tomli==2.0.1 # via # -r requirements/test.txt # coverage + # django-stubs # mypy # pylint # pyproject-api @@ -214,17 +216,28 @@ tomlkit==0.13.0 # via pylint tox==4.17.1 # via -r requirements/test.txt +types-pyyaml==6.0.12.20240808 + # via + # django-stubs + # djangorestframework-stubs +types-requests==2.32.0.20240712 + # via + # -r requirements/quality.in + # djangorestframework-stubs typing-extensions==4.12.2 # via # -r requirements/test.txt # asgiref # astroid + # django-stubs + # django-stubs-ext + # djangorestframework-stubs # mypy - # pylint urllib3==2.2.2 # via # -r requirements/test.txt # requests + # types-requests virtualenv==20.26.3 # via # -r requirements/test.txt diff --git a/requirements/test.in b/requirements/test.in index e6dd4f15..9d0daaee 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -5,7 +5,6 @@ pytest-cov # pytest extension for code coverage statistics pytest-django # pytest extension for better Django support -code-annotations # provides commands used by the pii_check make target. +code-annotations # provides commands used by the pii_check tox target. tox mongomock -mypy diff --git a/requirements/test.txt b/requirements/test.txt index f6543fc0..7cb32d1f 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # make upgrade @@ -8,12 +8,6 @@ asgiref==3.8.1 # via # -r requirements/base.txt # django -backports-zoneinfo==0.2.1 ; python_version < "3.9" - # via - # -c requirements/constraints.txt - # -r requirements/base.txt - # django - # djangorestframework cachetools==5.4.0 # via tox certifi==2024.7.4 @@ -36,6 +30,7 @@ coverage[toml]==7.6.1 # via pytest-cov distlib==0.3.8 # via virtualenv +django==4.2.15 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt @@ -64,10 +59,6 @@ markupsafe==2.1.5 # via jinja2 mongomock==4.1.2 # via -r requirements/test.in -mypy==1.11.1 - # via -r requirements/test.in -mypy-extensions==1.0.0 - # via mypy openedx-atlas==0.6.1 # via -r requirements/base.txt packaging==24.1 @@ -117,7 +108,6 @@ text-unidecode==1.3 tomli==2.0.1 # via # coverage - # mypy # pyproject-api # pytest # tox @@ -127,7 +117,6 @@ typing-extensions==4.12.2 # via # -r requirements/base.txt # asgiref - # mypy urllib3==2.2.2 # via # -r requirements/base.txt diff --git a/tests/test_views/test_flags.py b/tests/test_views/test_flags.py index 57ae16df..510f3e85 100644 --- a/tests/test_views/test_flags.py +++ b/tests/test_views/test_flags.py @@ -2,7 +2,6 @@ from unittest.mock import Mock, patch -from bson import ObjectId from django.test import Client from forum.models.contents import Contents diff --git a/tox.ini b/tox.ini index 3ce71e29..35932cc4 100644 --- a/tox.ini +++ b/tox.ini @@ -74,19 +74,11 @@ allowlist_externals = deps = -r{toxinidir}/requirements/quality.txt commands = - touch tests/__init__.py - pylint forum tests test_utils manage.py setup.py - rm tests/__init__.py - pycodestyle forum tests manage.py setup.py - pydocstyle forum tests manage.py setup.py - isort --check-only --diff tests test_utils forum manage.py setup.py test_settings.py - make selfcheck + make test-quality selfcheck [testenv:pii_check] -setenv = - DJANGO_SETTINGS_MODULE = test_settings deps = -r{toxinidir}/requirements/test.txt commands = - code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage + make test-pii