Skip to content

Remove tox #2135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
branch = 1

[report]
omit = .tox*,*tests*,*migrations*
omit = *tests*,*migrations*
15 changes: 5 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ on:
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
# tox-gh-actions will only run the tox environments which match the currently
# running python-version. See [gh-actions] in tox.ini for the mapping.
python-version: ["3.12"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference would be to leave the matrix strategy in place, remove the comment about tox-gh-actions, and add a comment to say that new Python versions can be added here when upgrading to support both side by side.

Copy link
Member Author

@ulgens ulgens Jul 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tobiasmcnulty , this was discussed in #1890 (comment) . Because we don't need to support multiple versions at the same deployment, Python version updates and their testing / QA processes can be handled in their own branches. I see no harm in keeping the matrix but I also don't see the benefit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, because of Trac, I don't think we will be able to update the Python version any time soon. This was one of the major points for discussions about moving away from Trac.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ulgens, if I recall, upgrading the website separately from Trac is the benefit of the matrix strategy.

I'm not very familiar with the dependencies between the two repos, but perhaps we should add python3.11 to the matrix now, since that's what Trac is using? Maybe you have some insight on this @bmispelon?

When I added 3.12 support for the website, a few requirements had to remained pinned to the older versions I believe so as not to break the Trac integration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


services:
postgres:
Expand All @@ -35,10 +29,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools coveralls "tox<5" "tox-gh-actions<4"
python -m pip install --upgrade pip setuptools coveralls
python -m pip install -r requirements/tests.txt
- name: Set up databases
run: |
PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost
Expand All @@ -59,9 +54,9 @@ jobs:
echo '"trac_db_host": "localhost", ' >> conf/secrets.json
echo '"trac_db_password": "secret", ' >> conf/secrets.json
echo '"secret_key": "a"}' >> conf/secrets.json
- name: Run tox
- name: Run tests
run: |
python -m tox
make ci
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ locale/*/LC_MESSAGES/django.mo
.coverage
.direnv
.envrc
.tox
djangoproject/cache
djangoproject/static/css/*.map
djangoproject/static/css/*.css
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ repos:
hooks:
- id: djhtml
files: .*/templates/.*\.html$
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.6.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/mrtazz/checkmake.git
rev: 0.2.2
hooks:
Expand Down
8 changes: 2 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,13 @@ Our test results can be found here:

* https://github.com/django/djangoproject.com/actions

For local development don't hesitate to install
`tox <https://tox.readthedocs.io/>`_ to run the website's test suite.

Then in the root directory (next to the ``manage.py`` file) run::

tox
make test

Behind the scenes, this will run the usual ``python -m manage test`` management
command with a preset list of apps that we want to test. We
collect test coverage data as part of that tox run, to show the result
collect test coverage data as part of that test run, to show the result
simply run::

python -m coverage report
Expand Down Expand Up @@ -364,7 +361,6 @@ Running Locally with Docker

4. Run the tests::

docker compose run --rm web tox
docker compose run --rm web python -m manage test

Pre-commit checks
Expand Down
1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
coverage==7.10.2
requests-mock==1.12.1
tblib>=3.0.0
tox<5.0.0
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = djangodocs,.tox,*/migrations/*,.direnv,.venv
exclude = djangodocs,*/migrations/*,.direnv,.venv
ignore = F405,W504,W503
# black enforces an 88 char line length but in some edge cases it's unable to
# do so, and in that case it creates an unresolvable E501 error. The solution
Expand All @@ -11,7 +11,7 @@ per-file-ignores =
[isort]
line_length = 88
profile = black
skip = .tox,djangodocs,.direnv,.venv
skip = djangodocs,.direnv,.venv
known_first_party = accounts,aggregator,blog,contact,dashboard,djangoproject,docs,foundation,fundraising,legacy,members,releases,svntogit,tracdb
combine_as_imports = true
include_trailing_comma = true
Expand Down
15 changes: 0 additions & 15 deletions tox.ini

This file was deleted.