-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Add requirements files for testing, linting, and documentation #37461
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit 5ea446f; changes) is ready! 🎉 |
@roed314 @jhpalmieri I set "disputed" here because when the PR was opened, I was not able to comment because Tobias had blocked me without explanation or giving notice to the sage-abuse committee. It appears that now I can comment, so I am removing "disputed". |
I have not looked at this proposal in more detail. But I have to note that project will not need "docs-requirements" because we have a proper solution for building the docs in:
|
Some more examples please - the PR description only gives scipy as an example that uses this folder (it was only added a few months ago). Overall, such changes of the top-level structure (what's in SAGE_ROOT) would probably benefit from a broader discussion. |
It wouldn't close PR #35890 - as it only takes care of a few packages, whereas #35890 is about the full dependency graph including non-Python packages. Best to remove this closing reference from the PR description. |
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) that transforms the abstract version constraints into pinned version specifications inrequirement.txt
files. This is more convienent thanpip freeze
as the dependencies do not have to be installed. The script can be tested withpython tools/update-lock.py src
(afterpip install pip-tools
).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).
📝 Checklist
⌛ Dependencies
pyproject.toml
#37446