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

Use UV to install all needed packages locally #3124

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Kludex
Copy link
Contributor

@Kludex Kludex commented Dec 20, 2024

This is specifically to have a single virtual environment with all dependencies to make it easier to develop here.

@Kludex Kludex requested a review from a team as a code owner December 20, 2024 12:38
pyproject.toml Show resolved Hide resolved
Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

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

Loved this. I would say other than speed-up local development, this paves the way to adopt uv in opentelemetry-python.

I think it will be necessary to add some instructions on how to use that. But just a note for reviewers:

With a simple command like uv sync you can have all packages from the project installed locally. If you want to install only one package you can run: uv sync --package opentelemetry-instrumentation-sqlalchemy for example.

@xrmx
Copy link
Contributor

xrmx commented Dec 23, 2024

Loved this. I would say other than speed-up local development, this paves the way to adopt uv in opentelemetry-python.

I think it will be necessary to add some instructions on how to use that. But just a note for reviewers:

With a simple command like uv sync you can have all packages from the project installed locally. If you want to install only one package you can run: uv sync --package opentelemetry-instrumentation-sqlalchemy for example.

Sure but aren't we adding another source of dependabot warnings? I'm fine on adding the metadata to the pyproject for people using uv but isn't this duplicating what we use tox for?

@Kludex
Copy link
Contributor Author

Kludex commented Dec 23, 2024

Sure but aren't we adding another source of dependabot warnings?

Unfortunately/Fortunately, Dependabot doesn't see the uv.lock yet.

I'm fine on adding the metadata to the pyproject for people using uv but isn't this duplicating what we use tox for?

Not really. The idea here is to have a single virtual environment that can be used by the IDE, and to simplify local development (running some scripts locally to test some integrations, etc). The tox is used to run the tests with multiple different environments, it doesn't really create this virtual environment.

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