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

Migrate to uv #1098

Merged
merged 6 commits into from
Feb 26, 2025
Merged

Migrate to uv #1098

merged 6 commits into from
Feb 26, 2025

Conversation

michelletran-codecov
Copy link
Contributor

@michelletran-codecov michelletran-codecov commented Feb 20, 2025

This migrates the dependencies from requirements.in/txt to pyproject.toml and uv.lock.

This also changes the way that the Docker containers are built and how dependency updates are to be done going forward. Please review the updated instructions on how to update or add packages with uv.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@michelletran-codecov michelletran-codecov changed the title Migrate to uv for building container Migrate to uv Feb 20, 2025
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.25%. Comparing base (74b3287) to head (fe03d39).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1098   +/-   ##
=======================================
  Coverage   97.25%   97.25%           
=======================================
  Files         454      454           
  Lines       37335    37337    +2     
=======================================
+ Hits        36310    36312    +2     
  Misses       1025     1025           
Flag Coverage Δ
integration 43.11% <ø> (-0.01%) ⬇️
unit 89.79% <ø> (+<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.

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@michelletran-codecov michelletran-codecov force-pushed the migrate_uv branch 3 times, most recently from a9bccb6 to 0d0d3c1 Compare February 21, 2025 15:38
This migrates the dependencies from requirements.in/txt to pyproject.toml and uv.lock.
@michelletran-codecov
Copy link
Contributor Author

This PR depends on codecov/gha-workflows#44

@michelletran-codecov michelletran-codecov marked this pull request as ready for review February 25, 2025 16:14
@michelletran-codecov michelletran-codecov requested a review from a team February 25, 2025 16:14
@@ -44,7 +46,7 @@ jobs:
test:
name: Test
needs: [build]
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.30
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@1787b7a62b96639a32ebfa966ef67cf852033f16
Copy link
Contributor

Choose a reason for hiding this comment

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

curious what's the reasoning to change from versions to sha's?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, this will be a version, but I just need to merge and release codecov/gha-workflows#44 first!

The push-env workflow requires that the images be built in a specific way
to be able to reference the cached images.
Just updating the rest of the references to ensure that they're the most
recent version.
README.md Outdated
@@ -85,13 +85,14 @@ If you are unsure whether you need to change that version at a given moment, the

## Upgrading Dependencies

This repository uses `pip-tools` to manage dependencies, so make sure you've installed it with `pip install pip-tools`. To add or update dependencies, change `requirements.in`, Then run
This repository uses `uv` to manage dependencies.
Make your dependency updates to `pyproject.toml` then run:

```
make update-requirements
Copy link
Contributor

Choose a reason for hiding this comment

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

I don’t think this is necessary anymore. The make command still uses uv pip compile. uv sync will automatically sync the installed dependencies and lockfile depending on the pyproject.toml definition.

We can just run `uv sync` directly.
Copy link
Contributor

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

🎉 lets do this

@michelletran-codecov michelletran-codecov added this pull request to the merge queue Feb 26, 2025
Merged via the queue into main with commit 4a6ae3f Feb 26, 2025
29 checks passed
@michelletran-codecov michelletran-codecov deleted the migrate_uv branch February 26, 2025 17:10
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