-
-
Notifications
You must be signed in to change notification settings - Fork 707
use uv as venv/dependency orchestrator #17978
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
Conversation
note that while the diff is huge, uv.lock is a very huge file. |
Last run of Prepare source code on master: 7m 19s |
@LeonarddeR Regarding the constraint on Pillow, uv does support the -C option to pass on options to the builder, but those are not saved in pyproject.toml or uv.lock. Besides this, even if I remove Pillow and re-add it with the -C options specified, it just gets the wheel and builds nothing. So yes, I think we no longer need this. |
See test results for failed build of commit 49f897d871 |
Please mark this as ready when both AppVeyor and GH actions builds are succeeding. I want to be able to compare build times |
I think it might be better to make uv.lock generated on GitHub actions. I don't know if we can trust community generated changes super easily. For this PR I would be generating the file myself and comparing the diff |
See test results for failed build of commit 1b0703ae9b |
See test results for failed build of commit 720cb37e15 |
The lock file is meant to go into version control. This is ultimately the way to get a consistent build experience. NO longer changing dependencies without being aware of it. |
unfortunately, the run nvda script leaves an empty window open. See astral-sh/uv#11786 |
I think the lock file should be in version control, but generated and committed by a CI action. Or at the very least, verified against a CI built file when changed. Is this feasible and does it make sense for development? |
@seanbudd As long as we keep version constraints in pyproject.toml I see the lock file as an additional safeguard to get the exact dependencies we expect. It gives us more granular control then the requirements.txt. We could choose to set wider version constraints in pyproject, for example Running |
See test results for failed build of commit bf2589278c |
See test results for failed build of commit c38744f1a5 |
See test results for failed build of commit 425e1eade6 |
See test results for failed build of commit e2c29b856f |
Please note: The l10nUtil tool in NVDA launcher cannot run:
|
Thanks @wmhn1872265132, should be fixed now. |
…untime deps" This reverts commit 23d057f.
@@ -20,7 +17,7 @@ if (!$env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:versionType) { | |||
} | |||
|
|||
# Save an exact list of the actual Python packages and their versions that got installed, to aide in reproducing a build | |||
.\venvUtils\exportPackageList.bat installed_python_packages.txt | |||
uv export -q > installed_python_packages.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think removing it makes sense
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
See nvaccess/nvda#17978 This ensures that python miscDeps become a python package that can be included as dependency in uv. Then it is no longer necessary to use a sourceEnv script.
See test results for failed build of commit 4d04d567b0 |
@LeonarddeR - the build is failing here |
I'm ot sure whether the system test failures are related here, given they succeeded on gh Actions this time. May be there is a dependency difference that increases the likelyhood of failure, I'lll investigate. |
@LeonarddeR - my mistake - I thought GH was still failing. The chrome test failure should be fine to ignore |
Thanks for this PR! |
@LeonarddeR I just realize that uv mention in projectDocs/dev/createDevEnvironment.md is very brief. Having to create a new environment, I have read it more carefully. The doc reads:
and the paragraph is along with Python and MS Visual Studio among the dependencies to be installed. So I guess I should use the command line on the page linked to install it. On the other side, the change log reads:
So should we rather expect to be suggested a strategy? Or maybe it was just intended for people already having an old environment installed? |
Link to issue number:
Depends on nvaccess/nvda-misc-deps#36
closes #17935
Summary of the issue:
We're currently handling the NVDA virtual environment with custom scripts. Furthermore, we use requirements.txt as our only locking mechanism.
Description of user facing changes
Description of development approach
Testing strategy:
Test running from source as well as basic tests of build artifacts.
Ensured that switching from master to my uv branch works, i.e. it is not necessary to rebuild the venv though I think it is encouraged to do so.
Known issues with pull request:
I initially considered switching to the uv provided python builds, i.e. https://github.com/astral-sh/python-build-standalone/
However, there are several show stoppers with that:
We probably want to handle this in a follow up. At first sight, apart from the tests, things mostly worked as normal.
I was also unable to handle the constraint in constraints.txt as uv doesn't seem to understand it. That said, regardless whether I'm using the constraint or not, there seems to be a wheel for pillow, so I don't see why this constraint is still necessary.
Code Review Checklist:
@coderabbitai summary