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

infra: migrate to uv #84

Merged
merged 24 commits into from
Oct 11, 2024
Merged

infra: migrate to uv #84

merged 24 commits into from
Oct 11, 2024

Conversation

JacobCoffee
Copy link
Owner

@JacobCoffee JacobCoffee commented Oct 9, 2024

Description

  • migrate to uv

Summary by Sourcery

Migrate the project infrastructure from PDM to UV, updating the Makefile and CI workflows to reflect this change. Update the README documentation to guide developers on using UV for environment setup.

Build:

  • Replace PDM with UV in the Makefile for managing dependencies and virtual environments.

CI:

  • Update CI workflows to use UV instead of PDM for setting up Python environments and running tests.

Documentation:

  • Update README to reflect the migration from PDM to UV for environment setup.

Copy link
Contributor

sourcery-ai bot commented Oct 9, 2024

Reviewer's Guide by Sourcery

This pull request migrates the project from using PDM (Python Development Master) to uv (a new Python package manager and build system). The changes primarily affect the Makefile, CI workflows, and documentation build process. The migration involves updating commands, environment variables, and installation procedures to use uv instead of PDM.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Migrate from PDM to uv for package management and build system
  • Replace PDM commands with uv equivalents in Makefile
  • Update environment variables and prefixes to use uv
  • Modify installation process to use uv instead of PDM
  • Update clean and destroy commands to work with uv
  • Adjust run commands to use uv
Makefile
Update CI workflows to use uv instead of PDM
  • Replace PDM setup with uv installation in CI jobs
  • Update Python setup process to use uv
  • Modify dependency installation steps to use uv sync
  • Adjust test and pre-commit execution to use uv run
.github/workflows/ci.yml
.github/workflows/docs.yml
.github/workflows/docs-preview.yml
Update documentation and README to reflect the migration to uv
  • Replace references to PDM with uv in README.md
  • Update link to uv documentation
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

railway-app bot commented Oct 9, 2024

🚅 Previously deployed to Railway in the byte project. Environment has been deleted.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @JacobCoffee - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The migration from PDM to uv appears comprehensive and well-implemented. However, could you provide more context on the motivation for this change and any potential benefits or drawbacks? Additionally, consider updating the documentation to guide developers through transitioning their local setups to the new uv-based workflow.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

.github/workflows/ci.yml Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@JacobCoffee
Copy link
Owner Author

> [stage-0 6/8] RUN --mount=type=cache,id=s/6da698d0-bfb3-43dc-812f-6a32e74aba51-/root/cache/
pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -U uv && uv sync:
12.56   File "/root/.cache/uv/builds-v0/.tmpDSrx2Y/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 90, in build
12.56     self.metadata.validate_fields()
12.56   File "/root/.cache/uv/builds-v0/.tmpDSrx2Y/lib/python3.11/site-packages/hatchling/metadata/core.py", line 266, in validate_fields
12.56     self.core.validate_fields()
12.56   File "/root/.cache/uv/builds-v0/.tmpDSrx2Y/lib/python3.11/site-packages/hatchling/metadata/core.py", line 1376, in validate_fields
12.56     getattr(self, attribute)
12.56   File "/root/.cache/uv/builds-v0/.tmpDSrx2Y/lib/python3.11/site-packages/hatchling/metadata/core.py", line 531, in readme
12.56     raise OSError(message)
12.56 OSError: Readme file does not exist: README.md
12.56
-----

@JacobCoffee JacobCoffee merged commit 336008f into main Oct 11, 2024
3 of 5 checks passed
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.

1 participant