Skip to content

Commit

Permalink
Fix remaining just mentions (rerun-io#5914)
Browse files Browse the repository at this point in the history
### What

Fixes a few remaining usages & mentions of `just`. Adds a `upload-image`
command to pixi.

### 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 newly built examples:
[rerun.io/viewer](https://rerun.io/viewer/pr/5914)
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5914?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/5914?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/5914)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
Wumpf authored Apr 11, 2024
1 parent 9d584c7 commit fe326a2
Show file tree
Hide file tree
Showing 17 changed files with 692 additions and 89 deletions.
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ FigJam document: https://www.figma.com/file/Umob8ztK1HmYKLUMSq8aPb/Crates-org
Update instructions:
1) Update the FigJam document
2) Select all -> right-click -> Copy as PNG
3) `just upload --name crates`
3) `pixi run upload-image --name crates`
4) Copy/paste the resulting HTML
-->

Expand Down
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,6 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and
- Improve PR template with better comment, and no copilot by default [#1901](https://github.com/rerun-io/rerun/pull/1901)
- Optimize `generate_changelog.py` [#1912](https://github.com/rerun-io/rerun/pull/1912)
#### 🤷 Other
#### 🤷 Other
- Fix videos for GitHub in `CHANGELOG.md` [af7d3b192157f942e35f64d3561a9a8dbcc18bfa](https://github.com/rerun-io/rerun/commit/af7d3b192157f942e35f64d3561a9a8dbcc18bfa)
- Don't run 3rd party bench suites on CI [#1787](https://github.com/rerun-io/rerun/pull/1787)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ cargo run -p rerun -- --help

## Tools

We use the [`pixi`](https://prefix.dev/) for managing dev-tool versioning, download and task running. See [here](https://github.com/casey/just#installation) for installation instructions. To see available tasks, use `pixi task list`.
We use the [`pixi`](https://prefix.dev/) for managing dev-tool versioning, download and task running. To see available tasks, use `pixi task list`.
# TODO(andreas): This doesn't list tasks from the different environments. Asked [here](https://discord.com/channels/1082332781146800168/1227563080934756475/1227563080934756475) if there's a way to do that.

We use [cargo cranky](https://github.com/ericseppanen/cargo-cranky) and specify our clippy lints in [`Cranky.toml`](Cranky.toml). Usage: `cargo cranky`.
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/compare_snippet_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main() -> None:
print("----------------------------------------------------------")
print("Building rerun-sdk for Python…")
start_time = time.time()
run(["just", "py-build", "--quiet"], env=build_env)
run(["pixi", "run", "py-build", "--quiet"], env=build_env)
elapsed = time.time() - start_time
print(f"rerun-sdk for Python built in {elapsed:.1f} seconds")
print("")
Expand Down
2 changes: 1 addition & 1 deletion examples/python/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Put a short description at the top, like this.

<!--
Place a screenshot in place of this comment
Use `just upload --help` for instructions.
Use `pixi run upload-image --help` for instructions.
Make sure to also update the `thumbnail` section in the metadata.
-->

Expand Down
2 changes: 1 addition & 1 deletion examples/rust/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Put a short description at the top, like this.

<!--
Place a screenshot in place of this comment
Use `just upload --help` for instructions.
Use `pixi run upload-image --help` for instructions.
Make sure to also update the `thumbnail` section in the metadata.
-->

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def tests(session: nox.Session) -> None:
"""Run the Python test suite."""
session.install("-r", "rerun_py/requirements-build.txt")
session.install("./rerun_py")
session.run("just", "py-test", external=True)
session.run("pixi", "run", "py-test", external=True)


@nox.session(python=PYTHON_VERSIONS)
Expand Down
726 changes: 664 additions & 62 deletions pixi.lock

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ download-design-tokens = "curl --fail https://rerun-docs.netlify.app/api/tokens
# Update the results of `insta` snapshot regression tests
rs-update-insta-tests = "cargo test && cargo insta review"

# Upload image to gcloud storage.
upload-image = "python scripts/upload_image.py"


[feature.py-docs.tasks]
# Serve python docs locally
Expand Down Expand Up @@ -257,10 +260,12 @@ taplo = "=0.9.1"
tomlkit = "0.12.3.*"

[pypi-dependencies]
nox = ">=2024.3.2" # the conda-forge package is (wrongly) tagged as platform-specific
Pillow = "==10.0.0" # For `thumbnails.py`
requests = ">=2.31,<3" # For `thumbnails.py`
tomlkit = ">=0.11.8" # For `thumbnails.py`
cryptography = "==38.0.4" # For `upload_image.py`
google-cloud-storage = "==2.9.0" # For `upload_image.py`
nox = ">=2024.3.2" # the conda-forge package is (wrongly) tagged as platform-specific
Pillow = "==10.0.0" # For `thumbnails.py`
requests = ">=2.31,<3" # For `thumbnails.py` & `upload_image.py`
tomlkit = ">=0.11.8" # For `thumbnails.py`

[target.linux-64.dependencies]
patchelf = ">=0.17"
Expand Down
3 changes: 0 additions & 3 deletions scripts/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
-r ../rerun_py/requirements-build.txt
-r ../rerun_py/requirements-lint.txt

cryptography==38.0.4 # for scripts/upload_image.py
google-cloud-storage==2.9.0 # for scripts/upload_image.py
PyGithub==1.58.2 # for scripts/ci/generate_pr_summary.py and scripts/ci/update_pr_body.py
Pillow # for scripts/upload_image.py
torch
tqdm
requests
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_python_e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main() -> None:
print("----------------------------------------------------------")
print("Building rerun-sdk…")
start_time = time.time()
subprocess.Popen(["just", "py-build", "--quiet"], env=build_env).wait()
subprocess.Popen(["pixi", "run", "py-build", "--quiet"], env=build_env).wait()
elapsed = time.time() - start_time
print(f"rerun-sdk built in {elapsed:.1f} seconds")
print("")
Expand Down
2 changes: 1 addition & 1 deletion scripts/screenshot_compare/build_screenshot_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def copy_static_assets(examples: list[Example]) -> None:

def build_python_sdk() -> None:
print("Building Python SDK…")
run(["just", "py-build", "--features", "web_viewer"])
run(["pixi", "run", "py-build", "--features", "web_viewer"])


# ====================================================================================================
Expand Down
8 changes: 4 additions & 4 deletions scripts/upload_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
or the just command:
just upload --help
pixi run upload-image --help
All info/debug output occurs on stderr. If stdout is not a tty (e.g. piping to `pbcopy`), the resulting HTML tag is also
printed to stdout. For example, this upload the image from the clipboard and copies the resulting HTML tag back to the
clipboard:
just upload --name some_name | pbcopy
pixi run upload-image --name some_name | pbcopy
"""

from __future__ import annotations
Expand Down Expand Up @@ -374,15 +374,15 @@ def run(args: argparse.Namespace) -> None:
Note: you will get a warning and a confirmation prompt if the aspect ratio is not within ~10% of 16:9.
3. Groom the blueprints and panel visibility to your liking.
4. Take a screenshot using the command palette.
5. Run: just upload --name <name_of_example>
5. Run: pixi run upload-image --name <name_of_example>
6. Copy the output HTML tag and paste it into the README.md file.
Other uses
----------
Download an image, optimize it and create a multi-resolution stack:
just upload --name <name_of_stack> https://example.com/path/to/image.png
pixi run upload-image --name <name_of_stack> https://example.com/path/to/image.png
"""


Expand Down
4 changes: 2 additions & 2 deletions tests/cpp/plot_dashboard_stress/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//
// Usage:
// ```text
// just cpp-plot-dashboard --help
// pixi run cpp-plot-dashboard --help
// ```
//
// Example:
// ```text
// just cpp-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000
// pixi run cpp-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000
// ```

#include <algorithm>
Expand Down
4 changes: 2 additions & 2 deletions tests/python/plot_dashboard_stress/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
Usage:
-----
```
just py-plot-dashboard --help
pixi run py-plot-dashboard --help
```
Example:
-------
```
just py-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000
pixi run py-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000
```
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/roundtrips.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def main() -> None:
print("----------------------------------------------------------")
print("Building rerun-sdk for Python…")
start_time = time.time()
run(["just", "py-build", "--quiet"], env=build_env)
run(["pixi", "run", "py-build", "--quiet"], env=build_env)
elapsed = time.time() - start_time
print(f"rerun-sdk for Python built in {elapsed:.1f} seconds")
print("")
Expand Down
4 changes: 2 additions & 2 deletions tests/rust/plot_dashboard_stress/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//!
//! Usage:
//! ```text
//! just rs-plot-dashboard --help
//! pixi run rs-plot-dashboard --help
//! ```
//!
//! Example:
//! ```text
//! just rs-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000
//! pixi run rs-plot-dashboard --num-plots 10 --num-series-per-plot 5 --num-points-per-series 5000 --freq 1000
//! ```
use rerun::external::re_log;
Expand Down

0 comments on commit fe326a2

Please sign in to comment.