-
Notifications
You must be signed in to change notification settings - Fork 1k
Add Environment Documentation for Virtual Environment Including Local Core Repository #4669
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
Open
SoulofAkuma
wants to merge
6
commits into
open-telemetry:main
Choose a base branch
from
SoulofAkuma:add-devenv-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+22
−0
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dc25449
Align pyproject dependencies with uv sources
SoulofAkuma f1a21a4
Add documentation for local combined workspace of core and contrib repo
SoulofAkuma e135a3e
Add copyright header to script
SoulofAkuma 4f2efda
Merge branch 'main' into add-devenv-documentation
SoulofAkuma 4115ffc
Merge branch 'main' into add-devenv-documentation
SoulofAkuma 4522bb8
Replace custom python script with uv command for local core dep resol…
SoulofAkuma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ dependencies = [ | |
| "opentelemetry-instrumentation", | ||
| "opentelemetry-distro", | ||
| "opentelemetry-test-utils", | ||
| "opentelemetry-exporter-otlp", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm ok with this change. |
||
| "opentelemetry-exporter-prometheus-remote-write", | ||
| "opentelemetry-exporter-richconsole", | ||
| "opentelemetry-instrumentation-aio-pika[instruments]", | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I usually do is the following:
from contrib ->
uv syncanduv sync --project ../opentelemetry-python --active --inexact. It will replace the previously git installed deps from -core by using the local path. Do you think this can help?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @emdneto . So that is the way to do it... Well I will remove the script and update the markdown with this, thanks.
Have you had any experience with debugging using a virtual environment like this, for instance with vscode?
Are the python files the ones in the actual clone of your repo then or are they coming from the venv directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emdneto yes, using the script to generate a
tool.uv.sourcessection would then use the the local files in my actual clone instead of installing the package from a remote. But your command seems to achieve the same. I still have to get around to actually locally testing it though (what I put into the PR so far I've tested of course, not your command yet)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, I ran your commands through now and I've gotten the following results (I'm using where it's pulling
opentelemetry-apifrom as an example)So having the contrib and core repo cloned in two different folders and running a simple
uv syncin the contrib repo (without your arguments yet), pullsopentelemetry-apifrom github as expected:Running the command you mentioned
uv sync --project ../opentelemetry-python --active --inexactafter activating the environmentsource .venv/bin/activategives me:This looks good and it is now pulling in
opentelemetry-apilocally. It also changed a bunch of other dependency versions to what is in theuv.lockfile of the core repository, but I guess that should be fine.