Apply linting to entire codebase & add CI workflow to check linting#3216
Draft
deruyter92 wants to merge 51 commits intomainfrom
Draft
Apply linting to entire codebase & add CI workflow to check linting#3216deruyter92 wants to merge 51 commits intomainfrom
deruyter92 wants to merge 51 commits intomainfrom
Conversation
restore CI as in main
…eepLabCut into arash_and_jaap/uv_packaging
- Edit pyproject.toml - Keep setup.py for backward compatibility
…eepLabCut into arash_and_jaap/uv_packaging
Co-authored-by: Cyril Achard <[email protected]>
Co-authored-by: Cyril Achard <[email protected]>
Co-authored-by: Cyril Achard <[email protected]>
Co-authored-by: Cyril Achard <[email protected]>
Co-authored-by: Cyril Achard <[email protected]>
Update .pre-commit-config.yaml to add TOML support and pyproject checks: include the check-toml hook and add pyproject-fmt (rev v2.15.2) and validate-pyproject (rev v0.25) repositories. These hooks enforce formatting and validation for pyproject.toml files as part of pre-commit.
Add automated pyproject.toml
[tool.ruff] lint.select = ["E", "F", "B", "I", "UP"] lint.ignore = ["E741"] target-version = "py310" fix = true line-length = 120 [tool.ruff.lint.pydocstyle] convention = "google" [tool.pyproject-fmt] max_supported_python = "3.12" generate_python_version_classifiers = true # Avoid collapsing tables to field.key = value format (less readable) table_format = "long"
This was referenced Feb 23, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of the task described in issue #3217
Motivation:
Linting has not been applied consistently in existing codebase. Following DeepLabCut/DeepLabCut-live#166, it would be great to introduce a modern and consistent linting configuration again, after reformatting the codebase.
Order of merging:
Changes:
(Copies the procedure from DeepLabCut/DeepLabCut-live#166, by @C-Achard )
Note: By running this command, the formatting could be applied easily in a separate PR. This requires step 2 to be completed (having an updated pyproject.toml which include the new linting configuration).