-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
GitHub Actions: Simplify requirements cache #10288
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## main #10288 +/- ##
=======================================
Coverage 95.86% 95.86%
=======================================
Files 175 175
Lines 19074 19074
=======================================
Hits 18286 18286
Misses 788 788 π New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
Let's separate pypy3.10 fix / caching changes / pypy 3.11 support. I can see the former being merged relatively fast but 49 failing tests is going to take a while (and afaik no maintainer is using pypy). |
The cache logic changes look a great improvement but do you need to explicitly switch on the caching for pip? Supported package managers are pip, pipenv and poetry. The cache input is optional, and caching is turned off by default. https://github.com/actions/setup-python?tab=readme-ov-file#caching-packages-dependencies |
I find the blending of requirements in pyproject.toml AND in multiple requirements_*.txt files to be quite confusing but perhaps all the combinations and permutations of add-ons and plugins make that necessary. I will create a different PR to try to use |
This comment has been minimized.
This comment has been minimized.
afair it's a choice we did because someone preferred to be able to have requirements.txt 2/3 years ago. Personally I add an extra called dev / test in the pyproject.toml and remove requirements.txt (but it does create an extra on pypi that no one is supposed to use). If you have a proposal that is better / simpler than what we currently have I'm open to it. |
PEP 735 defines dependency groups, which do extactly what Pierre suggested here, without having to create extras in |
For me, the confusion comes in here Line 1 in f98805e
and pylint/requirements_test_min.txt Line 1 in f98805e
where requirements.txt files can import other requirements files and even optional-dependencies from pyproject.toml .
I guess we will need to use dependency groups that specify all dependencies that they need. |
PEPβ―735 dependency groups are intended to be self-contained lists of dependencies, so one group cannot automatically include extras from another (e.g. using .[testutils, spelling]). I believe this kind of composition isnβt possible with dependency groups, though I'm not entirely sure. Before implementing any changes, it would be wise to wait until this feature is officially released in pip. |
Or stop using pip and use uv instead. |
While I am also a fan of uv, I do not think that forcing everyone to use it is the way to go here. Moving the github actions to uv makes sense though to improve speed. |
Agree with @Julfried here, we should not force uv on every potential contributor, let's wait for pip support for that and the github action can use uv in the meantime. |
Another thing though is that we're caching pylint editable install and we should not (it makes the doc generation and config file exemple generation checks fail unexpectedly) |
This comment has been minimized.
This comment has been minimized.
bf35eba
to
aa836fd
Compare
This comment has been minimized.
This comment has been minimized.
Other idea: what if we run this new setup in parallel and check if it fixes all caching issues? Then we don't need to worry about porting everything and stuff potentially breaking. We can just make it a non required workflow and migrate once we deem it to be finished. |
|
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit e6e4048 |
I would agree here. Also I think we should first add dependency groups to |
I think you folks have a clearer idea of what you want than I do, so please create the required PRs. |
Type of Changes
Description
Why recreate a venv and keep reactivating that venv at each job step when actions/setup-python already automatically does so?
Why keep dependencies in both pyproject.toml and multiple requirements_*.txt files which make cache key calculation complex?
Remove the complex cache gymnastics to see if pytests can pass on PyPy 3.11.
Refs #XXXX
Closes #10287
Closes #10286
The one failing pytest on PyPy3.9 and PyPy3.10 seems to be a full path vs. partial path difference.
Which is minor but the 48 other failing pytests on PyPy3.11 seem to require attention.