-
Notifications
You must be signed in to change notification settings - Fork 68
Set up pixi for development #1674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 61 commits
1a5e954
d4e76b9
dcf8823
8bd8ffa
00a4a35
d15ac3f
b2eb4a4
3eaf430
1d9995c
7af04e1
3c2b42b
15a456d
0d78dc3
df49b86
70f5aa8
5e0f773
3bb06f8
e81d949
0512488
660e93e
d1f137a
5a7baf7
9f502d6
a51485d
2ae1a43
ea7f374
5a30b4e
df2f232
9a34dfb
de52fc8
c2842bf
f3bad91
b5b9675
ba57c29
f850896
2824c7f
0bf0d6d
7f88afb
12ae552
e6237b4
a421257
6c72e76
8d073eb
37a3fa5
324c437
c546350
52f1926
5db366f
729ee6e
97d11c6
88aa9cc
94b614e
8c1bc04
9f7701c
308c0a5
eb281d4
f10e926
1e037df
28623f8
b065baf
1190888
fb85f5b
6beeb52
8f6b3ca
db1209b
5b1b8e2
8f20cbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,3 +23,6 @@ icechunk-python/uv.lock | |
|
|
||
| # Jetbrains IDE | ||
| .idea/ | ||
| # pixi environments | ||
| .pixi/* | ||
| !.pixi/config.toml | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,62 +4,64 @@ profile := "dev" | |
| alias fmt := format | ||
| alias pre := pre-commit | ||
|
|
||
| # run all tests | ||
| [doc("Run all Rust tests via cargo-nextest")] | ||
| test *args='': | ||
| cargo nextest run --no-fail-fast --cargo-profile {{profile}} --workspace --all-targets {{args}} | ||
| export DYLD_LIBRARY_PATH="${CONDA_PREFIX:-}/lib" && cargo nextest run --no-fail-fast --cargo-profile {{profile}} --workspace --all-targets {{args}} | ||
|
|
||
| [doc("Run Rust doc tests only")] | ||
| doctest *args='': | ||
| cargo test --workspace --profile {{profile}} --doc {{args}} | ||
|
|
||
| # run all tests with logs enabled | ||
| [doc("Run all Rust tests with RUST_LOG enabled (e.g. `just test-logs debug`)")] | ||
| test-logs level *args='': | ||
| RUST_LOG=icechunk={{level}} cargo nextest run --no-fail-fast --cargo-profile {{profile}} --workspace --all-targets {{args}} -- --nocapture | ||
| export DYLD_LIBRARY_PATH="${CONDA_PREFIX:-}/lib" && RUST_LOG=icechunk={{level}} cargo nextest run --no-fail-fast --cargo-profile {{profile}} --workspace --all-targets {{args}} -- --nocapture | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not 100% sure if this here or above fixed the issue. Ill test locally.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ill leave this in for now unless someone has a neater solution that does not require users to modify their mac? |
||
|
|
||
| # compile but don't run all tests | ||
| [doc("Compile tests without running them")] | ||
| compile-tests *args='': | ||
| cargo nextest run --no-run --cargo-profile {{profile}} --workspace --all-targets {{args}} | ||
| export DYLD_LIBRARY_PATH="${CONDA_PREFIX:-}/lib" && cargo nextest run --no-run --cargo-profile {{profile}} --workspace --all-targets {{args}} | ||
|
|
||
| # build debug version | ||
| [doc("Build the Rust workspace (debug by default, override with `just profile=ci build`)")] | ||
| build *args='': | ||
| cargo build --profile {{profile}} {{args}} | ||
|
|
||
| # build release version | ||
| [doc("Build the Rust workspace in release mode")] | ||
| build-release *args='': | ||
| cargo build --release {{args}} | ||
|
|
||
| # run clippy | ||
| [doc("Run clippy lints on all features")] | ||
| lint *args='': | ||
| cargo clippy --profile {{profile}} --all-features {{args}} | ||
|
|
||
| # reformat all rust files | ||
| [doc("Format all Rust files (pass `--check` to verify only)")] | ||
| format *args='': | ||
| cargo fmt --all {{args}} | ||
|
|
||
| # reformat all nix files | ||
| [doc("Format all Nix files with alejandra")] | ||
| format-nix *args='': | ||
| alejandra . | ||
|
|
||
| # run cargo deny to check dependencies | ||
| [doc("Check dependencies for security/license issues via cargo-deny")] | ||
| check-deps *args='': | ||
| cargo deny --all-features check {{args}} | ||
|
|
||
| [doc("Run all Rust examples (skips limits_chunk_refs)")] | ||
| run-all-examples: | ||
| for example in icechunk/examples/*.rs; do if [[ ${example} =~ "limits_chunk_refs" ]]; then continue; fi; cargo run --profile {{profile}} --example "$(basename "${example%.rs}")"; done | ||
|
|
||
| # fast pre-commit - format and lint only | ||
| [doc("Fast Rust pre-commit: format + lint (~3s)")] | ||
| pre-commit-fast: | ||
| just format | ||
| just lint "--workspace" | ||
|
|
||
| # medium pre-commit - includes compilation checks (~2-3 minutes) | ||
| [doc("Medium Rust pre-commit: compile, build, format, lint, deps (~2-3min)")] | ||
| pre-commit $RUSTFLAGS="-D warnings -W unreachable-pub -W bare-trait-objects": | ||
| just compile-tests "--locked" | ||
| just build | ||
| just format | ||
| just lint "--workspace" | ||
| just check-deps | ||
|
|
||
| # full pre-commit for CI - runs all checks including tests | ||
| [doc("Full Rust CI pre-commit: all checks including tests and examples (~5+min)")] | ||
| pre-commit-ci $RUSTFLAGS="-D warnings -W unreachable-pub -W bare-trait-objects": | ||
| just profile=ci compile-tests "--locked" | ||
| just profile=ci build | ||
|
|
@@ -70,17 +72,49 @@ pre-commit-ci $RUSTFLAGS="-D warnings -W unreachable-pub -W bare-trait-objects": | |
| just profile=ci run-all-examples | ||
| just check-deps | ||
|
|
||
| [doc("Rust format + lint for the icechunk-python crate only")] | ||
| pre-commit-python: | ||
| just format "-p icechunk-python" | ||
| just lint "-p icechunk-python" | ||
|
|
||
| [doc("Compare pytest-benchmark results")] | ||
| bench-compare *args: | ||
| pytest-benchmark compare --group=group,func,param --sort=fullname --columns=median --name=short {{args}} | ||
|
|
||
| create-deepak-env name: | ||
| mamba create -y -n icechunk-{{name}} python=3.12 ipykernel ipdb | ||
| mamba activate icechunk-{{name}} | ||
| just coiled-ice-create {{name}} | ||
|
|
||
| coiled-ice-create version: | ||
| pip install coiled arraylake icechunk=='{{version}}' watermark xarray bokeh | ||
| [doc("Run ruff formatter on Python code")] | ||
| ruff-format *args: | ||
| ruff format | ||
|
|
||
| [doc("Run ruff linter on Python code (pass `--fix` for auto-fix)")] | ||
| ruff *args: | ||
| ruff check --show-fixes icechunk-python/ {{args}} | ||
|
|
||
| [doc("Run mypy type checking on Python code")] | ||
| mypy *args: | ||
| cd icechunk-python && mypy python tests {{args}} | ||
|
|
||
| [doc("Run all Python pre-commit hooks (ruff, formatting, codespell, etc.)")] | ||
| py-pre-commit $SKIP="rust-pre-commit-fast,rust-pre-commit,rust-pre-commit-ci" *args: | ||
| prek run --all-files | ||
|
|
||
| [doc("Run Python tests via pytest")] | ||
| pytest *args: | ||
| cd icechunk-python && pytest {{args}} | ||
|
|
||
| [doc("Start MkDocs dev server with live reload")] | ||
| docs-serve *args: | ||
| mkdocs serve -f icechunk-python/docs/mkdocs.yml --livereload {{args}} | ||
|
|
||
| [doc("Build MkDocs static site")] | ||
| docs-build *args: | ||
| mkdocs build -f icechunk-python/docs/mkdocs.yml {{args}} | ||
|
|
||
| [doc("Run all Python and Rust checks")] | ||
| all-checks: | ||
| just pytest | ||
| just py-pre-commit | ||
| just mypy | ||
| just ruff | ||
| just ruff-format | ||
| just pre-commit-python | ||
| just pre-commit-ci | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must fix this, rust channel doesn't make much sense anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude adapt this to the proposed changes within pixi