Skip to content

Conversation

Xithrius
Copy link
Member

Docker, CI, and pyproject.toml have poetry replaced with uv. All guides have poetry replaced with uv. PyCharm portion of installing project dependencies is (temporarily?) removed since I'm not aware of a uv equivalent of the jetbrains poetry plugin.

@Xithrius Xithrius requested a review from MarkKoz as a code owner July 18, 2025 00:58
@python-discord-policy-bot python-discord-policy-bot bot requested a review from a team July 18, 2025 00:58
Copy link

netlify bot commented Jul 18, 2025

Deploy Preview for pydis-static failed. Why did it fail? →

Name Link
🔨 Latest commit 8cbc8e8
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/68799c42261a450008d94d8b

@coveralls
Copy link

coveralls commented Jul 18, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 52c8e17 on uv-migration
into 140a39b on main.

Copy link

netlify bot commented Jul 18, 2025

Deploy Preview for pydis-static failed. Why did it fail? →

Name Link
🔨 Latest commit c552bab
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/68799c4c61ac360008c5635c

Copy link

netlify bot commented Jul 18, 2025

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit 52c8e17
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/687a9df8506a5a00085aa1b0
😎 Deploy Preview https://deploy-preview-1549--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Xithrius Xithrius force-pushed the uv-migration branch 3 times, most recently from 3673eed to 3164711 Compare July 18, 2025 01:24
Xithrius added 5 commits July 17, 2025 18:41
Corrected dockerfile to copy uv over from build step

Probably fine, right? (I forgot how to dockerfile, please forgive me)
Removed PyCharm guide due to it containing the poetry plugin and there
isn't a direct alternative to that besides just creating a virtual
environment from uv and using that in PyCharm
@jb3 jb3 requested a review from Copilot July 18, 2025 18:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request migrates the project from Poetry to uv as the dependency management tool. The migration involves updating configuration files, documentation, CI workflows, and Docker setup to use uv instead of Poetry throughout the project.

  • Replaces Poetry configuration with uv's PEP 621 compliant pyproject.toml format
  • Updates all documentation and guides to reference uv commands instead of Poetry commands
  • Modernizes Docker build process with multi-stage builds and uv integration

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pyproject.toml Complete migration from Poetry format to PEP 621 standard with uv configuration
Dockerfile Multi-stage Docker build using uv for dependency management
.github/workflows/lint-test.yaml CI workflow updated to use uv instead of Poetry
.github/dependabot.yml Dependabot configuration switched to uv ecosystem
.pre-commit-config.yaml Pre-commit hooks updated to use uv commands
static-builds/README.md Build instructions updated from Poetry to uv
Multiple guide files Documentation updated to reference uv instead of Poetry

Dockerfile Outdated
Comment on lines 16 to 17
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& python -m venv .venv
Copy link

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing pip, setuptools, and wheel is unnecessary when using uv, as uv handles package building internally. This adds unnecessary overhead to the build process.

Suggested change
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& python -m venv .venv
RUN python -m venv .venv

Copilot uses AI. Check for mistakes.

Dockerfile Outdated
Comment on lines 16 to 17
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& python -m venv .venv
Copy link

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating a virtual environment manually is redundant since uv sync creates and manages the virtual environment automatically.

Suggested change
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& python -m venv .venv
RUN pip install --no-cache-dir --upgrade pip setuptools wheel

Copilot uses AI. Check for mistakes.

@python-discord-policy-bot python-discord-policy-bot bot requested a review from a team July 18, 2025 19:18
@Xithrius
Copy link
Member Author

/dev/null is webscale

@jb3
Copy link
Member

jb3 commented Jul 18, 2025

/merge

@jb3 jb3 merged commit 52c8e17 into main Jul 18, 2025
10 of 11 checks passed
@jb3 jb3 deleted the uv-migration branch July 18, 2025 20:03
@vivekashok1221
Copy link
Member

When I run this locally, I get the following error:

web-1       | Using CPython 3.11.13 interpreter at: /usr/local/bin/python3
web-1       | Creating virtual environment at: .venv
web-1       | error: failed to create directory `/app/.venv`: Read-only file system (os error 30)

Adding ENV UV_PROJECT_ENVIRONMENT="/build/.venv" to the dockerfile fixes it.

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.

5 participants