forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.toml
More file actions
836 lines (683 loc) · 38.3 KB
/
pixi.toml
File metadata and controls
836 lines (683 loc) · 38.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
# Pixi is a package management tool for developers.
# Before running a task, pixi ensures that all listed dependencies are installed first.
#
# Run the tasks with `pixi run TASK`, e.g. `pixi run codegen`.
# Extra CLI argument after `pixi run TASK` are passed to the task cmd.
# Lists tasks with `pixi task list`
#
# Type `pixi shell` to enter the pixi environment.
#
# https://prefix.dev/docs/pixi/overview
# We currently assume pixi version 0.34.0
# You can check that your environment is correct by running:
# - python scripts/check_env.py
# - pixi run check-env
[project]
name = "rerun"
authors = ["rerun.io <opensource@rerun.io>"]
channels = ["conda-forge"]
description = "Log images, point clouds, etc, and visualize them effortlessly"
homepage = "https://rerun.io"
license = "MIT OR Apache-2.0"
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
readme = "README.md"
repository = "https://github.com/rerun-io/rerun"
version = "0.1.0" # TODO(emilk): sync version with `Cargo.toml` with help from `crates.py`
[system-requirements]
macos = "11.0" # needed for some reason otherwise fails to resolve mediapipe package
libc = "2.28"
# These should be kept empty as their content is pulled in every single environment. For the "standard" stuff,
# dependencies are listed in the `base` feature instead.
[dependencies]
[pypi-dependencies]
################################################################################
# ACTIVATION
################################################################################
# Global
[activation]
[target.unix.activation.env]
# The executable extension for binaries on the current platform.
EXECUTABLE_EXTENSION = ""
[target.win-64.activation.env]
# The executable extension for binaries on the current platform.
EXECUTABLE_EXTENSION = ".exe"
# python-dev
[feature.python-dev.activation.env]
# RERUN_ALLOW_MISSING_BIN is needed to allow maturin to run without the `rerun` binary being part of the rerun-sdk.
RERUN_ALLOW_MISSING_BIN = "1"
RERUN_DEV_ENVIRONMENT = "true"
################################################################################
# ENVIRONMENTS
################################################################################
[environments]
# The default environment is meant to serve as the basis for common development and
# CI tasks. If you are only working in rust, this is the only environment you need.
#
# For practical reasons, this environment includes the utilities necessary to build
# the python wheel. However, it does not come with the rerun python bindings installed.
#
# To run code that uses python or cpp bindings, you will generally need to use one of
# the more specialized environments: `py` or `cpp`.
# - The python-dev feature is not included in the default environment because it can
# lead to unexpected (lengthy) Rerun build during environment creation.
# - The cpp feature cannot be included in the default environment because
# it breaks compillation of the rerun client on linux. See: https://github.com/rerun-io/rerun/issues/6852
default = ["base", "wheel-build"]
# The py environment is for running any code with a dependency on the python `rerun-sdk`.
py = ["base", "wheel-build", "python-dev", "python-tasks", "py-test-deps"]
# The py-docs environment is for building docs for the python package.
py-docs = ["base", "python-docs"]
# The cpp environment is for building any code that depends on the C++ `rerun-sdk`.
#
# ⚠️ This environment sets the C/C++ compiler to the system compiler (see c-compiler/cxx-compiler dependencies).
# As of writing this breaks building the web viewer on MacOS, so do not enable it in any environment
# in which you want to do viewer builds.
cpp = ["base", "cpp"]
# The wheel-test environment is for testing the python package when built from a wheel.
# Thistenvironment is specifically used for validation of the wheel artifact in CI.
# It does not include the features necessary for a source-build of the wheel.
#
# WARNING: wheel-test default depends on a published `rerun-sdk` version which will
# be installed from pypi and not from the local source code.
#
# To update the wheel artifact that is registered with pixi, you can use `pixi_install_wheel.py`.
# For example:
# ```
# pixi run python scripts/ci/pixi_install_wheel.py --feature python-pypi --package rerun-sdk --dir wheel
# ```
# Just the deps for running roundtrips
wheel-test-min = [
"base",
"wheel-test",
"wheel-build",
"py-test-deps",
"python-pypi",
]
# The full deps for running all examples
wheel-test = [
"base",
"wheel-test",
"wheel-build",
"py-test-deps",
"examples-common",
"python-pypi",
]
# Example environments
# These environments use the dev version of the python package.
# The package will be installed in editable mode, so changes to the python code will be reflected immediately.
# However, any changes to do the rust bindings will require running `pixi run py-build-examples`.
examples = ["examples-common", "python-dev", "wheel-build", "examples-tasks"]
# examples-ocr = ["examples-ocr", "wheel-build"]
# This environment uses the pypi-published version of the python package. This avoids the need to
# build the package from source if you just want to try running the examples locally.
examples-pypi = ["examples-common", "python-pypi"]
################################################################################
# TASKS
################################################################################
[tasks]
# Note: extra CLI argument after `pixi run TASK` are passed to the task cmd.
# Check that your environment is set up correctly
check-env = "python scripts/check_env.py"
# Run the codegen. Optionally pass `--profile` argument if you want.
codegen = "cargo --quiet run --package re_types_builder -- "
# Run the codegen for protobuf types.
codegen-protos = { cmd = "cargo --quiet run --package re_protos_builder && cargo fmt -p re_protos", depends-on = [
# "pb-snapshot", # TODO(cmc): reenable if we ever go back to snapshot-based BW compat for protobuf
] }
codegen-protos-check = "before=$(./scripts/ci/compare_path_digest.py crates/store/re_protos) ; pixi run codegen-protos && ./scripts/ci/compare_path_digest.py crates/store/re_protos $before"
# Generate the Rerun CLI manual.
# NOTE:must be --all-features, otherwise we might miss some optional commands.
man = "cargo --quiet run --package rerun-cli --all-features -- man > docs/content/reference/cli.md"
# Compile and run the rerun viewer.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun = "cargo run --package rerun-cli --no-default-features --features map_view,nasm,native_viewer --"
# Compile and run the rerun viewer, with performance telemetry.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun-perf-debug = "cargo run --package rerun-cli --no-default-features --features map_view,nasm,native_viewer,perf_telemetry --"
# Compile `rerun-cli` without the web-viewer.
rerun-build = "cargo build --package rerun-cli --no-default-features --features map_view,nasm,native_viewer"
# Compile `rerun-cli` without the web-viewer.
rerun-build-release = "cargo build --package rerun-cli --release --no-default-features --features map_view,nasm,native_viewer"
# Compile and run the rerun viewer with --release.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun-release = "cargo run --package rerun-cli --no-default-features --features map_view,nasm,native_viewer --release --"
# Compile and run the rerun viewer in release, with performance telemetry.
#
# You can also give an argument for what to view (e.g. an .rrd file).
rerun-perf = "cargo run --package rerun-cli --no-default-features --features map_view,nasm,native_viewer,perf_telemetry --release --"
# Compile `rerun-cli` with the same feature set as we build for releases.
rerun-build-native-and-web = { cmd = "cargo build --package rerun-cli --no-default-features --features release --", depends-on = [
"rerun-build-web",
] }
# Compile `rerun-cli` with the same feature set as we build for releases.
rerun-build-native-and-web-release = { cmd = "cargo build --package rerun-cli --no-default-features --features release --release --", depends-on = [
"rerun-build-web-release",
] }
# Compile and run the web-viewer via rerun-cli.
#
# You can also give an argument for what to view (e.g. an .rrd file).
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-web = { cmd = "cargo run --package rerun-cli --no-default-features --features web_viewer -- --web-viewer", depends-on = [
"rerun-build-web",
] }
# Compile the web-viewer wasm, does not include the cli.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web = "rustup target add wasm32-unknown-unknown && cargo run --quiet -p re_dev_tools -- build-web-viewer --no-default-features --features analytics,map_view --debug"
# Compile the web-viewer wasm and the cli.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web-cli = "rustup target add wasm32-unknown-unknown && cargo run --quiet -p re_dev_tools -- build-web-viewer --no-default-features --features analytics,map_view --debug && cargo build --package rerun-cli --no-default-features --features web_viewer"
# Compile and run the web-viewer in release mode via rerun-cli.
#
# You can also give an argument for what to view (e.g. an .rrd file).
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-web-release = { cmd = "cargo run --package rerun-cli --no-default-features --features map_view,web_viewer --release -- --web-viewer", depends-on = [
"rerun-build-web-release",
] }
# Compile the web-viewer wasm in release mode.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run --quiet -p re_dev_tools -- build-web-viewer --no-default-features --features analytics,map_view --release"
rs-check = { cmd = "rustup target add wasm32-unknown-unknown && python scripts/ci/rust_checks.py", depends-on = [
"rerun-build-web", # The checks require the web viewer wasm to be around.
] }
# Check that old .rrd files can still be read and understood.
# See tests/assets/rrd/README.md for more.
check-backwards-compatibility = { cmd = "find tests/assets/rrd -name '*.rrd' -type f -print0 | xargs -0 cargo run --package rerun-cli --no-default-features --quiet rrd verify" }
rs-fmt = "cargo fmt --all"
# Code formatting for all languages.
format = { depends-on = [
"cpp-fmt",
"misc-fmt",
"pb-fmt",
"py-fmt",
"rs-fmt",
"toml-fmt",
] }
fmt = { depends-on = ["format"] }
# Assorted linting tasks
fast-lint = "python scripts/fast_lint.py"
lint-codegen = "cargo --quiet run --package re_types_builder -- --check"
# TODO(jleibs): implement lint-cpp-files
lint-rerun = "python scripts/lint.py"
lint-rs-files = "rustfmt --edition 2024 --check"
lint-rs-all = "cargo fmt --check"
lint-typos = "typos"
# Toml tasks
toml-fmt-check = "taplo fmt --check --diff"
toml-fmt = "taplo fmt"
# ------------------------------------------------------------------------------------------
# Protobuf stuff:
#
# NOTE: `--error-format=json` because it's the only output format that contains the actual error code (so
# you can decide whether to ignore that specific code or not).
# See:
# * <https://buf.build/docs/breaking/rules/>
# * <https://buf.build/docs/lint/rules/>
pb-fmt-check = "buf format --exit-code --diff"
pb-fmt = "buf format --exit-code --write"
pb-lint = "buf lint --error-format=json"
# NOTE(cmc): I'm keeping all the snapshot machinery around if it turns out we need something more robust
# than a pure git solution in the future. For now, convenience wins.
#
# pb-snapshot-check = "before=$(./scripts/ci/compare_path_digest.py crates/store/re_protos/proto/schema_snapshot.yaml) ; pixi run pb-snapshot && ./scripts/ci/compare_path_digest.py crates/store/re_protos/proto/schema_snapshot.yaml $before"
# # TODO(cmc): I'd like to avoid the extra noise from source info and imports, but they are required for
# # `buf breaking` to not crash.
# # pb-snapshot = "buf build --output crates/store/re_protos/proto/schema_snapshot.yaml --exclude-source-info --exclude-imports"
# pb-snapshot = "buf build --error-format=json --output crates/store/re_protos/proto/schema_snapshot.yaml"
# pb-snapshot-main = "git show origin/main:crates/store/re_protos/proto/schema_snapshot.yaml > crates/store/re_protos/proto/schema_snapshot.main.yaml"
#
# pb-breaking = { cmd = "buf breaking --error-format=json --against crates/store/re_protos/proto/schema_snapshot.main.yaml", depends-on = [
# "pb-snapshot",
# "pb-snapshot-main",
# ]}
pb-breaking = "buf breaking --error-format=json --against '.git#branch=origin/main'"
pb-check = { depends-on = ["pb-fmt-check", "pb-lint", "pb-breaking"] }
# ------------------------------------------------------------------------------------------
# Misc formatting tasks.
misc-fmt = "prettier --write '**/*.{yml,yaml,js,css,html}'"
misc-fmt-check = "prettier --check '**/*.{yml,yaml,js,css,html}'"
# Run first ruff fix, then ruff format, order is important see also https://twitter.com/charliermarsh/status/1717229721954799727
py-fmt = "ruff check --fix --config rerun_py/pyproject.toml . && ruff format --config rerun_py/pyproject.toml ."
py-fmt-check = "ruff check --config rerun_py/pyproject.toml . && ruff format --check --config rerun_py/pyproject.toml"
# Get non-internal things that are ok to not check rerun on
py-lint-non-sdk = { cmd = "mypy --config-file rerun_py/.non_sdk_mypy.ini --install-types --non-interactive --no-warn-unused-ignore", env = { PYTHONPATH = "$PYTHONPATH:rerun_py/rerun_sdk/" } }
# Need to run this in env with rerun installed
py-lint-rerun = "mypy --config-file rerun_py/pyproject.toml --install-types --non-interactive --no-warn-unused-ignore"
py-lint = { depends-on = ["py-lint-non-sdk", "py-lint-rerun"] }
rs-plot-dashboard = { cmd = "cargo r -p plot_dashboard_stress --release --" }
dev-tools = "cargo run --quiet --locked -p re_dev_tools --"
build-examples = "cargo run --quiet --locked -p re_dev_tools -- build-examples"
# Start a local meilisearch instance at `localhost:7700` with master key `test`.
# This should only be used for testing the search index locally.
# Files are stored in the `meilisearch` directory, so you can fully wipe it via `rm -rf meilisearch`.
meilisearch = "meilisearch --db-path=./meilisearch/data.ms --dump-dir=./meilisearch/dumps/ --snapshot-dir=./meilisearch/snapshots/ --env=development --no-analytics --experimental-reduce-indexing-memory-usage --master-key=test"
# Update the results of `insta` and `kittest` snapshot regression tests
rs-update-snapshot-tests = "INSTA_FORCE_UPDATE=1 UPDATE_SNAPSHOTS=1 cargo nextest run --all-targets --all-features --cargo-quiet"
# Upload image to gcloud storage.
upload-image = "python scripts/upload_image.py"
# Upload .rrd to gcloud storage.
upload-rrd = "python scripts/upload_rrd.py"
# Check whether there's too large files in the repository.
check-large-files = "python scripts/ci/check_large_files.py"
# Check whether there are `publish=true` crates which depend on `publish=false` crates in the repository.
check-publish-flags = "python scripts/ci/crates.py check-publish-flags"
# Download a specific artifact from gcloud.
#
# Requires that gcloud authentication has already been set up in your shell.
fetch-artifact = "python scripts/ci/fetch_artifact.py"
# Lint markdown
mdlint = "python scripts/ci/mdlint.py"
# Setup JS tools
js-setup = "npm i -g yarn"
# Install JS package dependencies
js-install = { cmd = "yarn install --cwd rerun_js", depends-on = ["js-setup"] }
# Build JS packages
js-build-base = { cmd = "yarn --cwd rerun_js/web-viewer run build", depends-on = [
"js-install",
] }
js-build-all = { cmd = "yarn --cwd rerun_js workspaces run build", depends-on = [
"js-install",
] }
# Build web-viewer and web-viewer-react without rebuilding re_viewer Wasm
js-build-no-wasm = { cmd = "yarn --cwd rerun_js workspaces run build:js", depends-on = [
"js-install",
] }
# Build individual package JS docs in their own directories
js-build-package-docs = { cmd = "yarn --cwd rerun_js workspaces run docs", depends-on = [
"js-install",
] }
# Combine the output of individual package docs into a single directory
js-docs = { cmd = "yarn --cwd rerun_js run docs", depends-on = [
"js-build-package-docs",
] }
js-docs-serve = { cmd = "yarn --cwd rerun_js run docs:serve", depends-on = [
"js-docs",
] }
[feature.wheel-build.tasks]
# Build and install a development version of the rerun-sdk Python package.
#
# This only needs to be called when you have made changes that would impact the rust bindings of
# the python package. The python code will be imported directly from the source folder and will
# reflect changes immediately upon re-import.
# Note:
# - pip (which is called by maturin develop) doesn't recognize conda/pixi envs as venv, and thus complains if
# configured to not install outside venv (which is a good practice). PIP_REQUIRE_VIRTUALENV=0 disables this check.
# - RERUN_ALLOW_MISSING_BIN is needed to allow maturin to run without the `rerun` binary being part of the rerun-sdk
# package.
py-build-common = { cmd = "PIP_REQUIRE_VIRTUALENV=0 RERUN_ALLOW_MISSING_BIN=1 maturin develop --manifest-path rerun_py/Cargo.toml --extras=tests", depends-on = [
"rerun-build", # We need to build rerun-cli since it is bundled in the python package.
] }
py-build-common-release = { cmd = "PIP_REQUIRE_VIRTUALENV=0 RERUN_ALLOW_MISSING_BIN=1 maturin develop --release --manifest-path rerun_py/Cargo.toml --extras=tests", depends-on = [
"rerun-build-release", # We need to build rerun-cli since it is bundled in the python package.
] }
# Build and install the `rerun-sdk` package with the `web_viewer` 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 --extras=tests", depends-on = [
"rerun-build-native-and-web", # We need to build rerun-cli since it is bundled in the python package.
] }
# Build and install the `rerun-sdk` package with the `web_viewer` feature.
py-build-common-web-viewer-release = { cmd = "PIP_REQUIRE_VIRTUALENV=0 RERUN_ALLOW_MISSING_BIN=1 maturin develop --release --manifest-path rerun_py/Cargo.toml --features web_viewer,nasm --extras=tests", depends-on = [
"rerun-build-native-and-web-release", # We need to build rerun-cli since it is bundled in the python package.
] }
# Build the `rerun-notebook` package.
py-build-notebook = { cmd = "pip install -e rerun_notebook", depends-on = [
"js-build-base",
] }
# Build the JS parts of `rerun-notebook` without rebuilding re_viewer Wasm in the process
py-build-notebook-js = { cmd = "npm --prefix rerun_notebook run build", depends-on = [
"js-build-no-wasm",
] }
# Build an installable wheel.
# The wheel will contain the rerun executable including the web viewer.
py-build-wheel = { cmd = "cp target/release/rerun$EXECUTABLE_EXTENSION rerun_py/rerun_sdk/rerun_cli/ && maturin build --release --manifest-path rerun_py/Cargo.toml", depends-on = [
"rerun-build-native-and-web-release",
] }
# Build an installable SDK-only wheel. IMPORTANT: unlike the officially published wheels, the wheel produced by this command does NOT include the viewer.
py-build-wheels-sdk-only = { cmd = "RERUN_ALLOW_MISSING_BIN=1 python scripts/ci/build_and_upload_wheels.py --mode pr --dir ''" }
[feature.python-tasks.tasks]
# Dedicated alias for building the python bindings for the `py` environment.
py-build = "pixi run -e py py-build-common"
# Dedicated alias for building the python bindings in release mode for the `py` environment.
py-build-release = "pixi run -e py py-build-common-release"
# Dedicated alias for building the python bindings for the `py` environment, with performance telemetry.
py-build-perf-debug = "pixi run -e py py-build-common --features perf_telemetry"
# Dedicated alias for building the python bindings in release mode for the `py` environment, with performance telemetry.
py-build-perf = "pixi run -e py py-build-common-release --features perf_telemetry"
py-check-signatures = "python scripts/ci/python_check_signatures.py"
# Helper alias to run the python interpreter in the context of the python environment
rrpy = "python"
py-bench = { cmd = "python -m pytest -c rerun_py/pyproject.toml --benchmark-only", depends-on = [
"py-build-release",
] }
py-plot-dashboard = { cmd = "python tests/python/plot_dashboard_stress/main.py", depends-on = [
"py-build",
] }
# Run the Python tests.
py-test = { cmd = "python -m pytest -vv rerun_py/tests/unit", depends-on = [
"py-build",
] }
snapshots = "python scripts/snapshots.py"
[feature.python-docs.tasks]
# Build the documentation search index.
# See `pixi run search-index --help` for more information.
search-index = "cargo run --locked --quiet -p re_dev_tools -- search-index"
# Serve python docs locally
py-docs-serve = "mkdocs serve -f rerun_py/mkdocs.yml -w rerun_py"
# Build python docs locally
py-docs-build = "mkdocs build -f rerun_py/mkdocs.yml"
[feature.wheel-test.tasks]
# In the wheel-test environment we want to confirm the`rerun` binary on the path executes as expected.
# However, since `rerun` is already its own task, we can't just `pixi run rerun`. This task lets us work
# around that and executes `rerun` from the system shell within the context of the pixi environment.
rerun-from-path = "rerun"
[feature.examples-tasks.tasks]
# Dedicated alias for building the python bindings for the `examples` environment.
py-build-examples = "pixi run -e examples py-build-common"
# Dedicated alias for building the python bindings for the `examples` environment, with perf telemetry.
py-build-perf-debug-examples = "pixi run -e examples py-build-common --features perf_telemetry"
# Dedicated alias for building the python bindings for the `examples` environment, in release.
py-build-release-examples = "pixi run -e examples py-build-common-release"
# Dedicated alias for building the python bindings for the `examples` environment, in release, with perf telemetry.
py-build-perf-examples = "pixi run -e examples py-build-common-release --features perf_telemetry"
# Python example utilities
py-run-all-examples = { cmd = "python scripts/run_all.py --skip-build", depends-on = [
"py-build-examples",
] }
py-run-all-examples-web = { cmd = "python scripts/run_all.py --web --skip-build", depends-on = [
"rerun-build-web-cli",
"py-build-examples",
] }
[feature.cpp.tasks]
# All the cpp-* tasks can be configured with environment variables, e.g.: RERUN_WERROR=ON CXX=clang++
cpp-prepare-release = "cmake -G 'Ninja' -B build/release -S . -DCMAKE_BUILD_TYPE=Release"
cpp-prepare = "cmake -G 'Ninja' -B build/debug -S . -DCMAKE_BUILD_TYPE=Debug"
cpp-build-all = { cmd = "cmake --build build/debug --config Debug --target ALL", depends-on = [
"cpp-prepare",
] }
cpp-prepare-shared-libs = "cmake -G 'Ninja' -B build/debug -S . -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON"
cpp-build-all-shared-libs = { cmd = "cmake --build build/debug --config Debug --target ALL", depends-on = [
"cpp-prepare-shared-libs",
] }
cpp-clean = "rm -rf build CMakeCache.txt CMakeFiles"
cpp-build-tests = { cmd = "cmake --build build/debug --config Debug --target rerun_sdk_tests", depends-on = [
"cpp-prepare",
] }
cpp-build-roundtrips = { cmd = "cmake --build build/debug --config Debug --target roundtrips", depends-on = [
"cpp-prepare",
] }
cpp-build-examples = { cmd = "cmake --build build/debug --config Debug --target examples", depends-on = [
"cpp-prepare",
] }
cpp-build-snippets = { cmd = "cmake --build build/debug --config Debug --target snippets", depends-on = [
"cpp-prepare",
] }
cpp-build-log-benchmark = { cmd = "cmake --build build/release --config Release --target log_benchmark", depends-on = [
"cpp-prepare-release",
] }
cpp-build-plot-dashboard-stress = { cmd = "cmake --build build/release --config Release --target plot_dashboard_stress", depends-on = [
"cpp-prepare-release",
] }
cpp-test = { cmd = "export RERUN_STRICT=1 PYTHONWARNINGS=error && ./build/debug/rerun_cpp/tests/rerun_sdk_tests", depends-on = [
"cpp-build-tests",
] }
cpp-log-benchmark = { cmd = "export RERUN_STRICT=1 PYTHONWARNINGS=error && ./build/release/tests/cpp/log_benchmark/log_benchmark", depends-on = [
"cpp-build-log-benchmark",
] }
cpp-plot-dashboard = { cmd = "export RERUN_STRICT=1 PYTHONWARNINGS=error && ./build/release/tests/cpp/plot_dashboard_stress/plot_dashboard_stress", depends-on = [
"cpp-build-plot-dashboard-stress",
] }
cpp-build-and-test-all = { depends-on = ["cpp-build-all", "cpp-test"] }
cpp-docs = { cmd = "doxygen docs/Doxyfile && echo '***************\nSuccess!\nOpen ./rerun_cpp/docs/html/index.html in your browser.'", cwd = "rerun_cpp" }
cpp-fmt = "fd --extension h --extension hpp --extension c --extension cpp --exec clang-format -i"
[feature.cpp.target.win-64.tasks]
cpp-prepare-msvc = "cmake -G 'Visual Studio 17 2022' -B build-msvc -S ."
################################################################################
# DEPENDENCIES
################################################################################
[feature.base.dependencies]
# IMPORTANT: do not add any dependencies here that may break CI. All dependencies should be available on all supported
# platforms (including linux-aarch64), or added conditionally.
#
# Hints:
# - To check a given package, go to the package on https://prefix.dev/channels/conda-forge/. It should support:
# - linux-64 and linux-aarch64
# - osx-64 and osx-arm64
# - win-64
# - Some pure Python packages may wrongly be tagged as platform-specific. In this case, use `[pypi-dependencies]`
# instead (e.g. `nox`).
# - If a package is only used for a very specific CI job on a specific target, include it under that target (e.g.
# `meilisearch`).
# - Last resort, use a feature to conditionally include a dependency (e.g. `taplo`).
aiohttp = ">=3.9.3,<3.10" # For `zombie_todos.py`
attrs = ">=23.1.0"
clang = "16.0.6.*"
clang-tools = "16.0.6.*" # clang-format
cmake = "3.27.6.*"
colorama = ">=0.4.6,<0.5"
doxygen = "1.9.7.*" # Make sure to use a version that is compatible with the theme we're using, see https://github.com/jothepro/doxygen-awesome-css/blob/v2.2.1/README.md
fd-find = ">=10.1.0" # Used by `cpp-fmt` to find C++ files
ffmpeg = ">=7.1.0,<8" # Needed for consistent results on tests that use ffmpeg to render video.
flatbuffers = ">=23"
gitignore-parser = ">=0.1.9"
gitpython = ">=3.1.40"
jinja2 = ">=3.1.3,<3.2" # For `build_screenshot_compare.py` and other utilities that build websites.
mypy = "1.14.1.*"
nasm = ">=2.16" # Required by https://github.com/memorysafety/rav1d for native video support
ninja = "1.11.1.*"
numpy = ">=2" # Whenever upgrading here, also make sure to upgrade in `rerun_py/pyproject.toml`
prettier = ">=3.6"
pyarrow = "18.0.0.*" # Whenever upgrading here, also make sure to upgrade in `rerun_py/pyproject.toml`
pytest = ">=7"
pytest-benchmark = ">=4.0.0,<4.1"
python = "=3.11" # We use the latest Python version here, so we get the latest mypy etc, EXCEPT 3.12 is too new for some of our examples. We run our CI tests on ALL supported versions though.
ruff = "0.9.6.*"
semver = ">=3.0,<3.1"
taplo = "=0.9.1"
tomlkit = "0.12.3.*"
tqdm = ">=4.66.2,<4.67" # For displaying progress in various utility scripts.
typing_extensions = ">4.5"
typos = ">=1.16.20"
[feature.base.pypi-dependencies]
cryptography = "==38.0.4" # For `upload_image.py`
google-cloud-storage = "==2.9.0" # For `upload_image.py`
hatch = "==1.12.0" # For `rerun_notebook`
jupyter = ">=1.0" # Needed for running the notebook (so we can actually do something after `pixi run py-build-notebook`)
parso = ">=0.8.4, <0.9"
Pillow = ">=10.0.0" # For `thumbnails.py`
pygithub = "==2.6.1" # Among others for `sync_release_assets.py`.
requests = ">=2.31,<3" # For `thumbnails.py` & `upload_image.py`
types-decorator = "*" # Type hint stubs
types-Deprecated = "==1.2.9.2" # Type hint stubs
types-pytz = "*" # Type hint stubs
types-requests = ">=2.31,<3" # Type hint stubs
[feature.wheel-build.dependencies]
binaryen = "117.*" # for `wasm-opt`
maturin = "==1.8.1"
nodejs = ">=22.0" # rerun_notebook needs nodejs to build the wheel
packaging = ">=24.0,<25" # For `publish_wheels.py`
pip = ">=23"
pyarrow = "18.0.0.*"
wheel = ">=0.38,<0.39"
[target.linux-64.dependencies]
patchelf = ">=0.17"
meilisearch = "1.5.1.*" # not available for linux-aarch64
buf = "1.*" # not available for linux-aarch64
[target.osx-arm64.dependencies]
buf = "1.*" # not available for linux-aarch64
libgfortran5 = ">=14" # Fixes issues with OpenCV
meilisearch = "1.5.1.*" # not available for linux-aarch64
[target.win-64.dependencies]
buf = "1.*" # not available for linux-aarch64
[feature.cpp.target.linux-64.dependencies]
sysroot_linux-64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[feature.cpp.target.linux-aarch64.dependencies]
sysroot_linux-aarch64 = ">=2.17,<3" # rustc 1.64+ requires glibc 2.17+, see https://blog.rust-lang.org/2022/08/01/Increasing-glibc-kernel-requirements.html
[feature.cpp.target.unix.dependencies]
ninja = "1.11.1.*"
# Use system compilers for C/C++.
#
# This is important in particular on MacOS, where it's really hard to get a custom clang to work,
# due to various peculiarities of the linker setup.
# (i.e. I have figured out to pick up the right compiler by setting CC/CXX env vars, but couldn't get it to link!)
#
# Note however, that as of writing, our web viewer build needs to use a newer compiler than what MacOS ships with,
# so we have to make sure that anything building the web viewer does **not** use these packages.
c-compiler = "1.6.0.*"
cxx-compiler = "1.6.0.*"
[feature.cpp.target.win-64.dependencies]
vs2022_win-64 = "19.37.32822.*"
[feature.cpp.pypi-dependencies]
ghp-import = "==2.1.0" # for CI documentation handling
# PYTHON DEV ENVIRONMENT
[feature.python-dev]
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
[feature.python-dev.dependencies]
# We need opencv for `compare_snippet_output.py` (needed by both C++ and Python)
# and other common examples/snippets.
#
# We specifically don't use the pypi version because the conda version is generally
# more portable. However, this is all a total mess. See: https://github.com/rerun-io/rerun/pull/6946
#
# This is also redundantly defined in `python-pypi`
opencv = ">4.6"
numpy = ">=2" # Rerun still needs numpy <2. Enforce this outside of the pypi dep tree so we pick up the conda version.
[feature.python-dev.pypi-dependencies]
# Install the `rerun_py` as a package in editable mode.
# This is very similar to `pixi run py-build`, and dispatches to maturin by way of PEP621.
# However, pixi doesn't know how to track the rust dependencies of the python package, so
# you still need to `pixi run py-build` in the correct environment if you change the rust code.
rerun-sdk = { path = "rerun_py", editable = true, extras = ["all"] }
# The same applies to the notebook.
# However, in order to build rerun-notebook and thus to even activate environments with the
# python-dev environment you first have to build `js-build-base`.
# This in itself is a usability problem, but since Pixi may want to upgrade or setup these environments
# when running the `js-build-base` task itself, it makes bootstrapping impossible without manual intervention.
#rerun-notebook = { path = "rerun_notebook", editable = true }
[feature.python-docs.pypi-dependencies]
griffe = "==1.4.1"
mkdocs = "==1.6.1"
mkdocs-gen-files = "==0.5.0"
mkdocs-literate-nav = "==0.6.1"
mkdocs-material = "==9.4.7"
mkdocs-material-extensions = "==1.3"
mkdocs-redirects = { git = "https://github.com/rerun-io/mkdocs-redirects.git", rev = "fb6b074554975ba7729d68d04957ce7c7dfd5003" } # forked mkdocs-redirects with https://github.com/rerun-io/mkdocs-redirects/commit/d367a0847928438b66f73508e49852be1190409b
mkdocstrings = "==0.26.2"
mkdocstrings-python = "==1.12.1"
setuptools = ">75"
sphobjinv = "==2.3.1"
[feature.py-test-deps]
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"]
[feature.py-test-deps.dependencies]
# Used for some video examples.
# Note that it comes with its own ffmpeg, see https://pyav.basswood-io.com/docs/stable/overview/installation.html.
av = ">=14.2.0"
[feature.py-test-deps.pypi-dependencies]
# Torch is needed to run the rerun unit tests.
# This dependency is here to get torch into the pixi cache because it's large and installing it
# during the wheel-test task itself is otherwise painful.
torch = "==2.6.0" # This must match the torch version in any package we install during `wheel-test`
[feature.wheel-test.dependencies]
pip = ">=23"
# PYTHON PYPI ENVIRONMENT
[feature.python-pypi]
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64", "win-64"]
[feature.python-pypi.dependencies]
# Note these are the same as in `python-dev` but we need to repeat them here because the two are mutually exclusive.
opencv = ">4.6"
numpy = ">=2" # Rerun still needs numpy <2. Enforce this outside of the pypi dep tree so we pick up the conda version.
[feature.python-pypi.pypi-dependencies]
rerun-sdk = { version = "==0.24.0", extras = ["all"] }
rerun-notebook = "==0.24.0"
# EXAMPLES ENVIRONMENT
[feature.examples-common]
# TODO(#9180): Split `examples` into high-dep and low-dep so we can run some examples on `linux-aarch64` and `osx-64`.
platforms = ["linux-64", "osx-arm64", "win-64"]
[feature.examples-common.system-requirements]
macos = "12.0" # needed for scipy
[feature.examples-common.dependencies]
python = "=3.11"
# TODO(ab): otherwise pixi will try to build from source and fail, not sure why (used by air_traffic_data)
pyproj = ">=3.7.0"
# Need to use the conda version of umap-learn to be compatible with numpy-2
umap-learn = "==0.5.7"
[feature.examples-common.pypi-dependencies]
# External deps
av = ">=14.2.0"
datafusion = "==47.0.0"
jupyter = ">=1.0"
polars = ">=0.12.0"
segment-anything = { git = "https://github.com/facebookresearch/segment-anything.git" }
# Rerun libs
air_traffic_data = { path = "examples/python/air_traffic_data", editable = true }
arkit_scenes = { path = "examples/python/arkit_scenes", editable = true }
blueprint = { path = "examples/python/blueprint", editable = true }
blueprint_stocks = { path = "examples/python/blueprint_stocks", editable = true }
camera_video_stream = { path = "examples/python/camera_video_stream", editable = true }
clock = { path = "examples/python/clock", editable = true }
controlnet = { path = "examples/python/controlnet", editable = true }
dataframe_query = { path = "examples/python/dataframe_query", editable = true }
detect_and_track_objects = { path = "examples/python/detect_and_track_objects", editable = true }
dicom_mri = { path = "examples/python/dicom_mri", editable = true }
dna = { path = "examples/python/dna", editable = true }
drone_lidar = { path = "examples/python/drone_lidar", editable = true }
imu_signals = { path = "examples/python/imu_signals", editable = true }
incremental_logging = { path = "examples/python/incremental_logging", editable = true }
lidar = { path = "examples/python/lidar", editable = true }
live_camera_edge_detection = { path = "examples/python/live_camera_edge_detection", editable = true }
live_scrolling_plot = { path = "examples/python/live_scrolling_plot", editable = true }
# This depends on umap-learn which is incompatible with numpy-2 if it is installed from pypi.
llm_embedding_ner = { path = "examples/python/llm_embedding_ner", editable = true }
log_file = { path = "examples/python/log_file", editable = true }
minimal = { path = "examples/python/minimal", editable = true }
minimal_options = { path = "examples/python/minimal_options", editable = true }
multiprocess_logging = { path = "examples/python/multiprocess_logging", editable = true }
multithreading = { path = "examples/python/multithreading", editable = true }
graph_lattice = { path = "examples/python/graph_lattice", editable = true }
graphs = { path = "examples/python/graphs", editable = true }
nuscenes_dataset = { path = "examples/python/nuscenes_dataset", editable = true }
nv12 = { path = "examples/python/nv12", editable = true }
objectron = { path = "examples/python/objectron", editable = true }
open_photogrammetry_format = { path = "examples/python/open_photogrammetry_format", editable = true }
openstreetmap_data = { path = "examples/python/openstreetmap_data", editable = true }
plots = { path = "examples/python/plots", editable = true }
raw_mesh = { path = "examples/python/raw_mesh", editable = true }
rgbd = { path = "examples/python/rgbd", editable = true }
rrt_star = { path = "examples/python/rrt_star", editable = true }
segment_anything_model = { path = "examples/python/segment_anything_model", editable = true }
shared_recording = { path = "examples/python/shared_recording", editable = true }
stdio = { path = "examples/python/stdio", editable = true }
structure_from_motion = { path = "examples/python/structure_from_motion", editable = true }
face_tracking = { path = "examples/python/face_tracking", editable = true }
gesture_detection = { path = "examples/python/gesture_detection", editable = true }
human_pose_tracking = { path = "examples/python/human_pose_tracking", editable = true }
# # OCR Needs an isolated environment because it depends on opencv-4.6 by way of the `paddleclas` package
# [feature.examples-ocr]
# platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]
#
# [feature.examples-ocr.system-requirements]
# macos = "12.0" # needed for scipy
#
# [feature.examples-ocr.dependencies]
# poppler = "24.04" # Needed to read pdf files.
# faiss-cpu = "==1.7.2" # Dep comes from paddleclas but we want the conda version to avoid source-wheel build
#
# # Note these are the same as in `python-dev` but we need to repeat them here because the two are mutually exclusive.
# numpy = "<2" # Rerun still needs numpy <2. Enforce this outside of the pypi dep tree so we pick up the conda version.
#
# [feature.examples-ocr.pypi-dependencies]
# rerun-sdk = { path = "rerun_py", editable = true }
# rerun-notebook = { path = "rerun_notebook", editable = true }
#
# paddleclas = { version = "==2.5.2" }
# ocr = { path = "examples/python/ocr", editable = true }