-
Notifications
You must be signed in to change notification settings - Fork 597
Switch to uv-based management of our python build+test environment #12176
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
base: main
Are you sure you want to change the base?
Conversation
|
Web viewer built successfully.
View image diff on kitdiff. Note: This comment is updated whenever you push a commit. |
|
Latest documentation preview deployed successfully.
Note: This comment is updated whenever you push a commit. |
|
@rerun-bot full-check |
|
Started a full build: https://github.com/rerun-io/rerun/actions/runs/20175669647 |
ntjohnson1
left a comment
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.
Generally LGTM but I'm lacking enough sleep to think about this holistically.
| } | ||
|
|
||
| fn install_snippet_deps() { | ||
| // uv sync --inexact --no-install-package rerun-sdk --group snippets |
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.
This selective inexact usage feels a little footgunny/susceptible to bit rot. I guess if we miss an inexact somewhere then rerun won't be in the environment and we hopefully fail early.
| # Build and install the `rerun-sdk` package with the `web_viewer` & `server` feature. | ||
| py-build-common-web-viewer = { cmd = "PIP_REQUIRE_VIRTUALENV=0 RERUN_ALLOW_MISSING_BIN=1 maturin develop --manifest-path rerun_py/Cargo.toml --features web_viewer,nasm,server --extras=tests", depends-on = [ | ||
| "rerun-build-native-and-web", # We need to build rerun-cli since it is bundled in the python package. | ||
| py-build-notebook-fast = { cmd = "uv sync --inexact --package rerun-notebook" } |
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.
Fast just allows skipping the JavaScript pieces?
| print(f"No wheels found for package {pkg} on platform {plat} and architecture {arch}") | ||
| sys.exit(1) | ||
|
|
||
| if len(wheels) > 1: |
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.
I think this is overly strict. Did you try bumping the version and seeing if this barfs? For instance if we're on 0.27 then go to 0.28 we'd have duplicate wheels in our wheels dir but unique by version
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.
Historically this has only been used in CI where there will be a single wheel and the main purpose of this was to avoid needing to pick up a dependency on the version. This is a direct port of the other pixi-oriented version of the same script. I'm going to leave it for now but flag it as a thing I clean up in the pending script cleanup.
|
Something I ran into that I suspect others who frequently use uv/maturin will also is that I cannot just Maybe it's worth another look at the So I guess what I'm finding is that this does work similar to what I had before except that there is a |
|
We are going to hold off merging this until after 0.28 has been released to avoid debugging release-scripts during the release. |
3f7db48 to
7032cce
Compare
What
Using our pixi environment for working with the
rerun-sdkitself has led to all manner of pain. In theory pixi-build may fix this some day, but it's still not optimized for an explicit maturin develop dev flow.We move the entire "rerun-sdk" test-oriented environment over to uv, removing all examples and dedicated py-related environments from pixi.
Notable Changes
Building and running python code
BEFORE:
NOW: