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

Run pre-commit for changes to pyproject.toml #2098

Closed
wants to merge 1 commit into from

Conversation

davidwtbuxton
Copy link

The pre-commit hook should run when a git change includes edits to a pyproject.toml file, because that file may be used for listing a project's dependencies.

No tests were updated.

@webknjaz
Copy link
Member

Hi there! Thanks for the contrib. My feeling is that we shouldn't attempt to enumerate every possible input file there. The reason is that every end-user has unique configuration, and they should identify which files they use and which ones shouldn't be accessed by pip-tools. There's also setup.cfg / setup.py, and numerous conventions on where to put the .in + .txt file pairs. For example, I have requirements/*.in in projects where I use pip-tools to make a DIY lockfile for the environments.

So my initial feeling is that we shouldn't accept this change, which might even be breaking for a number of the end-users because of the changed defaults. Instead, it would be useful to have a PR explaining the use in the README/documentation.

@davidwtbuxton
Copy link
Author

Hi @webknjaz thanks for reviewing this pull request and explaining why you are not in favour of accepting the change. I think that pyproject.toml will be increasingly popular for specifying dependencies, so perhaps it will make sense to change this default in future, but I am happy for this change to be closed and not merged right now.

@webknjaz
Copy link
Member

@davidwtbuxton pyproject.toml cannot possibly encapsulate the diversity of use cases, though. People tend to confuse different types of dependencies and environments, and forget what they lock, actually: #1326 (comment). Until https://discuss.python.org/t/lock-files-again-but-this-time-w-sdists/46593 is a thing, I doubt there's going to be any useful convention to follow.

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.

2 participants