forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pixi.toml
300 lines (256 loc) · 13.2 KB
/
pixi.toml
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
# 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
[project]
name = "rerun"
authors = ["rerun.io <[email protected]>"]
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`
[environments]
cpp = ["cpp"]
py-docs = ["py-docs"]
wheel-test = ["wheel-test"]
[tasks]
# Note: extra CLI argument after `pixi run TASK` are passed to the task cmd.
# Run the codegen. Optionally pass `--profile` argument if you want.
codegen = "cargo --quiet run --package re_types_builder -- "
# 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 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 native_viewer --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 -p re_build_web_viewer -- --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 -p re_build_web_viewer -- --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 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 -p re_build_web_viewer -- --release -g"
rs-check = "rustup target add wasm32-unknown-unknown && python scripts/ci/rust_checks.py"
build-examples = "cargo run -q --locked -p re_build_examples --"
# Code formatting for all languages.
format = { depends_on = ["py-fmt", "cpp-fmt", "toml-fmt", "misc-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-all
lint-rerun = "python scripts/lint.py"
lint-rs-files = "rustfmt --edition 2021 --check"
lint-rs-all = "cargo fmt --check"
lint-typos = "typos"
# Toml tasks
toml-fmt-check = "taplo fmt --check --diff"
toml-fmt = "taplo fmt"
# 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 format --check --config rerun_py/pyproject.toml"
py-lint = "mypy --install-types --non-interactive --no-warn-unused-ignore"
py-build = "maturin develop --manifest-path rerun_py/Cargo.toml --extras=tests"
py-wheel = "maturin build --manifest-path rerun_py/Cargo.toml"
# Run the Python tests.
# Don't call this on CI - use `nox` to run tests on all supported Python versions instead.
py-test = { cmd = "python -m pytest -vv rerun_py/tests/unit", depends_on = [
"py-build",
] }
py-bench = { cmd = "python -m pytest -c rerun_py/pyproject.toml --benchmark-only", depends_on = [
"py-build",
] }
# Python example utilities
py-run-all-examples = { cmd = "python scripts/run_all.py --skip-build", depends_on = [
"py-build",
] }
py-run-all-examples-web = { cmd = "python scripts/run_all.py --web --skip-build", depends_on = [
"rerun-build-web-cli",
"py-build",
] }
py-plot-dashboard = { cmd = "python tests/python/plot_dashboard_stress/main.py", depends_on = [
"py-build",
] }
rs-plot-dashboard = { cmd = "cargo r -p plot_dashboard_stress --release --" }
# Build the documentation search index.
# See `pixi run search-index --help` for more information.
search-index = "cargo run -p re_build_search_index --release --"
# 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 design_tokens.json used to style the GUI.
# See https://rerun-design-guidelines.netlify.app/tokens for their meanings.
# To update the upstream `design_tokens.json`, modify
# https://github.com/rerun-io/documentation/blob/main/src/utils/tokens.ts and push to main.
download-design-tokens = "curl --fail https://rerun-docs.netlify.app/api/tokens | jq > crates/re_ui/data/design_tokens.json"
# 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"
# Check whether there's too large files in the repository.
check-large-files = "python scripts/ci/check_large_files.py"
[feature.py-docs.tasks]
# Serve python docs locally
py-docs-serve = "mkdocs serve -f rerun_py/mkdocs.yml -w rerun_py"
[feature.py-docs.pypi-dependencies]
griffe = "==0.39.0"
mike = "==1.1.2"
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/d367a0847928438b66f73508e49852be1190409bmkdocs = "==1.5.3"
mkdocstrings = "==0.23.0"
mkdocstrings-python = "==1.7.3"
sphobjinv = "==2.3.1"
typing_extensions = "==4.11.0" # uncaptured dep for mkdocstrings (https://github.com/mkdocstrings/mkdocstrings/issues/548)
[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-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 && ./build/debug/rerun_cpp/tests/rerun_sdk_tests", depends_on = [
"cpp-build-tests",
] }
cpp-log-benchmark = { cmd = "export RERUN_STRICT=1 && ./build/release/tests/cpp/log_benchmark/log_benchmark", depends_on = [
"cpp-build-log-benchmark",
] }
cpp-plot-dashboard = { cmd = "export RERUN_STRICT=1 && ./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 ."
[feature.wheel-test.pypi-dependencies]
torch = ">=2.0.1"
[feature.wheel-test.tasks]
# In the wheel-test environment we want to use the wheel-installed `rerun` binary on the path.
# This overrides the `rerun` task from the default env which otherwise executes via cargo.
rerun = "rerun"
[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 https://prefix.dev/channels/conda-forge/packages/XXXX. It should support Windows,
# x86_64 and aarch64 macOS architectures, and x86_64 and aarch64 Linux architectures.
# - 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"
binaryen = "117.*" # for `wasm-opt`
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
flatbuffers = ">=23"
gitignore-parser = ">=0.1.9"
gitpython = ">=3.1.40"
jinja2 = ">=3.1.3,<3.2" # For `update_pr_bodies.py`, `generate_pr_summary.py`, `build_screenshot_compare.py` and other utilities that build websites.
maturin = "1.5.1"
mypy = "1.8.0"
ninja = "1.11.1"
numpy = ">=1.23,<2"
packaging = ">=24.0,<25" # For `publish_wheels.py`
pip = ">=23"
prettier = "2.8.8.*"
pyarrow = "14.0.2"
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.3.5"
semver = ">=2.13,<2.14"
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"
wheel = ">=0.38,<0.39"
[pypi-dependencies]
colorama = "==0.4.6" # For `crates.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`
pygithub = "==1.59.0" # Among others for `generate_pr_summary.py`, `sync_release_assets.py`, `update_pr_body.py`.
requests = ">=2.31,<3" # For `thumbnails.py` & `upload_image.py`
types-Deprecated = "==1.2.9.2" # Type hint stubs
types-requests = ">=2.31,<3" # Type hint stubs
[target.linux-64.dependencies]
patchelf = ">=0.17"
meilisearch = "1.5.1.*" # not available for linux-aarch64
[feature.cpp.target.unix.dependencies]
clang = "16.0.6"
ninja = "1.11.1"
c-compiler = "1.6.0.*"
cxx-compiler = "1.6.0.*"
[feature.cpp.target.win-64.dependencies]
vs2022_win-64 = "19.37.32822"