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] Migrate fromconda to uv #6060

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
46 changes: 30 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,49 @@

## Prerequisites

* `conda` (We recommend Miniconda installed with an [official installer](https://docs.conda.io/projects/miniconda/en/latest/index.html#latest-miniconda-installer-links))
* `uv`

* [`conda-lock`](https://github.com/conda/conda-lock)
For MacOS / Linux:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

## Set up the build environment

In the `flyteorg/flyte` root directory do:
For Windows, use irm to download the script and execute it with iex:

```bash
$ conda-lock install --name monodocs-env monodocs-environment.lock.yaml
$ conda activate monodocs-env
$ pip install ./flyteidl
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.5/install.ps1 | iex"
```

This creates a new environment called `monodocs-env` with all the dependencies needed to build the docs. You can choose a different environment name if you like.
To install via PyPi:

```bash
pipx install uv
```

## Building the docs
or

In the `flyteorg/flyte` root directory make sure you have activated the `monodocs-env` (or whatever you called it) environment and do:
```bash
pip install uv
```


## Setup the build environment

```bash
# need to set this to a fake value to build the docs locally
$ export DOCSEARCH_API_KEY=fake-api-key
uv venv
source .venv/bin/activate
uv sync
uv pip install ./flyteidl
```

## Building the docs

```bash
$ make docs
export DOCSEARCH_API_KEY=fake-api-key
export FLYTEKIT_LOCAL_PATH=<PATH_TO_LOCAL_FLYTEKIT_REPO>
export FLYTESNACKS_LOCAL_PATH=<PATH_TO_LOCAL_FLYTESNACKS_REPO>
uv run make docs
```

The resulting `html` files will be in `docs/_build/html`.
The resulting `html` files will be in `docs/_build/html`.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"sphinx_copybutton",
"sphinx_docsearch",
"sphinxext.remoteliteralinclude",
"sphinx_issues",
#"sphinx_issues",
"sphinx_click",
"sphinx_design",
"sphinx_reredirects",
Expand Down
Loading
Loading