-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
More concise uv example #11946
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
More concise uv example #11946
Conversation
This provides a more succinct uv example using `uv sync`
html: | ||
- uv run sphinx-build -T -b html docs $READTHEDOCS_OUTPUT/html | ||
|
||
MkDocs projects could use ``NO_COLOR=1 uv run mkdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html`` instead. |
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.
Seems this is removing the build step completely?
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.
It's no longer overriding the build step because it doesn't need to, since uv
is installing things in the regular RTD virtualenv. Here's a screenshot of a real run of this (from canonical/starbase#330):
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.
And the full build log: starbase-build-log.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.
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.
This example still isn't really a common uv use case though? I think we want to show people how to use uv
in a way that makes it really clear what the steps are?
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'm not sure why this wouldn't be a common uv case? This is using uv's project management and lock file, where the previous example uses uv as a drop-in replacement for pip but doesn't use uv.lock
This also matches quite well to the poetry steps above the example.
Fully agree with @lengau here. While the uv example currently in the docs, relies on requirements.txt superseeded by dependencies and dependency-groups in pyproject.toml and breaks all output formats except for html, this one is able to just really on the default build steps making it a lot more flexible. I did propose essentially the same strategy in #12033, only moving the package installation fully into |
The problem with this update is that it doesn't explain |
Hmm, All of that is explained in good detail in the uv projects guide . The lesser known trick here is that setting the environment variable But anyway, I hear that by adding a bit of context around this update, you think it would become acceptable. I'll propose something then. |
Yea, I think explaining the code snippet and what state is required to make it work is great. We have requirements and other things mentioned a lot in our docs, but don't have |
Superseded by #12064 |
This provides a more succinct uv example using
uv sync
. It also has the benefit of not requiring overriding of anybuild
steps.📚 Documentation previews 📚
docs
): https://docs--11946.org.readthedocs.build/en/11946/dev
): https://dev--11946.org.readthedocs.build/en/11946/