-
Notifications
You must be signed in to change notification settings - Fork 334
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
Convert Python examples to proper packages #5966
Conversation
Deployed docs
|
First big snag:
which obviously isn't portable. |
Right. I specifically used full paths because something required them (was it uv?). I'll try to push a little more with relative path then. |
Removed those from the lock file and now I get an error:
|
Yes, there seem to be an issue with pixi: prefix-dev/pixi#1186 |
Some though I had over the night: instead of the dependency list to dynamically change based on the current python version, it's probably better to just stick the example's
This would make the dependency list less dynamic (basically just on example existence and |
…g/excluding example from dependencies
# Conflicts: # pixi.lock
# Conflicts: # examples/python/depth_guided_stable_diffusion/requirements.txt # pixi.lock
All of these explanations should appear in examples/python/README.md imo |
|
Probably #6054. You need to install in editable mode. |
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 the pixi
stuff just worked for me, I could install and save rrd files for all examples without any issue; that's pretty great.
I don't quite follow how it all works but I'm more concerned about the fact that it does.
I'm not sure the complexity added by the all_examples
thing really is worth it though.
I agree, to me it's 50/50 if this thing should/will survive. I do want to keep it around for a bit and see how things pan out with a bit of hindsight. Also, there is this bit of TODO left where |
Doesn't |
From your error log, clearly the example was not installed in editable mode. I checked and it's |
I added the pixi info, but skipped the |
# Conflicts: # .github/workflows/contrib_checks.yml # .github/workflows/reusable_checks.yml # .github/workflows/reusable_checks_python.yml # .github/workflows/reusable_deploy_docs.yml # pixi.lock # pixi.toml
We have a lot of references to |
### What While investigating recently broken links (because of #5966 (comment)) I decided to add a lint against linking to stuff on changing branches (e.g. `/blobs/main`). Unfortunately I cannot cover it all (see #6077 for more), but this is an OK start. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6078?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6078?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/6078) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
What
This PR does the following:
requirements.txt
file with apyproject.toml
file.tests/python/test_api
.all_examples
meta-project.dev-tools build-examples
for the new example format.dev-tools build-examples install
command topip install
the examples for the given channel (prerequisite tobuild-examples rrd
).pixi support
This WIP pixi support allows running examples in the
examples
environment:Note that by default pixi builds the environment with a shim/empty/fake rerun package (from
examples/python/_empty_rerun_sdk
), which is a work-around to allow manual installation of rerun in the environment. As a result, at first (and whenever a rebuild is needed), this must be run:all_examples
This is a meta-package that dynamically depends on all examples. The original hope was to be able to depend on it from pixi, avoiding the need to list example explicitly. However, this is current impossible for a number a reason:
__file__
relative paths (Examples: download datasets into OS standard cache directory instead of relative to the python file #6054)all_examples
also has a very basic CLI tool that allows listing all examples in a format suitable for pixi:all_examples list
.Also, it should be relatively easy to cleanly reimplement the functionality of
run_all.py
, which is currently broken:run_all.py
and nox with better alternatives #6057As it stands, it allows for efficiently checking dependency conflicts, especially with uv:
TODO
all_examples
meta-packageproperly working pixi setuppython version matrix testing setupChecklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.