Add requirements files for testing, linting, and documentation #37461
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.
We add *-requirements.txt files for locking the dependencies used in ci runs. The need for such a locking was raised on the mailing list. Here we following the (or, rather, a) standard approach to this problem as outlined by @mkoeppke in https://groups.google.com/g/sage-devel/c/MIU-xo9b7pc/m/cD7__bOUAAAJ:
The metadata is store in the
pyproject.toml
file added in #37446, the locked down requirements files are stored in the folderrequirements
(which seems to be the usual convention). The only difference is that we use a simple wrapper aroundpip compile
( https://github.com/jazzband/pip-tools). This is more convienent thanpip freeze
as the dependencies do not have to be installed.Since the PR #37446 is sadly also "disputed", we only commit the resulting requirements files, the wrapper to update them will be another PR.
The resulting setup is completely in line with the standards set by other "huge" python projects, eg https://github.com/scipy/scipy/tree/main/requirements or https://github.com/scikit-learn/scikit-learn/tree/main/build_tools/azure.
The generated requirement files are then used in the ci runs. As a positive side-effect, github will parse these requirement files and show them correctly in the dependency graph (this closes #35890).
Marking as blocker because I think it's important enough to get into the beta.
📝 Checklist
⌛ Dependencies