lazymatrix 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lazymatrix-0.1.1/.github/dependabot.yml +31 -0
- lazymatrix-0.1.1/.github/workflows/ci.yml +257 -0
- lazymatrix-0.1.1/.github/workflows/publish-crates.yml +30 -0
- lazymatrix-0.1.1/.github/workflows/publish-python.yml +113 -0
- lazymatrix-0.1.1/.github/workflows/website.yml +120 -0
- lazymatrix-0.1.1/.gitignore +55 -0
- lazymatrix-0.1.1/.versionary-manifest.json +34 -0
- lazymatrix-0.1.1/AGENTS.md +266 -0
- lazymatrix-0.1.1/CHANGELOG.md +106 -0
- lazymatrix-0.1.1/CITATION.cff +16 -0
- lazymatrix-0.1.1/CLAUDE.md +1 -0
- lazymatrix-0.1.1/COPYING-APACHE +176 -0
- lazymatrix-0.1.1/COPYING-MIT +21 -0
- lazymatrix-0.1.1/Cargo.lock +3419 -0
- lazymatrix-0.1.1/Cargo.toml +153 -0
- lazymatrix-0.1.1/LICENSE-APACHE +176 -0
- lazymatrix-0.1.1/LICENSE-MIT +21 -0
- lazymatrix-0.1.1/PKG-INFO +59 -0
- lazymatrix-0.1.1/README.md +178 -0
- lazymatrix-0.1.1/TODO.md +616 -0
- lazymatrix-0.1.1/Taskfile.yml +129 -0
- lazymatrix-0.1.1/assets/favicon-source.png +0 -0
- lazymatrix-0.1.1/assets/logo-dark-large.png +0 -0
- lazymatrix-0.1.1/assets/logo-dark.png +0 -0
- lazymatrix-0.1.1/assets/logo-large.png +0 -0
- lazymatrix-0.1.1/assets/logo-sunchair-dark-large.png +0 -0
- lazymatrix-0.1.1/assets/logo-sunchair-dark.png +0 -0
- lazymatrix-0.1.1/assets/logo-sunchair-large.png +0 -0
- lazymatrix-0.1.1/assets/logo-sunchair.png +0 -0
- lazymatrix-0.1.1/assets/logo.png +0 -0
- lazymatrix-0.1.1/assets/og.png +0 -0
- lazymatrix-0.1.1/assets/og.svg +100 -0
- lazymatrix-0.1.1/benches/column_sds.rs +82 -0
- lazymatrix-0.1.1/benches/common/normalization.rs +170 -0
- lazymatrix-0.1.1/benches/eager_normalization.md +154 -0
- lazymatrix-0.1.1/benches/eager_normalization.rs +98 -0
- lazymatrix-0.1.1/benches/fused_consumer.md +134 -0
- lazymatrix-0.1.1/benches/fused_consumer.rs +511 -0
- lazymatrix-0.1.1/benches/normalization_allocations.md +144 -0
- lazymatrix-0.1.1/benches/normalization_memory.rs +179 -0
- lazymatrix-0.1.1/benches/normalization_tradeoffs/metadata.json +46 -0
- lazymatrix-0.1.1/benches/normalization_tradeoffs/results.csv +2773 -0
- lazymatrix-0.1.1/benches/overwrite_comparison.csv +793 -0
- lazymatrix-0.1.1/benches/overwrite_comparison.md +168 -0
- lazymatrix-0.1.1/benches/sprs_backend.rs +80 -0
- lazymatrix-0.1.1/benches/weighted_gram.md +167 -0
- lazymatrix-0.1.1/benches/weighted_gram.rs +216 -0
- lazymatrix-0.1.1/benches/weighted_norm.md +45 -0
- lazymatrix-0.1.1/devenv.lock +124 -0
- lazymatrix-0.1.1/devenv.nix +87 -0
- lazymatrix-0.1.1/devenv.yaml +13 -0
- lazymatrix-0.1.1/diplodocus.yaml +33 -0
- lazymatrix-0.1.1/examples/coordinate_descent.rs +235 -0
- lazymatrix-0.1.1/examples/least_squares_gd.rs +136 -0
- lazymatrix-0.1.1/examples/least_squares_sgd.rs +331 -0
- lazymatrix-0.1.1/examples/ndarray_mmap.rs +80 -0
- lazymatrix-0.1.1/examples/slope_primitives.rs +77 -0
- lazymatrix-0.1.1/examples/weighted_gram.rs +42 -0
- lazymatrix-0.1.1/examples/zarrs_chunked.rs +88 -0
- lazymatrix-0.1.1/panache.toml +1 -0
- lazymatrix-0.1.1/pyproject.toml +55 -0
- lazymatrix-0.1.1/python/rust/Cargo.lock +258 -0
- lazymatrix-0.1.1/python/rust/Cargo.toml +20 -0
- lazymatrix-0.1.1/python/rust/src/lib.rs +274 -0
- lazymatrix-0.1.1/rust-toolchain.toml +3 -0
- lazymatrix-0.1.1/rustfmt.toml +2 -0
- lazymatrix-0.1.1/scripts/bench-normalization-allocations.sh +10 -0
- lazymatrix-0.1.1/scripts/bench-normalization-tradeoffs.sh +68 -0
- lazymatrix-0.1.1/scripts/bench-weighted-gram-blas.sh +11 -0
- lazymatrix-0.1.1/scripts/check-python-dist.py +76 -0
- lazymatrix-0.1.1/scripts/check-releases.mjs +141 -0
- lazymatrix-0.1.1/scripts/python-tool.py +30 -0
- lazymatrix-0.1.1/scripts/summarize-normalization-tradeoffs.py +74 -0
- lazymatrix-0.1.1/scripts/summarize-overwrite-comparison.py +139 -0
- lazymatrix-0.1.1/scripts/test-backends.sh +157 -0
- lazymatrix-0.1.1/src/backends/faer/csr.rs +298 -0
- lazymatrix-0.1.1/src/backends/faer/dense.rs +617 -0
- lazymatrix-0.1.1/src/backends/faer/gram.rs +235 -0
- lazymatrix-0.1.1/src/backends/faer/sparse.rs +361 -0
- lazymatrix-0.1.1/src/backends/faer/transpose_current.rs +40 -0
- lazymatrix-0.1.1/src/backends/faer/transpose_legacy.rs +42 -0
- lazymatrix-0.1.1/src/backends/faer/v0_22.rs +16 -0
- lazymatrix-0.1.1/src/backends/faer/v0_23.rs +16 -0
- lazymatrix-0.1.1/src/backends/faer/v0_24.rs +16 -0
- lazymatrix-0.1.1/src/backends/faer/vector.rs +110 -0
- lazymatrix-0.1.1/src/backends/faer.rs +11 -0
- lazymatrix-0.1.1/src/backends/nalgebra/csr.rs +193 -0
- lazymatrix-0.1.1/src/backends/nalgebra/dense.rs +543 -0
- lazymatrix-0.1.1/src/backends/nalgebra/gram.rs +84 -0
- lazymatrix-0.1.1/src/backends/nalgebra/sparse.rs +347 -0
- lazymatrix-0.1.1/src/backends/nalgebra/v0_32.rs +14 -0
- lazymatrix-0.1.1/src/backends/nalgebra/v0_33.rs +14 -0
- lazymatrix-0.1.1/src/backends/nalgebra/v0_34.rs +14 -0
- lazymatrix-0.1.1/src/backends/nalgebra/v0_35.rs +14 -0
- lazymatrix-0.1.1/src/backends/nalgebra/vector.rs +102 -0
- lazymatrix-0.1.1/src/backends/nalgebra.rs +14 -0
- lazymatrix-0.1.1/src/backends/ndarray/dense.rs +459 -0
- lazymatrix-0.1.1/src/backends/ndarray/gram.rs +156 -0
- lazymatrix-0.1.1/src/backends/ndarray/v0_15.rs +8 -0
- lazymatrix-0.1.1/src/backends/ndarray/v0_16.rs +8 -0
- lazymatrix-0.1.1/src/backends/ndarray/v0_17.rs +8 -0
- lazymatrix-0.1.1/src/backends/ndarray/vector.rs +199 -0
- lazymatrix-0.1.1/src/backends/ndarray.rs +11 -0
- lazymatrix-0.1.1/src/backends/sprs/csc.rs +266 -0
- lazymatrix-0.1.1/src/backends/sprs/csr.rs +232 -0
- lazymatrix-0.1.1/src/backends/sprs/gram.rs +130 -0
- lazymatrix-0.1.1/src/backends/sprs/stats.rs +200 -0
- lazymatrix-0.1.1/src/backends/sprs.rs +251 -0
- lazymatrix-0.1.1/src/backends/support.rs +211 -0
- lazymatrix-0.1.1/src/backends/zarrs/array.rs +79 -0
- lazymatrix-0.1.1/src/backends/zarrs/stats.rs +187 -0
- lazymatrix-0.1.1/src/backends/zarrs/v0_22.rs +22 -0
- lazymatrix-0.1.1/src/backends/zarrs/v0_23.rs +22 -0
- lazymatrix-0.1.1/src/backends/zarrs.rs +390 -0
- lazymatrix-0.1.1/src/backends.rs +16 -0
- lazymatrix-0.1.1/src/column.rs +396 -0
- lazymatrix-0.1.1/src/csr_stats.rs +241 -0
- lazymatrix-0.1.1/src/dense_products.rs +108 -0
- lazymatrix-0.1.1/src/eager.rs +380 -0
- lazymatrix-0.1.1/src/gram.rs +672 -0
- lazymatrix-0.1.1/src/intercept.rs +394 -0
- lazymatrix-0.1.1/src/lazymatrix/__init__.py +9 -0
- lazymatrix-0.1.1/src/lazymatrix/_core.pyi +30 -0
- lazymatrix-0.1.1/src/lazymatrix/_matrix.py +262 -0
- lazymatrix-0.1.1/src/lazymatrix/py.typed +0 -0
- lazymatrix-0.1.1/src/lib.rs +436 -0
- lazymatrix-0.1.1/src/materialize.rs +86 -0
- lazymatrix-0.1.1/src/matrix.rs +747 -0
- lazymatrix-0.1.1/src/normalization.rs +106 -0
- lazymatrix-0.1.1/src/row.rs +129 -0
- lazymatrix-0.1.1/src/traits/blocks.rs +147 -0
- lazymatrix-0.1.1/src/traits/columns.rs +165 -0
- lazymatrix-0.1.1/src/traits/gram.rs +146 -0
- lazymatrix-0.1.1/src/traits/materialize.rs +79 -0
- lazymatrix-0.1.1/src/traits/operator.rs +599 -0
- lazymatrix-0.1.1/src/traits/rows.rs +40 -0
- lazymatrix-0.1.1/src/traits/stats.rs +208 -0
- lazymatrix-0.1.1/src/traits/vectors.rs +249 -0
- lazymatrix-0.1.1/src/traits/weighted_sums.rs +107 -0
- lazymatrix-0.1.1/src/traits.rs +91 -0
- lazymatrix-0.1.1/src/weighted_sums.rs +119 -0
- lazymatrix-0.1.1/tests/block_reader.rs +29 -0
- lazymatrix-0.1.1/tests/common/backend_aliases.rs +140 -0
- lazymatrix-0.1.1/tests/common/runner.rs +2779 -0
- lazymatrix-0.1.1/tests/common/zarrs.rs +727 -0
- lazymatrix-0.1.1/tests/common/zarrs_compat_v0_22.rs +27 -0
- lazymatrix-0.1.1/tests/common/zarrs_compat_v0_23.rs +27 -0
- lazymatrix-0.1.1/tests/common/zarrs_suite_v0_22.rs +4 -0
- lazymatrix-0.1.1/tests/common/zarrs_suite_v0_23.rs +4 -0
- lazymatrix-0.1.1/tests/cross_backend.rs +699 -0
- lazymatrix-0.1.1/tests/csr_gram.rs +147 -0
- lazymatrix-0.1.1/tests/eager.rs +178 -0
- lazymatrix-0.1.1/tests/faer_backend.rs +614 -0
- lazymatrix-0.1.1/tests/fallible.rs +244 -0
- lazymatrix-0.1.1/tests/fused_scaled.rs +258 -0
- lazymatrix-0.1.1/tests/intercept.rs +487 -0
- lazymatrix-0.1.1/tests/nalgebra_backend.rs +311 -0
- lazymatrix-0.1.1/tests/ndarray_backend.rs +424 -0
- lazymatrix-0.1.1/tests/scalar_bounds.rs +19 -0
- lazymatrix-0.1.1/tests/sparse_rows.rs +195 -0
- lazymatrix-0.1.1/tests/sprs_backend.rs +535 -0
- lazymatrix-0.1.1/tests/vectors.rs +16 -0
- lazymatrix-0.1.1/tests/weighted_gram.rs +96 -0
- lazymatrix-0.1.1/tests/zarrs_backend.rs +16 -0
- lazymatrix-0.1.1/versionary.jsonc +20 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "npm"
|
|
4
|
+
directory: "/docs"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
groups:
|
|
8
|
+
website:
|
|
9
|
+
patterns:
|
|
10
|
+
- "*"
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
groups:
|
|
17
|
+
github-actions:
|
|
18
|
+
patterns:
|
|
19
|
+
- "*"
|
|
20
|
+
|
|
21
|
+
- package-ecosystem: "cargo"
|
|
22
|
+
directory: "/"
|
|
23
|
+
schedule:
|
|
24
|
+
interval: "weekly"
|
|
25
|
+
ignore:
|
|
26
|
+
# New backend release lines require explicit features and compatibility tests.
|
|
27
|
+
- dependency-name: "faer"
|
|
28
|
+
- dependency-name: "faer-traits"
|
|
29
|
+
- dependency-name: "nalgebra"
|
|
30
|
+
- dependency-name: "nalgebra-sparse"
|
|
31
|
+
- dependency-name: "ndarray"
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
CARGO_TERM_COLOR: always
|
|
11
|
+
RUSTFLAGS: -D warnings
|
|
12
|
+
UV_PROJECT_ENVIRONMENT: ${{ github.workspace }}/.devenv/python
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
fmt:
|
|
16
|
+
name: rustfmt
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v7
|
|
20
|
+
- name: Install rustfmt
|
|
21
|
+
run: rustup component add rustfmt
|
|
22
|
+
- run: cargo fmt --all -- --check
|
|
23
|
+
- run: cargo fmt --manifest-path tests/feature_unification/Cargo.toml --all -- --check
|
|
24
|
+
- run: cargo fmt --manifest-path tests/core_consumer/Cargo.toml --all -- --check
|
|
25
|
+
|
|
26
|
+
clippy:
|
|
27
|
+
name: clippy
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v7
|
|
31
|
+
- name: Install clippy
|
|
32
|
+
run: rustup component add clippy
|
|
33
|
+
- uses: Swatinem/rust-cache@v2
|
|
34
|
+
- run: cargo clippy --all-features --all-targets --locked -- -D warnings
|
|
35
|
+
- run: cargo clippy --manifest-path tests/feature_unification/Cargo.toml --workspace --all-features --all-targets --locked -- -D warnings
|
|
36
|
+
- run: cargo clippy --manifest-path tests/core_consumer/Cargo.toml --all-targets --locked -- -D warnings
|
|
37
|
+
|
|
38
|
+
docs:
|
|
39
|
+
name: rustdoc
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
env:
|
|
42
|
+
RUSTDOCFLAGS: -D warnings
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v7
|
|
45
|
+
- uses: Swatinem/rust-cache@v2
|
|
46
|
+
with:
|
|
47
|
+
key: docs
|
|
48
|
+
- run: cargo doc --no-deps --all-features --locked
|
|
49
|
+
|
|
50
|
+
test:
|
|
51
|
+
name: test (${{ matrix.group }})
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
strategy:
|
|
54
|
+
fail-fast: false
|
|
55
|
+
matrix:
|
|
56
|
+
include:
|
|
57
|
+
- group: core
|
|
58
|
+
args: core
|
|
59
|
+
- group: version-coexistence
|
|
60
|
+
args: coexistence
|
|
61
|
+
- group: faer-0.22
|
|
62
|
+
args: version faer_v0_22
|
|
63
|
+
- group: faer-0.23
|
|
64
|
+
args: version faer_v0_23
|
|
65
|
+
- group: faer-0.24
|
|
66
|
+
args: version faer_v0_24
|
|
67
|
+
- group: nalgebra-0.32
|
|
68
|
+
args: version nalgebra_v0_32
|
|
69
|
+
- group: nalgebra-0.33
|
|
70
|
+
args: version nalgebra_v0_33
|
|
71
|
+
- group: nalgebra-0.34
|
|
72
|
+
args: version nalgebra_v0_34
|
|
73
|
+
- group: nalgebra-0.35
|
|
74
|
+
args: version nalgebra_v0_35
|
|
75
|
+
- group: ndarray-0.15
|
|
76
|
+
args: version ndarray_v0_15
|
|
77
|
+
- group: ndarray-0.16
|
|
78
|
+
args: version ndarray_v0_16
|
|
79
|
+
- group: ndarray-0.17
|
|
80
|
+
args: version ndarray_v0_17
|
|
81
|
+
- group: sprs-0.11
|
|
82
|
+
args: version sprs_v0_11
|
|
83
|
+
- group: zarrs-0.22
|
|
84
|
+
args: version zarrs_v0_22
|
|
85
|
+
- group: zarrs-0.23
|
|
86
|
+
args: version zarrs_v0_23
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v7
|
|
89
|
+
- uses: Swatinem/rust-cache@v2
|
|
90
|
+
with:
|
|
91
|
+
key: ${{ matrix.group }}
|
|
92
|
+
workspaces: |
|
|
93
|
+
. -> target
|
|
94
|
+
tests/feature_unification -> target
|
|
95
|
+
- run: bash scripts/test-backends.sh ${{ matrix.args }}
|
|
96
|
+
- name: Run out-of-core examples
|
|
97
|
+
if: matrix.group == 'core'
|
|
98
|
+
run: |
|
|
99
|
+
cargo run --locked --example ndarray_mmap --features ndarray
|
|
100
|
+
cargo run --locked --example zarrs_chunked --features zarrs
|
|
101
|
+
|
|
102
|
+
core-msrv:
|
|
103
|
+
strategy:
|
|
104
|
+
matrix:
|
|
105
|
+
include:
|
|
106
|
+
- rust: "1.84.0"
|
|
107
|
+
features: ""
|
|
108
|
+
- rust: "1.85.0"
|
|
109
|
+
features: "sprs_v0_11"
|
|
110
|
+
name: Core and sprs MSRV (Rust ${{ matrix.rust }})
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@v7
|
|
114
|
+
- run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update
|
|
115
|
+
- name: Select sprs compatible with Rust 1.85
|
|
116
|
+
if: matrix.features == 'sprs_v0_11'
|
|
117
|
+
run: cargo +${{ matrix.rust }} update --package sprs --precise 0.11.4
|
|
118
|
+
- uses: Swatinem/rust-cache@v2
|
|
119
|
+
with:
|
|
120
|
+
key: core-msrv-${{ matrix.rust }}
|
|
121
|
+
- run: cargo +${{ matrix.rust }} build --locked --no-default-features --features "${{ matrix.features }}"
|
|
122
|
+
- run: cargo +${{ matrix.rust }} test --manifest-path tests/core_consumer/Cargo.toml --locked
|
|
123
|
+
|
|
124
|
+
core-wasm:
|
|
125
|
+
name: Core consumer (WASM)
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
steps:
|
|
128
|
+
- uses: actions/checkout@v7
|
|
129
|
+
- uses: Swatinem/rust-cache@v2
|
|
130
|
+
with:
|
|
131
|
+
workspaces: tests/core_consumer
|
|
132
|
+
- run: cargo +stable install wasm-pack --version 0.15.0 --locked
|
|
133
|
+
- run: cargo build --locked --no-default-features --target wasm32-unknown-unknown
|
|
134
|
+
- run: wasm-pack test --node -- --locked
|
|
135
|
+
working-directory: tests/core_consumer
|
|
136
|
+
|
|
137
|
+
msrv:
|
|
138
|
+
name: MSRV (Rust 1.87)
|
|
139
|
+
runs-on: ubuntu-latest
|
|
140
|
+
env:
|
|
141
|
+
RUSTUP_TOOLCHAIN: 1.87.0
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/checkout@v7
|
|
144
|
+
- run: rustup toolchain install 1.87.0 --profile minimal --no-self-update
|
|
145
|
+
- uses: Swatinem/rust-cache@v2
|
|
146
|
+
with:
|
|
147
|
+
key: msrv
|
|
148
|
+
- run: bash scripts/test-backends.sh msrv
|
|
149
|
+
|
|
150
|
+
zarrs-msrv:
|
|
151
|
+
name: zarrs 0.23 MSRV (Rust 1.91)
|
|
152
|
+
runs-on: ubuntu-latest
|
|
153
|
+
env:
|
|
154
|
+
RUSTUP_TOOLCHAIN: 1.91.0
|
|
155
|
+
steps:
|
|
156
|
+
- uses: actions/checkout@v7
|
|
157
|
+
- run: rustup toolchain install 1.91.0 --profile minimal --no-self-update
|
|
158
|
+
- uses: Swatinem/rust-cache@v2
|
|
159
|
+
with:
|
|
160
|
+
key: zarrs-msrv
|
|
161
|
+
- run: bash scripts/test-backends.sh zarrs-msrv
|
|
162
|
+
|
|
163
|
+
python:
|
|
164
|
+
name: Python (${{ matrix.python }})
|
|
165
|
+
runs-on: ubuntu-latest
|
|
166
|
+
strategy:
|
|
167
|
+
fail-fast: false
|
|
168
|
+
matrix:
|
|
169
|
+
python: ["3.11", "3.14"]
|
|
170
|
+
steps:
|
|
171
|
+
- uses: actions/checkout@v7
|
|
172
|
+
- name: Install Rust tools
|
|
173
|
+
run: rustup component add rustfmt clippy
|
|
174
|
+
- uses: astral-sh/setup-uv@v7
|
|
175
|
+
with:
|
|
176
|
+
python-version: ${{ matrix.python }}
|
|
177
|
+
- uses: Swatinem/rust-cache@v2
|
|
178
|
+
with:
|
|
179
|
+
workspaces: python/rust
|
|
180
|
+
- run: uv sync --project python --locked --no-install-project
|
|
181
|
+
- run: python ../scripts/python-tool.py maturin develop --release --locked
|
|
182
|
+
working-directory: python
|
|
183
|
+
- run: cargo fmt --manifest-path python/rust/Cargo.toml -- --check
|
|
184
|
+
- run: cargo clippy --manifest-path python/rust/Cargo.toml --all-targets --locked -- -D warnings
|
|
185
|
+
- run: python scripts/python-tool.py ruff check --config python/pyproject.toml python scripts/python-tool.py scripts/check-python-dist.py
|
|
186
|
+
- run: python scripts/python-tool.py ruff format --check --config python/pyproject.toml python scripts/python-tool.py scripts/check-python-dist.py
|
|
187
|
+
- run: python scripts/python-tool.py python -m pytest python/tests
|
|
188
|
+
- name: Test minimum NumPy and SciPy versions
|
|
189
|
+
if: matrix.python == '3.11'
|
|
190
|
+
run: |
|
|
191
|
+
uv pip install --python .devenv/python/bin/python numpy==1.26.4 scipy==1.12.0
|
|
192
|
+
python scripts/python-tool.py python -m pytest python/tests
|
|
193
|
+
|
|
194
|
+
python-package:
|
|
195
|
+
name: Python distributions
|
|
196
|
+
runs-on: ubuntu-latest
|
|
197
|
+
steps:
|
|
198
|
+
- uses: actions/checkout@v7
|
|
199
|
+
- uses: astral-sh/setup-uv@v7
|
|
200
|
+
with:
|
|
201
|
+
python-version: "3.11"
|
|
202
|
+
- uses: Swatinem/rust-cache@v2
|
|
203
|
+
with:
|
|
204
|
+
workspaces: python/rust
|
|
205
|
+
- run: uv sync --project python --locked --no-install-project
|
|
206
|
+
- run: python ../scripts/python-tool.py maturin build --release --locked --out dist
|
|
207
|
+
working-directory: python
|
|
208
|
+
- run: python ../scripts/python-tool.py maturin sdist --out dist
|
|
209
|
+
working-directory: python
|
|
210
|
+
- run: python scripts/python-tool.py python scripts/check-python-dist.py
|
|
211
|
+
|
|
212
|
+
release-config:
|
|
213
|
+
name: Release configuration
|
|
214
|
+
runs-on: ubuntu-latest
|
|
215
|
+
steps:
|
|
216
|
+
- uses: actions/checkout@v7
|
|
217
|
+
with:
|
|
218
|
+
fetch-depth: 0
|
|
219
|
+
- uses: actions/setup-node@v7
|
|
220
|
+
with:
|
|
221
|
+
node-version: "24"
|
|
222
|
+
- run: npx --yes versionary@1.6.1 verify
|
|
223
|
+
- run: npx --yes --package versionary@1.6.1 node scripts/check-releases.mjs
|
|
224
|
+
|
|
225
|
+
versionary:
|
|
226
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
227
|
+
needs:
|
|
228
|
+
[
|
|
229
|
+
fmt,
|
|
230
|
+
clippy,
|
|
231
|
+
docs,
|
|
232
|
+
test,
|
|
233
|
+
core-msrv,
|
|
234
|
+
core-wasm,
|
|
235
|
+
msrv,
|
|
236
|
+
zarrs-msrv,
|
|
237
|
+
python,
|
|
238
|
+
python-package,
|
|
239
|
+
release-config,
|
|
240
|
+
]
|
|
241
|
+
runs-on: ubuntu-latest
|
|
242
|
+
permissions:
|
|
243
|
+
contents: write
|
|
244
|
+
pull-requests: write
|
|
245
|
+
issues: write
|
|
246
|
+
steps:
|
|
247
|
+
- uses: actions/checkout@v7
|
|
248
|
+
with:
|
|
249
|
+
fetch-depth: 0
|
|
250
|
+
token: ${{ secrets.RELEASE_TOKEN || github.token }}
|
|
251
|
+
- uses: astral-sh/setup-uv@v7
|
|
252
|
+
with:
|
|
253
|
+
python-version: "3.11"
|
|
254
|
+
- uses: jolars/versionary@v1
|
|
255
|
+
with:
|
|
256
|
+
token: ${{ secrets.RELEASE_TOKEN }}
|
|
257
|
+
versionary-version: "1.6.1"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publish Crate
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- "v*"
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
CARGO_TERM_COLOR: always
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
publish:
|
|
18
|
+
name: crates.io
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
environment: release
|
|
21
|
+
permissions:
|
|
22
|
+
id-token: write
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v7
|
|
25
|
+
- uses: rust-lang/crates-io-auth-action@v1
|
|
26
|
+
id: auth
|
|
27
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
28
|
+
- run: cargo publish --locked
|
|
29
|
+
env:
|
|
30
|
+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
name: Publish Python
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["python-v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
wheels:
|
|
17
|
+
name: Wheel (${{ matrix.target }})
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
include:
|
|
23
|
+
- os: ubuntu-latest
|
|
24
|
+
target: x86_64-unknown-linux-gnu
|
|
25
|
+
manylinux: "2014"
|
|
26
|
+
- os: macos-latest
|
|
27
|
+
target: x86_64-apple-darwin
|
|
28
|
+
- os: macos-latest
|
|
29
|
+
target: aarch64-apple-darwin
|
|
30
|
+
- os: windows-latest
|
|
31
|
+
target: x86_64-pc-windows-msvc
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v7
|
|
34
|
+
- uses: PyO3/maturin-action@v1
|
|
35
|
+
with:
|
|
36
|
+
maturin-version: "1.15.0"
|
|
37
|
+
rust-toolchain: "1.89.0"
|
|
38
|
+
working-directory: python
|
|
39
|
+
target: ${{ matrix.target }}
|
|
40
|
+
manylinux: ${{ matrix.manylinux }}
|
|
41
|
+
args: --release --locked --out dist --strip
|
|
42
|
+
- uses: actions/upload-artifact@v7
|
|
43
|
+
with:
|
|
44
|
+
name: python-${{ matrix.target }}
|
|
45
|
+
path: python/dist/*.whl
|
|
46
|
+
if-no-files-found: error
|
|
47
|
+
|
|
48
|
+
sdist:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v7
|
|
52
|
+
- uses: PyO3/maturin-action@v1
|
|
53
|
+
with:
|
|
54
|
+
maturin-version: "1.15.0"
|
|
55
|
+
rust-toolchain: "1.89.0"
|
|
56
|
+
working-directory: python
|
|
57
|
+
command: sdist
|
|
58
|
+
args: --out dist
|
|
59
|
+
- uses: actions/upload-artifact@v7
|
|
60
|
+
with:
|
|
61
|
+
name: python-sdist
|
|
62
|
+
path: python/dist/*.tar.gz
|
|
63
|
+
if-no-files-found: error
|
|
64
|
+
|
|
65
|
+
test-wheel:
|
|
66
|
+
needs: wheels
|
|
67
|
+
strategy:
|
|
68
|
+
fail-fast: false
|
|
69
|
+
matrix:
|
|
70
|
+
include:
|
|
71
|
+
- os: ubuntu-latest
|
|
72
|
+
target: x86_64-unknown-linux-gnu
|
|
73
|
+
- os: macos-latest
|
|
74
|
+
target: aarch64-apple-darwin
|
|
75
|
+
- os: windows-latest
|
|
76
|
+
target: x86_64-pc-windows-msvc
|
|
77
|
+
runs-on: ${{ matrix.os }}
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v7
|
|
80
|
+
- uses: actions/download-artifact@v8
|
|
81
|
+
with:
|
|
82
|
+
name: python-${{ matrix.target }}
|
|
83
|
+
path: dist
|
|
84
|
+
- uses: actions/setup-python@v7
|
|
85
|
+
with:
|
|
86
|
+
python-version: "3.11"
|
|
87
|
+
- name: Install and test the built wheel
|
|
88
|
+
shell: bash
|
|
89
|
+
run: |
|
|
90
|
+
python -m pip install dist/*.whl pytest
|
|
91
|
+
python -m pytest python/tests
|
|
92
|
+
|
|
93
|
+
publish:
|
|
94
|
+
needs: [wheels, sdist, test-wheel]
|
|
95
|
+
if: startsWith(github.ref, 'refs/tags/python-v')
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
environment:
|
|
98
|
+
name: release
|
|
99
|
+
url: https://pypi.org/p/lazymatrix
|
|
100
|
+
permissions:
|
|
101
|
+
contents: read
|
|
102
|
+
id-token: write
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/checkout@v7
|
|
105
|
+
- uses: actions/download-artifact@v8
|
|
106
|
+
with:
|
|
107
|
+
pattern: python-*
|
|
108
|
+
path: dist
|
|
109
|
+
merge-multiple: true
|
|
110
|
+
- name: Check release tag matches package metadata
|
|
111
|
+
run: |
|
|
112
|
+
python -c 'import os, tomllib; from pathlib import Path; version = tomllib.loads(Path("python/pyproject.toml").read_text())["project"]["version"]; assert os.environ["GITHUB_REF_NAME"] == f"python-v{version}"'
|
|
113
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
name: Website
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "docs/**"
|
|
8
|
+
- "src/**"
|
|
9
|
+
- "python/**"
|
|
10
|
+
- "Cargo.toml"
|
|
11
|
+
- "Cargo.lock"
|
|
12
|
+
- "diplodocus.yaml"
|
|
13
|
+
- "README.md"
|
|
14
|
+
- "scripts/python-tool.py"
|
|
15
|
+
- "benches/normalization_allocations/eager_results.csv"
|
|
16
|
+
- "benches/normalization_tradeoffs/**"
|
|
17
|
+
- ".github/workflows/website.yml"
|
|
18
|
+
pull_request:
|
|
19
|
+
branches: [main]
|
|
20
|
+
paths:
|
|
21
|
+
- "docs/**"
|
|
22
|
+
- "src/**"
|
|
23
|
+
- "python/**"
|
|
24
|
+
- "Cargo.toml"
|
|
25
|
+
- "Cargo.lock"
|
|
26
|
+
- "diplodocus.yaml"
|
|
27
|
+
- "README.md"
|
|
28
|
+
- "scripts/python-tool.py"
|
|
29
|
+
- "benches/normalization_allocations/eager_results.csv"
|
|
30
|
+
- "benches/normalization_tradeoffs/**"
|
|
31
|
+
- ".github/workflows/website.yml"
|
|
32
|
+
workflow_dispatch:
|
|
33
|
+
|
|
34
|
+
permissions:
|
|
35
|
+
contents: read
|
|
36
|
+
|
|
37
|
+
concurrency:
|
|
38
|
+
group: website-${{ github.ref }}
|
|
39
|
+
cancel-in-progress: false
|
|
40
|
+
|
|
41
|
+
defaults:
|
|
42
|
+
run:
|
|
43
|
+
working-directory: docs
|
|
44
|
+
|
|
45
|
+
jobs:
|
|
46
|
+
build:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v7
|
|
50
|
+
- uses: astral-sh/setup-uv@v7
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.11"
|
|
53
|
+
- uses: Swatinem/rust-cache@v2
|
|
54
|
+
with:
|
|
55
|
+
workspaces: |
|
|
56
|
+
.
|
|
57
|
+
python/rust
|
|
58
|
+
- name: Prepare Python checkout
|
|
59
|
+
working-directory: .
|
|
60
|
+
env:
|
|
61
|
+
UV_PROJECT_ENVIRONMENT: ${{ github.workspace }}/.devenv/python
|
|
62
|
+
run: |
|
|
63
|
+
uv sync --project python --locked --no-install-project
|
|
64
|
+
cd python
|
|
65
|
+
python ../scripts/python-tool.py maturin develop --release --locked
|
|
66
|
+
- name: Prepare Rust documentation toolchain
|
|
67
|
+
working-directory: .
|
|
68
|
+
run: |
|
|
69
|
+
rustup toolchain install nightly-2026-09-28 --profile minimal --no-self-update
|
|
70
|
+
echo "DIPLODOCUS_RUST_TOOLCHAIN=$(rustup run nightly-2026-09-28 rustc --print sysroot)" >> "$GITHUB_ENV"
|
|
71
|
+
- uses: jolars/setup-diplodocus@v1
|
|
72
|
+
with:
|
|
73
|
+
version: "0.7.0"
|
|
74
|
+
- uses: pnpm/action-setup@v6
|
|
75
|
+
with:
|
|
76
|
+
package_json_file: docs/package.json
|
|
77
|
+
- uses: actions/setup-node@v7
|
|
78
|
+
with:
|
|
79
|
+
node-version: "24"
|
|
80
|
+
cache: pnpm
|
|
81
|
+
cache-dependency-path: docs/pnpm-lock.yaml
|
|
82
|
+
- run: pnpm install --frozen-lockfile
|
|
83
|
+
- run: pnpm format:check
|
|
84
|
+
- run: pnpm build
|
|
85
|
+
- run: pnpm test
|
|
86
|
+
- run: pnpm deploy:check
|
|
87
|
+
- uses: actions/upload-artifact@v7
|
|
88
|
+
with:
|
|
89
|
+
name: website
|
|
90
|
+
path: docs/.vitepress/dist
|
|
91
|
+
include-hidden-files: true
|
|
92
|
+
if-no-files-found: error
|
|
93
|
+
|
|
94
|
+
deploy:
|
|
95
|
+
needs: build
|
|
96
|
+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
environment:
|
|
99
|
+
name: cloudflare-workers
|
|
100
|
+
url: https://lazymatrix.org
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v7
|
|
103
|
+
- uses: pnpm/action-setup@v6
|
|
104
|
+
with:
|
|
105
|
+
package_json_file: docs/package.json
|
|
106
|
+
- uses: actions/setup-node@v7
|
|
107
|
+
with:
|
|
108
|
+
node-version: "24"
|
|
109
|
+
cache: pnpm
|
|
110
|
+
cache-dependency-path: docs/pnpm-lock.yaml
|
|
111
|
+
- run: pnpm install --frozen-lockfile
|
|
112
|
+
- uses: actions/download-artifact@v8
|
|
113
|
+
with:
|
|
114
|
+
name: website
|
|
115
|
+
path: docs/.vitepress/dist
|
|
116
|
+
- name: Deploy to Cloudflare Workers
|
|
117
|
+
run: pnpm run deploy
|
|
118
|
+
env:
|
|
119
|
+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
120
|
+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Devenv
|
|
2
|
+
docs/node_modules/
|
|
3
|
+
docs/.vitepress/cache/
|
|
4
|
+
docs/.vitepress/dist/
|
|
5
|
+
docs/.vitepress/theme/benchmark-results.json
|
|
6
|
+
docs/public/benchmarks/
|
|
7
|
+
docs/.wrangler/
|
|
8
|
+
docs/.env*
|
|
9
|
+
docs/.dev.vars*
|
|
10
|
+
|
|
11
|
+
.devenv*
|
|
12
|
+
devenv.local.nix
|
|
13
|
+
devenv.local.yaml
|
|
14
|
+
|
|
15
|
+
# direnv
|
|
16
|
+
.direnv
|
|
17
|
+
|
|
18
|
+
# pre-commit
|
|
19
|
+
.pre-commit-config.yaml
|
|
20
|
+
|
|
21
|
+
# rust -----------------------------------------------
|
|
22
|
+
|
|
23
|
+
# Generated by Cargo
|
|
24
|
+
# will have compiled files and executables
|
|
25
|
+
debug
|
|
26
|
+
target
|
|
27
|
+
|
|
28
|
+
# These are backup files generated by rustfmt
|
|
29
|
+
**/*.rs.bk
|
|
30
|
+
|
|
31
|
+
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
32
|
+
*.pdb
|
|
33
|
+
|
|
34
|
+
# Generated by cargo mutants Contains mutation testing data
|
|
35
|
+
**/mutants.out*/
|
|
36
|
+
|
|
37
|
+
# Python bindings and generated API references.
|
|
38
|
+
.venv/
|
|
39
|
+
__pycache__/
|
|
40
|
+
.pytest_cache/
|
|
41
|
+
.ruff_cache/
|
|
42
|
+
*.pyc
|
|
43
|
+
*.so
|
|
44
|
+
*.pyd
|
|
45
|
+
python/dist/
|
|
46
|
+
.diplodocus/
|
|
47
|
+
docs/reference/
|
|
48
|
+
docs/public/_diplodocus/
|
|
49
|
+
|
|
50
|
+
# RustRover
|
|
51
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
52
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
53
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
54
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
55
|
+
#.idea/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest-version": 1,
|
|
3
|
+
"baseline-sha": "5debc90faaa3829621fc017ffe8ec0be192dd5ea",
|
|
4
|
+
"release-targets": [
|
|
5
|
+
{
|
|
6
|
+
"path": ".",
|
|
7
|
+
"version": "0.8.1",
|
|
8
|
+
"tag": "v0.8.1"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"path": "python",
|
|
12
|
+
"version": "0.1.1",
|
|
13
|
+
"tag": "python-v0.1.1",
|
|
14
|
+
"dependencies": [
|
|
15
|
+
"."
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"pending-release-targets": [
|
|
20
|
+
{
|
|
21
|
+
"path": ".",
|
|
22
|
+
"version": "0.8.1",
|
|
23
|
+
"tag": "v0.8.1"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "python",
|
|
27
|
+
"version": "0.1.1",
|
|
28
|
+
"tag": "python-v0.1.1",
|
|
29
|
+
"dependencies": [
|
|
30
|
+
"."
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|