Skip to content
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

Pin dependencies (especially black) #1537

Open
lukaspie opened this issue Jan 31, 2025 · 3 comments
Open

Pin dependencies (especially black) #1537

lukaspie opened this issue Jan 31, 2025 · 3 comments
Labels
workflows Continuous integration and deployment

Comments

@lukaspie
Copy link
Contributor

See comments in #1413 (comment) and #1536.

Black, flake8, and isort are not pinned in the requirement.txt file, but rather lower bound. This can lead to issues with the Github CI/CD (that internally runs make style), meaning that changes to the dev_tools code need to mixed in with changes to the definitions. The easiest solution is to pin these dependencies explicitly and update their versions in the requirement.txt from time to time.

@prjemian
Copy link
Contributor

What about ruff instead of black, flake8, and isort? The web page describes advantages. One relevant advantage here is the ability to define expected behavior in a configuration file.

@prjemian
Copy link
Contributor

Another interesting tool is pre-commit,

a framework for managing and maintaining multi-language pre-commit hooks.

Use of such tools can improve the code style consistency of changes pushed to GitHub.

@lukaspie
Copy link
Contributor Author

We have been using ruff and its pre-commit hook across our codebase a lot, it's great. If you want, I can set it up here / sent you to the relevant setup that we are using. But, ruff is also actively being developed and new linting rules are added continously, so you have the same issue with pinning a version as with the other tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflows Continuous integration and deployment
Projects
None yet
Development

No branches or pull requests

2 participants