Skip to content

Clean tox config #2134

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

Merged
merged 4 commits into from
Jul 28, 2025
Merged

Clean tox config #2134

merged 4 commits into from
Jul 28, 2025

Conversation

ulgens
Copy link
Member

@ulgens ulgens commented Jul 22, 2025

Relates to #1890

Removes black, flake8, and isort from tox config. All of them are already handled by pre-commit.

About the new action;

I am a bit hesitant about using https://pre-commit.ci/ for pre-commit checks, for several reasons:

  • It doesn't allow selecting which Python version to run pre-commit on
  • Auto-fix commits create "fix typo" type of small - meaningless commits, which I believe is a bad practice.
  • It's an external service that duplicates the functionality of GitHub Actions, but only for pre-commit.
  • Has no configuration info in the repository

My vote here would be to disable that integration and continue with the action. I can revert the new action if the consensus is to not change it, but I wanted to include it because the cleaning in the PR makes the CI more dependent on pre-commit.

ulgens added 3 commits July 22, 2025 04:43
Already handled by pre-commit
Already handled by pre-commit
Already handled by pre-commit
@ulgens ulgens marked this pull request as ready for review July 22, 2025 01:56
@ulgens ulgens mentioned this pull request Jul 22, 2025
@ulgens ulgens requested a review from Copilot July 22, 2025 12:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR cleans up the tox configuration by removing redundant code quality tools (black, flake8, and isort) that are already handled by pre-commit, and introduces a dedicated GitHub Actions workflow for pre-commit checks. The changes streamline the CI pipeline by eliminating duplication between tox and pre-commit tooling.

  • Removed black, flake8, and isort environments from tox configuration
  • Added a new GitHub Actions workflow specifically for pre-commit checks
  • Updated documentation to reflect the simplified testing approach

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tox.ini Removed black, flake8, and isort test environments and dependencies
requirements/dev.txt Removed isort dependency as it's now handled by pre-commit
README.rst Updated documentation to remove reference to flake8 in testing description
Makefile Removed isort and isort-check targets
.github/workflows/pre-commit.yml Added new GitHub Actions workflow for running pre-commit checks

Copy link
Member

@bmispelon bmispelon left a comment

Choose a reason for hiding this comment

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

I haven't been able to test this, but the proposed changes appear to make sense.

Regarding the use of pre-commit.ci, I personally don't have any preferences. I'd say do whatever works best. As you wrote, nothing is set in stone and if things don't work out we can always revert.

Nice work! 🧹

@ulgens ulgens requested a review from a team July 26, 2025 09:45
@ulgens ulgens self-assigned this Jul 27, 2025
Copy link
Contributor

@SaptakS SaptakS left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

@SaptakS SaptakS merged commit 3c3dad2 into django:main Jul 28, 2025
5 checks passed
@ulgens ulgens deleted the pre-commit-ci branch July 28, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants