Skip to content
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

docs: update uv instructions #11322

Merged
merged 3 commits into from
May 14, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions docs/user/build-customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ Take a look at the following example:
Install dependencies with ``uv``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Projects managed with `uv <https://github.com/astral-sh/uv/>`__,
can use the ``post_create_environment`` user-defined job to use ``uv`` for installing Python dependencies.
Projects can use `uv <https://github.com/astral-sh/uv/>`__,
to install Python dependencies, usually reducing the time taken to install compared to pip, possibly dramatically.
humitos marked this conversation as resolved.
Show resolved Hide resolved
Take a look at the following example:


Expand All @@ -373,19 +373,15 @@ Take a look at the following example:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
# Install uv
- pip install uv
post_install:
# Install dependencies with 'docs' dependency group
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[docs]

sphinx:
configuration: docs/conf.py

commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv
- uv pip install .[docs]
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html

You can use ``-r docs/requirements.txt``, etc. instead as needed. And mkdocs would use ``NO_COLOR=1 .venv/bin/mkdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html``.
humitos marked this conversation as resolved.
Show resolved Hide resolved

Update Conda version
^^^^^^^^^^^^^^^^^^^^
Expand Down