cartesian-tree 0.1.0__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.
@@ -0,0 +1 @@
1
+ * @Kn0g
@@ -0,0 +1,72 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "**"
7
+ pull_request:
8
+ branches:
9
+ - "main"
10
+ workflow_dispatch:
11
+ workflow_call:
12
+
13
+ env:
14
+ CARGO_TERM_COLOR: always
15
+
16
+ jobs:
17
+ test:
18
+ name: Test on Python ${{ matrix.python-version }} and Rust
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ python-version: ["3.11", "3.12"]
24
+
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+
28
+ - name: Install Rust toolchain
29
+ uses: dtolnay/rust-toolchain@stable
30
+
31
+ - name: Run Rust fmt
32
+ run: cargo fmt --check
33
+
34
+ - name: Run clippy
35
+ run: cargo clippy --all-features
36
+
37
+ - name: Run Rust tests
38
+ run: cargo test --verbose
39
+
40
+ - name: Setup Python
41
+ uses: actions/setup-python@v5
42
+ with:
43
+ python-version: ${{ matrix.python-version }}
44
+
45
+ - name: Create Python Virtual Environment
46
+ run: python -m venv .venv
47
+
48
+ - name: Activate Virtual Environment and Install Python dependencies
49
+ run: |
50
+ source .venv/bin/activate
51
+ pip install .[dev]
52
+
53
+ - name: Run ruff linting
54
+ run: |
55
+ source .venv/bin/activate
56
+ ruff format --check python
57
+ ruff check python
58
+
59
+ - name: Run mypy
60
+ run: |
61
+ source .venv/bin/activate
62
+ mypy python
63
+
64
+ - name: Build and install Python bindings
65
+ run: |
66
+ source .venv/bin/activate
67
+ maturin develop --release
68
+
69
+ - name: Run Python tests
70
+ run: |
71
+ source .venv/bin/activate
72
+ pytest python/tests
@@ -0,0 +1,40 @@
1
+ name: Publish
2
+
3
+ on:
4
+ workflow_call:
5
+ secrets:
6
+ CARGO_REGISTRY_TOKEN:
7
+ required: true
8
+ PYPI_TOKEN:
9
+ required: true
10
+
11
+ env:
12
+ CARGO_TERM_COLOR: always
13
+
14
+ jobs:
15
+ publish-rust:
16
+ name: Publish Rust Crate
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - name: Install Rust toolchain
21
+ uses: dtolnay/rust-toolchain@stable
22
+
23
+ - name: Publish to crates.io
24
+ run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
25
+
26
+ publish-python:
27
+ name: Publish Python Package
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - name: Setup Python
32
+ uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.x"
35
+
36
+ - name: Install maturin
37
+ run: pip install maturin
38
+
39
+ - name: Build and publish to PyPI
40
+ run: maturin publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,20 @@
1
+ name: Release Tag
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "**"
7
+
8
+ jobs:
9
+ ci:
10
+ name: Run CI Checks
11
+ uses: ./.github/workflows/ci.yaml
12
+
13
+ publish:
14
+ name: Publish Releases
15
+ needs: ci
16
+ if: success()
17
+ uses: ./.github/workflows/publish.yaml
18
+ secrets:
19
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
20
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,22 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug/
4
+ target/
5
+
6
+ # These are backup files generated by rustfmt
7
+ **/*.rs.bk
8
+
9
+ # MSVC Windows builds of rustc generate these, which store debugging information
10
+ *.pdb
11
+
12
+ # RustRover
13
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
14
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
15
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
16
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
17
+ #.idea/
18
+
19
+ # Python eco-system
20
+ venv
21
+ **/*/__pycache__
22
+ **/*/cartesian_tree.cpython-*.so
@@ -0,0 +1,336 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "CartesianTree"
7
+ version = "0.1.0"
8
+ dependencies = [
9
+ "nalgebra",
10
+ "pyo3",
11
+ "thiserror",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "approx"
16
+ version = "0.5.1"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
19
+ dependencies = [
20
+ "num-traits",
21
+ ]
22
+
23
+ [[package]]
24
+ name = "autocfg"
25
+ version = "1.4.0"
26
+ source = "registry+https://github.com/rust-lang/crates.io-index"
27
+ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
28
+
29
+ [[package]]
30
+ name = "bytemuck"
31
+ version = "1.23.0"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c"
34
+
35
+ [[package]]
36
+ name = "heck"
37
+ version = "0.5.0"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
40
+
41
+ [[package]]
42
+ name = "indoc"
43
+ version = "2.0.6"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
46
+
47
+ [[package]]
48
+ name = "libc"
49
+ version = "0.2.172"
50
+ source = "registry+https://github.com/rust-lang/crates.io-index"
51
+ checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
52
+
53
+ [[package]]
54
+ name = "matrixmultiply"
55
+ version = "0.3.10"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
58
+ dependencies = [
59
+ "autocfg",
60
+ "rawpointer",
61
+ ]
62
+
63
+ [[package]]
64
+ name = "memoffset"
65
+ version = "0.9.1"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
68
+ dependencies = [
69
+ "autocfg",
70
+ ]
71
+
72
+ [[package]]
73
+ name = "nalgebra"
74
+ version = "0.33.2"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b"
77
+ dependencies = [
78
+ "approx",
79
+ "matrixmultiply",
80
+ "nalgebra-macros",
81
+ "num-complex",
82
+ "num-rational",
83
+ "num-traits",
84
+ "simba",
85
+ "typenum",
86
+ ]
87
+
88
+ [[package]]
89
+ name = "nalgebra-macros"
90
+ version = "0.2.2"
91
+ source = "registry+https://github.com/rust-lang/crates.io-index"
92
+ checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc"
93
+ dependencies = [
94
+ "proc-macro2",
95
+ "quote",
96
+ "syn",
97
+ ]
98
+
99
+ [[package]]
100
+ name = "num-bigint"
101
+ version = "0.4.6"
102
+ source = "registry+https://github.com/rust-lang/crates.io-index"
103
+ checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
104
+ dependencies = [
105
+ "num-integer",
106
+ "num-traits",
107
+ ]
108
+
109
+ [[package]]
110
+ name = "num-complex"
111
+ version = "0.4.6"
112
+ source = "registry+https://github.com/rust-lang/crates.io-index"
113
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
114
+ dependencies = [
115
+ "num-traits",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "num-integer"
120
+ version = "0.1.46"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
123
+ dependencies = [
124
+ "num-traits",
125
+ ]
126
+
127
+ [[package]]
128
+ name = "num-rational"
129
+ version = "0.4.2"
130
+ source = "registry+https://github.com/rust-lang/crates.io-index"
131
+ checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
132
+ dependencies = [
133
+ "num-bigint",
134
+ "num-integer",
135
+ "num-traits",
136
+ ]
137
+
138
+ [[package]]
139
+ name = "num-traits"
140
+ version = "0.2.19"
141
+ source = "registry+https://github.com/rust-lang/crates.io-index"
142
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
143
+ dependencies = [
144
+ "autocfg",
145
+ ]
146
+
147
+ [[package]]
148
+ name = "once_cell"
149
+ version = "1.21.3"
150
+ source = "registry+https://github.com/rust-lang/crates.io-index"
151
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
152
+
153
+ [[package]]
154
+ name = "paste"
155
+ version = "1.0.15"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
158
+
159
+ [[package]]
160
+ name = "portable-atomic"
161
+ version = "1.11.0"
162
+ source = "registry+https://github.com/rust-lang/crates.io-index"
163
+ checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
164
+
165
+ [[package]]
166
+ name = "proc-macro2"
167
+ version = "1.0.95"
168
+ source = "registry+https://github.com/rust-lang/crates.io-index"
169
+ checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
170
+ dependencies = [
171
+ "unicode-ident",
172
+ ]
173
+
174
+ [[package]]
175
+ name = "pyo3"
176
+ version = "0.25.0"
177
+ source = "registry+https://github.com/rust-lang/crates.io-index"
178
+ checksum = "f239d656363bcee73afef85277f1b281e8ac6212a1d42aa90e55b90ed43c47a4"
179
+ dependencies = [
180
+ "indoc",
181
+ "libc",
182
+ "memoffset",
183
+ "once_cell",
184
+ "portable-atomic",
185
+ "pyo3-build-config",
186
+ "pyo3-ffi",
187
+ "pyo3-macros",
188
+ "unindent",
189
+ ]
190
+
191
+ [[package]]
192
+ name = "pyo3-build-config"
193
+ version = "0.25.0"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "755ea671a1c34044fa165247aaf6f419ca39caa6003aee791a0df2713d8f1b6d"
196
+ dependencies = [
197
+ "once_cell",
198
+ "target-lexicon",
199
+ ]
200
+
201
+ [[package]]
202
+ name = "pyo3-ffi"
203
+ version = "0.25.0"
204
+ source = "registry+https://github.com/rust-lang/crates.io-index"
205
+ checksum = "fc95a2e67091e44791d4ea300ff744be5293f394f1bafd9f78c080814d35956e"
206
+ dependencies = [
207
+ "libc",
208
+ "pyo3-build-config",
209
+ ]
210
+
211
+ [[package]]
212
+ name = "pyo3-macros"
213
+ version = "0.25.0"
214
+ source = "registry+https://github.com/rust-lang/crates.io-index"
215
+ checksum = "a179641d1b93920829a62f15e87c0ed791b6c8db2271ba0fd7c2686090510214"
216
+ dependencies = [
217
+ "proc-macro2",
218
+ "pyo3-macros-backend",
219
+ "quote",
220
+ "syn",
221
+ ]
222
+
223
+ [[package]]
224
+ name = "pyo3-macros-backend"
225
+ version = "0.25.0"
226
+ source = "registry+https://github.com/rust-lang/crates.io-index"
227
+ checksum = "9dff85ebcaab8c441b0e3f7ae40a6963ecea8a9f5e74f647e33fcf5ec9a1e89e"
228
+ dependencies = [
229
+ "heck",
230
+ "proc-macro2",
231
+ "pyo3-build-config",
232
+ "quote",
233
+ "syn",
234
+ ]
235
+
236
+ [[package]]
237
+ name = "quote"
238
+ version = "1.0.40"
239
+ source = "registry+https://github.com/rust-lang/crates.io-index"
240
+ checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
241
+ dependencies = [
242
+ "proc-macro2",
243
+ ]
244
+
245
+ [[package]]
246
+ name = "rawpointer"
247
+ version = "0.2.1"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
250
+
251
+ [[package]]
252
+ name = "safe_arch"
253
+ version = "0.7.4"
254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
255
+ checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323"
256
+ dependencies = [
257
+ "bytemuck",
258
+ ]
259
+
260
+ [[package]]
261
+ name = "simba"
262
+ version = "0.9.0"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "b3a386a501cd104797982c15ae17aafe8b9261315b5d07e3ec803f2ea26be0fa"
265
+ dependencies = [
266
+ "approx",
267
+ "num-complex",
268
+ "num-traits",
269
+ "paste",
270
+ "wide",
271
+ ]
272
+
273
+ [[package]]
274
+ name = "syn"
275
+ version = "2.0.101"
276
+ source = "registry+https://github.com/rust-lang/crates.io-index"
277
+ checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
278
+ dependencies = [
279
+ "proc-macro2",
280
+ "quote",
281
+ "unicode-ident",
282
+ ]
283
+
284
+ [[package]]
285
+ name = "target-lexicon"
286
+ version = "0.13.2"
287
+ source = "registry+https://github.com/rust-lang/crates.io-index"
288
+ checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
289
+
290
+ [[package]]
291
+ name = "thiserror"
292
+ version = "2.0.12"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
295
+ dependencies = [
296
+ "thiserror-impl",
297
+ ]
298
+
299
+ [[package]]
300
+ name = "thiserror-impl"
301
+ version = "2.0.12"
302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
303
+ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
304
+ dependencies = [
305
+ "proc-macro2",
306
+ "quote",
307
+ "syn",
308
+ ]
309
+
310
+ [[package]]
311
+ name = "typenum"
312
+ version = "1.18.0"
313
+ source = "registry+https://github.com/rust-lang/crates.io-index"
314
+ checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
315
+
316
+ [[package]]
317
+ name = "unicode-ident"
318
+ version = "1.0.18"
319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
320
+ checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
321
+
322
+ [[package]]
323
+ name = "unindent"
324
+ version = "0.2.4"
325
+ source = "registry+https://github.com/rust-lang/crates.io-index"
326
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
327
+
328
+ [[package]]
329
+ name = "wide"
330
+ version = "0.7.32"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "41b5576b9a81633f3e8df296ce0063042a73507636cbe956c61133dd7034ab22"
333
+ dependencies = [
334
+ "bytemuck",
335
+ "safe_arch",
336
+ ]
@@ -0,0 +1,25 @@
1
+ [package]
2
+ authors = ["Kn0g"]
3
+ name = "CartesianTree"
4
+ version = "0.1.0"
5
+ edition = "2024"
6
+ description = "Build hierarchical Cartesian coordinate systems to easily transform poses."
7
+ homepage = "https://github.com/Kn0g/cartesian-tree"
8
+ readme = "README.md"
9
+ repository = "https://github.com/Kn0g/cartesian-tree"
10
+ license = "MIT"
11
+ keywords = ["Cartesian", "coordinate systems", "transform", "poses"]
12
+ categories = ["coordinate transformation"]
13
+
14
+ [dependencies]
15
+ nalgebra = "0.33.2"
16
+ pyo3 = { version = "0.25.0", features = ["extension-module"] , optional = true}
17
+ thiserror = "2.0.12"
18
+
19
+ [features]
20
+ bindings = ["dep:pyo3"]
21
+
22
+ [lib]
23
+ name = "cartesian_tree"
24
+ crate-type = ["cdylib", "rlib"]
25
+
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.4
2
+ Name: cartesian-tree
3
+ Version: 0.1.0
4
+ Classifier: Programming Language :: Python
5
+ Requires-Dist: cartesian-tree[lint] ; extra == 'dev'
6
+ Requires-Dist: cartesian-tree[test] ; extra == 'dev'
7
+ Requires-Dist: cartesian-tree[build] ; extra == 'dev'
8
+ Requires-Dist: ruff==0.12.4 ; extra == 'lint'
9
+ Requires-Dist: mypy==1.17.0 ; extra == 'lint'
10
+ Requires-Dist: pytest==8.4.1 ; extra == 'test'
11
+ Requires-Dist: maturin==1.8.6 ; extra == 'build'
12
+ Provides-Extra: dev
13
+ Provides-Extra: lint
14
+ Provides-Extra: test
15
+ Provides-Extra: build
16
+ Summary: Build hierarchical Cartesian coordinate systems to easily transform poses.
17
+ Keywords: Cartesian,coordinate systems,transform,poses
18
+ Home-Page: https://github.com/Kn0g/cartesian-tree
19
+ Author: Kn0g
20
+ Maintainer: Kn0g
21
+ License-Expression: MIT
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
+
25
+ # cartesian-tree
26
+
27
+ A simple project for me to learn Rust and the binding process.
28
+
29
+ Useful for converting Cartesian poses from one coordinate system into another.
@@ -0,0 +1,5 @@
1
+ # cartesian-tree
2
+
3
+ A simple project for me to learn Rust and the binding process.
4
+
5
+ Useful for converting Cartesian poses from one coordinate system into another.