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. |
teh-cmc
left a comment
There was a problem hiding this comment.
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.txtfile with apyproject.tomlfile.tests/python/test_api.all_examplesmeta-project.dev-tools build-examplesfor the new example format.dev-tools build-examples installcommand topip installthe examples for the given channel (prerequisite tobuild-examples rrd).pixi support
This WIP pixi support allows running examples in the
examplesenvironment: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_examplesThis 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_examplesalso 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.pyand nox with better alternatives #6057As it stands, it allows for efficiently checking dependency conflicts, especially with uv:
TODO
all_examplesmeta-packageproperly working pixi setuppython version matrix testing setupChecklist
mainbuild: rerun.io/viewernightlybuild: rerun.io/viewerTo run all checks from
main, comment on the PR with@rerun-bot full-check.