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

Conversation

chmod77
Copy link
Contributor

@chmod77 chmod77 commented Nov 29, 2024

Why are the changes needed?

  • Replacing conda/mini-conda with uv as the preferred package management toolchain
  • uv offers significant improvements in speed, reliability and reproducibility for Python dependency management (see uv highlights)
  • Reduces complexity by eliminating the need for conda-specific environment management.
  • uv provides comprehensive project management, with a universal lockfile
  • plus so so much more

What changes were proposed in this pull request?

  • Migrated package dependencies to uv.lock file and its accompanying pyproject.toml file.
  • Replaced conda environment config with the uv setup.
  • Updated docs. See Setup Documentation
    to show how to setup and build the docs.

How was this patch tested?

  • Generated uv.lock: (pinned the requirements from the conda environment)
  • Verified all package versions and dependencies are correctly locked
  • Tested environment creation and package installation using the new uv-based workflow.
  • Built and served the docs locally.

Setup process

  1. Install uv (See Setup Docs or uv installation instructions)
  2. Run uv sync to configure the project and environment
  3. Use uv to create virtual environment and install dependencies

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

@chmod77 chmod77 requested a review from ppiegaze as a code owner November 29, 2024 15:55
Copy link

welcome bot commented Nov 29, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

@chmod77 chmod77 force-pushed the shalom/switch-conda-to-uv branch from a99e3e5 to 73e6e77 Compare November 29, 2024 15:57
@chmod77 chmod77 changed the title build: migrate conda to uv [docs] migrate conda to uv Nov 29, 2024
@chmod77 chmod77 changed the title [docs] migrate conda to uv [docs] Migrate fromconda to uv Nov 29, 2024
@ppiegaze
Copy link
Member

ppiegaze commented Nov 29, 2024

I think we will also need to:

  • Adapt the following files to use uv instead of conda:

    • Makefile
    • docs/Dockerfile.conda-lock
    • docs/Dockerfile.docs
    • .readthedocs.yml
  • Delete the following files:

    • monodocs-environment.lock.yaml
    • monodocs-environment.yaml
    • docs/build-environment.yaml

@cosmicBboy Does this make sense?

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.10%. Comparing base (0585fba) to head (73e6e77).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6060   +/-   ##
=======================================
  Coverage   37.10%   37.10%           
=======================================
  Files        1318     1318           
  Lines      132326   132326           
=======================================
+ Hits        49099    49100    +1     
+ Misses      78955    78954    -1     
  Partials     4272     4272           
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.10% <ø> (ø)
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 62.29% <ø> (ø)
unittests-flyteidl 7.23% <ø> (ø)
unittests-flyteplugins 53.82% <ø> (ø)
unittests-flytepropeller 42.63% <ø> (ø)
unittests-flytestdlib 57.59% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ppiegaze
Copy link
Member

ppiegaze commented Dec 5, 2024

@cosmicBboy @eapolinario
What are docs/Dockerfile.conda-lock and docs/Dockerfile.docs for?
Do we need them?

@cosmicBboy
Copy link
Contributor

cosmicBboy commented Dec 5, 2024

looks like they're being used in the Docker-based docs build command here:

flyte/Makefile

Lines 94 to 103 in ba331fd

$(TMP_BUILD_DIR)/conda-lock-image: docs/Dockerfile.conda-lock | $(TMP_BUILD_DIR)
docker buildx build --load --platform=linux/amd64 --build-arg USER_UID=$$(id -u) --build-arg USER_GID=$$(id -g) -t flyte-conda-lock:latest -f docs/Dockerfile.conda-lock .
touch $(TMP_BUILD_DIR)/conda-lock-image
monodocs-environment.lock.yaml: monodocs-environment.yaml $(TMP_BUILD_DIR)/conda-lock-image
docker run --platform=linux/amd64 --rm --pull never -v ./:/flyte flyte-conda-lock:latest lock --file monodocs-environment.yaml --lockfile monodocs-environment.lock.yaml
$(TMP_BUILD_DIR)/dev-docs-image: docs/Dockerfile.docs monodocs-environment.lock.yaml | $(TMP_BUILD_DIR)
docker buildx build --load --platform=linux/amd64 --build-arg USER_UID=$$(id -u) --build-arg USER_GID=$$(id -g) -t flyte-dev-docs:latest -f docs/Dockerfile.docs .
touch $(TMP_BUILD_DIR)/dev-docs-image

Not sure if this is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants