Skip to content

Commit

Permalink
Update pixi.toml to use rerun_py package directly (#6466)
Browse files Browse the repository at this point in the history
### What
Our shim package broke with the update to pixi 0.22.

However, pixi now mostly does the correct thing with a source install of
the `rerun_py` package, so we now use that instead of the shim package.

I introduced a new `python-dev` feature which is used for pulling in the
dev version of rerun. The upside of this is it opens up another feature
variant `examples-pypi` which uses the published version of `rerun`.

We should be able to do something similar with the wheel package as
well.

Lastly, I had to re-generate our lockfile to get around some weird
issues with tzdata. This bumped the lockfile version, which means
dragging everyone forward to pixi 0.23


---------

Co-authored-by: Clement Rey <[email protected]>
  • Loading branch information
jleibs and teh-cmc authored May 31, 2024
1 parent aea3435 commit ea4fc10
Show file tree
Hide file tree
Showing 35 changed files with 10,680 additions and 17,463 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Wait a few seconds
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Update crate versions
run: pixi run python scripts/ci/crates.py version --bump prerelease
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checkboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Check PR checkboxes
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Python format check
run: pixi run py-fmt-check
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Codegen check
run: pixi run codegen --force --check
Expand All @@ -101,7 +101,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Rust checks & tests
run: pixi run rs-check --skip individual_crates
Expand All @@ -114,7 +114,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Rerun lints
run: pixi run lint-rerun
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: cpp

# TODO(emilk): make this work somehow. Right now this just results in
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: wheel-test

- name: Run Python unit-tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on_pull_request_target_contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Update PR description
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_push_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Get version
id: versioning
Expand All @@ -57,7 +57,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Install rerun-sdk
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Update crate versions
id: versioning
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Commit new version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Build web-viewer (release)
run: pixi run rerun-build-web-release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Get sha
id: get-sha
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: wheel-test

- name: Download Wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Install yarn dependencies
run: pixi run yarn --cwd rerun_js install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Build web-viewer (release)
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Codegen check
run: pixi run codegen --force --check
Expand All @@ -103,7 +103,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Run linter
run: |
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: prettier --check
run: pixi run misc-fmt-check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_checks_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: cpp

- name: Set up Rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_checks_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Python format check
run: pixi run py-fmt-check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_checks_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Rust checks & tests
if: ${{ inputs.CHANNEL == 'pr' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Doxygen C++ docs
run: pixi run cpp-docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_pr_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- id: "auth"
uses: google-github-actions/auth@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Publish packages
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: wheel-test

# built by `reusable_build_and_publish_wheels`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- id: "auth"
uses: google-github-actions/auth@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Build web-viewer (release)
run: pixi run rerun-build-web-release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_run_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: wheel-test

- name: Download Wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_sync_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- id: "auth"
uses: google-github-actions/auth@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0
environments: wheel-test

- name: Download Wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_update_pr_body.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.0
pixi-version: v0.23.0

- name: Update PR description
run: |
Expand Down
15 changes: 9 additions & 6 deletions examples/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,24 @@ NOTE: `.rrd` files do not yet guarantee any backwards or forwards compatibility.

The Rerun project makes extensive use of [pixi](https://pixi.sh/latest/) for various developer tasks, and Pixi can be used to run examples as well. For this, you need to install Pixi as per the installation instructions on their website.

Then, install a suitable version of the Rerun SDK in the Pixi environment. For the Rerun examples, the `examples` environment must be used, which is why the following commands all include `-e examples`.
The Pixi environment `examples-pypi` will use the published Rerun SDK package from PyPI.

For the released version of the SDK, use:
To use this environment, specify it when running the example:
```shell
pixi run -e examples pip install rerun-sdk==0.15.1
pixi run -e examples-pypi minimal
```

**Note**: as explained above, the repository checkout tag must match the installed version.
### Running examples with Pixi from source

Alternatively, you can build Rerun from source (requires a Rust installation):
Alternatively, you can build Rerun from source, and install it in the Pixi environment. Note that this requires a rust
toolchain to be installed on your system.

Before running the example, make sure the source build is up-to-date:
```shell
pixi run -e examples py-build
```

Then, you can run examples with the following command:
Now you can run the example with the source build:
```shell
pixi run -e examples minimal
```
Expand Down
5 changes: 0 additions & 5 deletions examples/python/_empty_rerun_sdk/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions examples/python/_empty_rerun_sdk/empty_rerun_sdk.py

This file was deleted.

13 changes: 0 additions & 13 deletions examples/python/_empty_rerun_sdk/pyproject.toml

This file was deleted.

Loading

0 comments on commit ea4fc10

Please sign in to comment.