pkpdutils-core 0.2.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.
- pkpdutils_core-0.2.0/Cargo.lock +526 -0
- pkpdutils_core-0.2.0/Cargo.toml +38 -0
- pkpdutils_core-0.2.0/LICENSE +7 -0
- pkpdutils_core-0.2.0/PKG-INFO +63 -0
- pkpdutils_core-0.2.0/README.md +37 -0
- pkpdutils_core-0.2.0/crates/abi/Cargo.toml +23 -0
- pkpdutils_core-0.2.0/crates/abi/README.md +173 -0
- pkpdutils_core-0.2.0/crates/abi/src/batch.rs +1060 -0
- pkpdutils_core-0.2.0/crates/abi/src/enums.rs +295 -0
- pkpdutils_core-0.2.0/crates/abi/src/lib.rs +77 -0
- pkpdutils_core-0.2.0/crates/abi/src/nonfinite.rs +234 -0
- pkpdutils_core-0.2.0/crates/abi/src/options.rs +911 -0
- pkpdutils_core-0.2.0/crates/abi/src/result.rs +595 -0
- pkpdutils_core-0.2.0/crates/abi/src/window.rs +204 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/enum_values.json +79 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/options_all_fields.json +1 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/options_default.json +1 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/options_effect.json +1 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/options_full.json +1 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/options_manual_points.json +1 -0
- pkpdutils_core-0.2.0/crates/abi/tests/data/options_windows.json +1 -0
- pkpdutils_core-0.2.0/crates/abi/tests/options_from_python.rs +451 -0
- pkpdutils_core-0.2.0/crates/core/Cargo.toml +30 -0
- pkpdutils_core-0.2.0/crates/core/README.md +173 -0
- pkpdutils_core-0.2.0/crates/core/examples/kernel_timing.rs +322 -0
- pkpdutils_core-0.2.0/crates/core/src/assemble.rs +966 -0
- pkpdutils_core-0.2.0/crates/core/src/auc.rs +225 -0
- pkpdutils_core-0.2.0/crates/core/src/blq.rs +486 -0
- pkpdutils_core-0.2.0/crates/core/src/dose.rs +704 -0
- pkpdutils_core-0.2.0/crates/core/src/lib.rs +534 -0
- pkpdutils_core-0.2.0/crates/core/src/pack.rs +139 -0
- pkpdutils_core-0.2.0/crates/core/src/parameters.rs +2224 -0
- pkpdutils_core-0.2.0/crates/core/src/shard.rs +522 -0
- pkpdutils_core-0.2.0/crates/core/src/terminal.rs +1166 -0
- pkpdutils_core-0.2.0/crates/python/Cargo.toml +63 -0
- pkpdutils_core-0.2.0/crates/python/LICENSE +7 -0
- pkpdutils_core-0.2.0/crates/python/README.md +37 -0
- pkpdutils_core-0.2.0/crates/python/src/convert.rs +582 -0
- pkpdutils_core-0.2.0/crates/python/src/lib.rs +733 -0
- pkpdutils_core-0.2.0/crates/python/src/options.rs +1277 -0
- pkpdutils_core-0.2.0/crates/python/src/result.rs +312 -0
- pkpdutils_core-0.2.0/crates/python/tests/test_bindings.py +382 -0
- pkpdutils_core-0.2.0/crates/units/Cargo.toml +22 -0
- pkpdutils_core-0.2.0/crates/units/README.md +173 -0
- pkpdutils_core-0.2.0/crates/units/src/format.rs +95 -0
- pkpdutils_core-0.2.0/crates/units/src/lib.rs +434 -0
- pkpdutils_core-0.2.0/crates/units/src/parameter.rs +334 -0
- pkpdutils_core-0.2.0/crates/units/src/registry.rs +837 -0
- pkpdutils_core-0.2.0/crates/units/tests/data/pint_gate.json +56291 -0
- pkpdutils_core-0.2.0/crates/units/tests/pint_gate.rs +267 -0
- pkpdutils_core-0.2.0/pyproject.toml +70 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bitflags"
|
|
13
|
+
version = "2.13.2"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "block-buffer"
|
|
19
|
+
version = "0.12.1"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
|
|
22
|
+
dependencies = [
|
|
23
|
+
"hybrid-array",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "cc"
|
|
28
|
+
version = "1.11.2"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45"
|
|
31
|
+
dependencies = [
|
|
32
|
+
"find-msvc-tools",
|
|
33
|
+
"shlex",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "cfg-if"
|
|
38
|
+
version = "1.0.5"
|
|
39
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
40
|
+
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
|
41
|
+
|
|
42
|
+
[[package]]
|
|
43
|
+
name = "const-oid"
|
|
44
|
+
version = "0.10.3"
|
|
45
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
46
|
+
checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a"
|
|
47
|
+
|
|
48
|
+
[[package]]
|
|
49
|
+
name = "cpufeatures"
|
|
50
|
+
version = "0.3.1"
|
|
51
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
|
+
checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
|
|
53
|
+
dependencies = [
|
|
54
|
+
"libc",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "crossbeam-deque"
|
|
59
|
+
version = "0.8.8"
|
|
60
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
61
|
+
checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"
|
|
62
|
+
dependencies = [
|
|
63
|
+
"crossbeam-epoch",
|
|
64
|
+
"crossbeam-utils",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[[package]]
|
|
68
|
+
name = "crossbeam-epoch"
|
|
69
|
+
version = "0.9.21"
|
|
70
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
71
|
+
checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"
|
|
72
|
+
dependencies = [
|
|
73
|
+
"crossbeam-utils",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "crossbeam-utils"
|
|
78
|
+
version = "0.8.23"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"
|
|
81
|
+
|
|
82
|
+
[[package]]
|
|
83
|
+
name = "crypto-common"
|
|
84
|
+
version = "0.2.2"
|
|
85
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
86
|
+
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
|
|
87
|
+
dependencies = [
|
|
88
|
+
"hybrid-array",
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
[[package]]
|
|
92
|
+
name = "digest"
|
|
93
|
+
version = "0.11.3"
|
|
94
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
+
checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
|
|
96
|
+
dependencies = [
|
|
97
|
+
"block-buffer",
|
|
98
|
+
"const-oid",
|
|
99
|
+
"crypto-common",
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
[[package]]
|
|
103
|
+
name = "either"
|
|
104
|
+
version = "1.19.0"
|
|
105
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
106
|
+
checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
|
|
107
|
+
|
|
108
|
+
[[package]]
|
|
109
|
+
name = "find-msvc-tools"
|
|
110
|
+
version = "0.1.15"
|
|
111
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
+
checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"
|
|
113
|
+
|
|
114
|
+
[[package]]
|
|
115
|
+
name = "heck"
|
|
116
|
+
version = "0.5.0"
|
|
117
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
119
|
+
|
|
120
|
+
[[package]]
|
|
121
|
+
name = "hybrid-array"
|
|
122
|
+
version = "0.4.15"
|
|
123
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
+
checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
|
|
125
|
+
dependencies = [
|
|
126
|
+
"typenum",
|
|
127
|
+
]
|
|
128
|
+
|
|
129
|
+
[[package]]
|
|
130
|
+
name = "itoa"
|
|
131
|
+
version = "1.0.19"
|
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
+
checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
|
|
134
|
+
|
|
135
|
+
[[package]]
|
|
136
|
+
name = "libc"
|
|
137
|
+
version = "0.2.191"
|
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
+
checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "libmimalloc-sys"
|
|
143
|
+
version = "0.1.49"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
|
146
|
+
dependencies = [
|
|
147
|
+
"cc",
|
|
148
|
+
]
|
|
149
|
+
|
|
150
|
+
[[package]]
|
|
151
|
+
name = "matrixmultiply"
|
|
152
|
+
version = "0.3.11"
|
|
153
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
154
|
+
checksum = "3f607c237553f086e7043417a51df26b2eb899d3caff94e6a67592ff992fedc7"
|
|
155
|
+
dependencies = [
|
|
156
|
+
"autocfg",
|
|
157
|
+
"rawpointer",
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
[[package]]
|
|
161
|
+
name = "memchr"
|
|
162
|
+
version = "2.8.3"
|
|
163
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
+
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
165
|
+
|
|
166
|
+
[[package]]
|
|
167
|
+
name = "mimalloc"
|
|
168
|
+
version = "0.1.52"
|
|
169
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
170
|
+
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
|
|
171
|
+
dependencies = [
|
|
172
|
+
"libmimalloc-sys",
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
[[package]]
|
|
176
|
+
name = "ndarray"
|
|
177
|
+
version = "0.17.2"
|
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
+
checksum = "520080814a7a6b4a6e9070823bb24b4531daac8c4627e08ba5de8c5ef2f2752d"
|
|
180
|
+
dependencies = [
|
|
181
|
+
"matrixmultiply",
|
|
182
|
+
"num-complex",
|
|
183
|
+
"num-integer",
|
|
184
|
+
"num-traits",
|
|
185
|
+
"portable-atomic",
|
|
186
|
+
"portable-atomic-util",
|
|
187
|
+
"rawpointer",
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
[[package]]
|
|
191
|
+
name = "num-complex"
|
|
192
|
+
version = "0.4.6"
|
|
193
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
|
195
|
+
dependencies = [
|
|
196
|
+
"num-traits",
|
|
197
|
+
]
|
|
198
|
+
|
|
199
|
+
[[package]]
|
|
200
|
+
name = "num-integer"
|
|
201
|
+
version = "0.1.47"
|
|
202
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
203
|
+
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
|
204
|
+
dependencies = [
|
|
205
|
+
"num-traits",
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
[[package]]
|
|
209
|
+
name = "num-traits"
|
|
210
|
+
version = "0.2.19"
|
|
211
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
213
|
+
dependencies = [
|
|
214
|
+
"autocfg",
|
|
215
|
+
]
|
|
216
|
+
|
|
217
|
+
[[package]]
|
|
218
|
+
name = "numpy"
|
|
219
|
+
version = "0.30.0"
|
|
220
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
221
|
+
checksum = "aa0b9111761885449e894981fa8051dcf69e0bd114aecbd4bcdd830b6be4ed92"
|
|
222
|
+
dependencies = [
|
|
223
|
+
"libc",
|
|
224
|
+
"ndarray",
|
|
225
|
+
"num-complex",
|
|
226
|
+
"num-integer",
|
|
227
|
+
"num-traits",
|
|
228
|
+
"pyo3",
|
|
229
|
+
"pyo3-build-config",
|
|
230
|
+
"rustc-hash",
|
|
231
|
+
]
|
|
232
|
+
|
|
233
|
+
[[package]]
|
|
234
|
+
name = "once_cell"
|
|
235
|
+
version = "1.21.4"
|
|
236
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
238
|
+
|
|
239
|
+
[[package]]
|
|
240
|
+
name = "pkpdutils-abi"
|
|
241
|
+
version = "0.2.0"
|
|
242
|
+
dependencies = [
|
|
243
|
+
"bitflags",
|
|
244
|
+
"serde",
|
|
245
|
+
"serde_json",
|
|
246
|
+
"thiserror",
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
[[package]]
|
|
250
|
+
name = "pkpdutils-core"
|
|
251
|
+
version = "0.2.0"
|
|
252
|
+
dependencies = [
|
|
253
|
+
"pkpdutils-abi",
|
|
254
|
+
"pkpdutils-units",
|
|
255
|
+
"rayon",
|
|
256
|
+
"thiserror",
|
|
257
|
+
]
|
|
258
|
+
|
|
259
|
+
[[package]]
|
|
260
|
+
name = "pkpdutils-oracles"
|
|
261
|
+
version = "0.2.0"
|
|
262
|
+
dependencies = [
|
|
263
|
+
"pkpdutils-abi",
|
|
264
|
+
"pkpdutils-core",
|
|
265
|
+
"pkpdutils-units",
|
|
266
|
+
"serde",
|
|
267
|
+
"serde_json",
|
|
268
|
+
"sha2",
|
|
269
|
+
]
|
|
270
|
+
|
|
271
|
+
[[package]]
|
|
272
|
+
name = "pkpdutils-python"
|
|
273
|
+
version = "0.2.0"
|
|
274
|
+
dependencies = [
|
|
275
|
+
"mimalloc",
|
|
276
|
+
"numpy",
|
|
277
|
+
"pkpdutils-abi",
|
|
278
|
+
"pkpdutils-core",
|
|
279
|
+
"pyo3",
|
|
280
|
+
]
|
|
281
|
+
|
|
282
|
+
[[package]]
|
|
283
|
+
name = "pkpdutils-units"
|
|
284
|
+
version = "0.2.0"
|
|
285
|
+
dependencies = [
|
|
286
|
+
"serde",
|
|
287
|
+
"serde_json",
|
|
288
|
+
"thiserror",
|
|
289
|
+
]
|
|
290
|
+
|
|
291
|
+
[[package]]
|
|
292
|
+
name = "portable-atomic"
|
|
293
|
+
version = "1.15.0"
|
|
294
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
295
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
296
|
+
|
|
297
|
+
[[package]]
|
|
298
|
+
name = "portable-atomic-util"
|
|
299
|
+
version = "0.2.8"
|
|
300
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
301
|
+
checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
|
|
302
|
+
dependencies = [
|
|
303
|
+
"portable-atomic",
|
|
304
|
+
]
|
|
305
|
+
|
|
306
|
+
[[package]]
|
|
307
|
+
name = "proc-macro2"
|
|
308
|
+
version = "1.0.107"
|
|
309
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
310
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
311
|
+
dependencies = [
|
|
312
|
+
"unicode-ident",
|
|
313
|
+
]
|
|
314
|
+
|
|
315
|
+
[[package]]
|
|
316
|
+
name = "pyo3"
|
|
317
|
+
version = "0.30.1"
|
|
318
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
+
checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
|
|
320
|
+
dependencies = [
|
|
321
|
+
"libc",
|
|
322
|
+
"once_cell",
|
|
323
|
+
"portable-atomic",
|
|
324
|
+
"pyo3-build-config",
|
|
325
|
+
"pyo3-ffi",
|
|
326
|
+
"pyo3-macros",
|
|
327
|
+
]
|
|
328
|
+
|
|
329
|
+
[[package]]
|
|
330
|
+
name = "pyo3-build-config"
|
|
331
|
+
version = "0.30.1"
|
|
332
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
333
|
+
checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
|
|
334
|
+
dependencies = [
|
|
335
|
+
"target-lexicon",
|
|
336
|
+
]
|
|
337
|
+
|
|
338
|
+
[[package]]
|
|
339
|
+
name = "pyo3-ffi"
|
|
340
|
+
version = "0.30.1"
|
|
341
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
342
|
+
checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
|
|
343
|
+
dependencies = [
|
|
344
|
+
"libc",
|
|
345
|
+
"pyo3-build-config",
|
|
346
|
+
]
|
|
347
|
+
|
|
348
|
+
[[package]]
|
|
349
|
+
name = "pyo3-macros"
|
|
350
|
+
version = "0.30.1"
|
|
351
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
352
|
+
checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
|
|
353
|
+
dependencies = [
|
|
354
|
+
"proc-macro2",
|
|
355
|
+
"pyo3-macros-backend",
|
|
356
|
+
"quote",
|
|
357
|
+
"syn",
|
|
358
|
+
]
|
|
359
|
+
|
|
360
|
+
[[package]]
|
|
361
|
+
name = "pyo3-macros-backend"
|
|
362
|
+
version = "0.30.1"
|
|
363
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
364
|
+
checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
|
|
365
|
+
dependencies = [
|
|
366
|
+
"heck",
|
|
367
|
+
"proc-macro2",
|
|
368
|
+
"quote",
|
|
369
|
+
"syn",
|
|
370
|
+
]
|
|
371
|
+
|
|
372
|
+
[[package]]
|
|
373
|
+
name = "quote"
|
|
374
|
+
version = "1.0.47"
|
|
375
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
376
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
377
|
+
dependencies = [
|
|
378
|
+
"proc-macro2",
|
|
379
|
+
]
|
|
380
|
+
|
|
381
|
+
[[package]]
|
|
382
|
+
name = "rawpointer"
|
|
383
|
+
version = "0.2.1"
|
|
384
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
385
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
|
386
|
+
|
|
387
|
+
[[package]]
|
|
388
|
+
name = "rayon"
|
|
389
|
+
version = "1.12.0"
|
|
390
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
391
|
+
checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
|
|
392
|
+
dependencies = [
|
|
393
|
+
"either",
|
|
394
|
+
"rayon-core",
|
|
395
|
+
]
|
|
396
|
+
|
|
397
|
+
[[package]]
|
|
398
|
+
name = "rayon-core"
|
|
399
|
+
version = "1.13.0"
|
|
400
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
401
|
+
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
|
|
402
|
+
dependencies = [
|
|
403
|
+
"crossbeam-deque",
|
|
404
|
+
"crossbeam-utils",
|
|
405
|
+
]
|
|
406
|
+
|
|
407
|
+
[[package]]
|
|
408
|
+
name = "rustc-hash"
|
|
409
|
+
version = "2.1.3"
|
|
410
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
411
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
412
|
+
|
|
413
|
+
[[package]]
|
|
414
|
+
name = "serde"
|
|
415
|
+
version = "1.0.229"
|
|
416
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
417
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
418
|
+
dependencies = [
|
|
419
|
+
"serde_core",
|
|
420
|
+
"serde_derive",
|
|
421
|
+
]
|
|
422
|
+
|
|
423
|
+
[[package]]
|
|
424
|
+
name = "serde_core"
|
|
425
|
+
version = "1.0.229"
|
|
426
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
427
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
428
|
+
dependencies = [
|
|
429
|
+
"serde_derive",
|
|
430
|
+
]
|
|
431
|
+
|
|
432
|
+
[[package]]
|
|
433
|
+
name = "serde_derive"
|
|
434
|
+
version = "1.0.229"
|
|
435
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
436
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
437
|
+
dependencies = [
|
|
438
|
+
"proc-macro2",
|
|
439
|
+
"quote",
|
|
440
|
+
"syn",
|
|
441
|
+
]
|
|
442
|
+
|
|
443
|
+
[[package]]
|
|
444
|
+
name = "serde_json"
|
|
445
|
+
version = "1.0.154"
|
|
446
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
447
|
+
checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
|
|
448
|
+
dependencies = [
|
|
449
|
+
"itoa",
|
|
450
|
+
"memchr",
|
|
451
|
+
"serde",
|
|
452
|
+
"serde_core",
|
|
453
|
+
"zmij",
|
|
454
|
+
]
|
|
455
|
+
|
|
456
|
+
[[package]]
|
|
457
|
+
name = "sha2"
|
|
458
|
+
version = "0.11.1"
|
|
459
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
460
|
+
checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
|
|
461
|
+
dependencies = [
|
|
462
|
+
"cfg-if",
|
|
463
|
+
"cpufeatures",
|
|
464
|
+
"digest",
|
|
465
|
+
]
|
|
466
|
+
|
|
467
|
+
[[package]]
|
|
468
|
+
name = "shlex"
|
|
469
|
+
version = "2.0.1"
|
|
470
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
471
|
+
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
472
|
+
|
|
473
|
+
[[package]]
|
|
474
|
+
name = "syn"
|
|
475
|
+
version = "3.0.10"
|
|
476
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
477
|
+
checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
|
|
478
|
+
dependencies = [
|
|
479
|
+
"proc-macro2",
|
|
480
|
+
"quote",
|
|
481
|
+
"unicode-ident",
|
|
482
|
+
]
|
|
483
|
+
|
|
484
|
+
[[package]]
|
|
485
|
+
name = "target-lexicon"
|
|
486
|
+
version = "0.13.6"
|
|
487
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
488
|
+
checksum = "8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da"
|
|
489
|
+
|
|
490
|
+
[[package]]
|
|
491
|
+
name = "thiserror"
|
|
492
|
+
version = "2.0.21"
|
|
493
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
494
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
495
|
+
dependencies = [
|
|
496
|
+
"thiserror-impl",
|
|
497
|
+
]
|
|
498
|
+
|
|
499
|
+
[[package]]
|
|
500
|
+
name = "thiserror-impl"
|
|
501
|
+
version = "2.0.21"
|
|
502
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
503
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
504
|
+
dependencies = [
|
|
505
|
+
"proc-macro2",
|
|
506
|
+
"quote",
|
|
507
|
+
"syn",
|
|
508
|
+
]
|
|
509
|
+
|
|
510
|
+
[[package]]
|
|
511
|
+
name = "typenum"
|
|
512
|
+
version = "1.20.1"
|
|
513
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
514
|
+
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
515
|
+
|
|
516
|
+
[[package]]
|
|
517
|
+
name = "unicode-ident"
|
|
518
|
+
version = "1.0.27"
|
|
519
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
520
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
521
|
+
|
|
522
|
+
[[package]]
|
|
523
|
+
name = "zmij"
|
|
524
|
+
version = "1.0.23"
|
|
525
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
526
|
+
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
resolver = "2"
|
|
3
|
+
members = ["crates/abi", "crates/core", "crates/python", "crates/units"]
|
|
4
|
+
# the throwaway package of the first spike sits at the repository root and is not a member
|
|
5
|
+
exclude = ["spike"]
|
|
6
|
+
|
|
7
|
+
[workspace.package]
|
|
8
|
+
version = "0.2.0"
|
|
9
|
+
edition = "2024"
|
|
10
|
+
rust-version = "1.100"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = ["Matthias König"]
|
|
13
|
+
repository = "https://github.com/matthiaskoenig/pkpdutils-core"
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
keywords = ["pharmacokinetics", "nca", "pkpd", "units", "wasm"]
|
|
16
|
+
categories = ["science", "wasm"]
|
|
17
|
+
|
|
18
|
+
# every public item carries a doc comment, as a gate rather than a convention
|
|
19
|
+
[workspace.lints.rust]
|
|
20
|
+
missing_docs = "warn"
|
|
21
|
+
|
|
22
|
+
[workspace.dependencies]
|
|
23
|
+
thiserror = "2"
|
|
24
|
+
serde = { version = "1", features = ["derive"] }
|
|
25
|
+
serde_json = { version = "1", features = ["float_roundtrip"] }
|
|
26
|
+
bitflags = "2"
|
|
27
|
+
sha2 = "0.11"
|
|
28
|
+
# the row shards of the kernel, behind the `parallel` feature of `pkpdutils-core`, which is off
|
|
29
|
+
# by default: it compiles for both wasm targets but has no thread to run a shard on there
|
|
30
|
+
rayon = "1.12"
|
|
31
|
+
# the python binding, `pkpdutils-python` and nothing else in the workspace. `abi3-py313` builds
|
|
32
|
+
# against the stable ABI from python 3.13 on, the floor of `pkpdutils`, so one wheel per platform
|
|
33
|
+
# serves every python it supports. `extension-module` is deliberately not here: a crate which
|
|
34
|
+
# takes `pyo3 = { workspace = true }` would inherit it, and a build with that feature does not
|
|
35
|
+
# link libpython, so every test binary of such a crate would fail to link. It is an optional
|
|
36
|
+
# feature of `pkpdutils-python`, which a wheel build asks for and `cargo test` does not.
|
|
37
|
+
pyo3 = { version = "0.30.1", features = ["abi3-py313"] }
|
|
38
|
+
numpy = "0.30.0"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2026 Matthias König
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pkpdutils-core
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Classifier: Development Status :: 4 - Beta
|
|
5
|
+
Classifier: Intended Audience :: Science/Research
|
|
6
|
+
Classifier: Operating System :: OS Independent
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Programming Language :: Rust
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
14
|
+
Requires-Dist: numpy>=2.2.2
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Summary: The compiled non-compartmental analysis kernel of pkpdutils
|
|
17
|
+
Keywords: pharmacokinetics,pharmacodynamics,non-compartmental analysis
|
|
18
|
+
Author-email: Matthias König <konigmatt@googlemail.com>
|
|
19
|
+
Maintainer-email: Matthias König <konigmatt@googlemail.com>
|
|
20
|
+
License-Expression: MIT
|
|
21
|
+
Requires-Python: >=3.13
|
|
22
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
23
|
+
Project-URL: Issues, https://github.com/matthiaskoenig/pkpdutils-core/issues
|
|
24
|
+
Project-URL: Repository, https://github.com/matthiaskoenig/pkpdutils-core
|
|
25
|
+
|
|
26
|
+
# pkpdutils-core
|
|
27
|
+
|
|
28
|
+
The compiled non-compartmental analysis kernel of [pkpdutils](https://github.com/matthiaskoenig/pkpdutils), as a python extension module.
|
|
29
|
+
|
|
30
|
+
This distribution is not a library to program against. It is the compiled engine of [`pkpdutils`](https://pypi.org/project/pkpdutils/), which will take it as a dependency and send it the batches this build can analyse; install `pkpdutils` rather than this package. Its two functions take and return the shapes `pkpdutils` already holds in memory. The source is in [pkpdutils-core](https://github.com/matthiaskoenig/pkpdutils-core), a rust workspace, and the numbers it computes are held to Phoenix WinNonlin, PKNCA and NonCompart at a relative 1e-8 by the oracle gates of that repository.
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
import pkpdutils_core
|
|
34
|
+
|
|
35
|
+
# the version of the crate this wheel was built from
|
|
36
|
+
version = pkpdutils_core.__version__
|
|
37
|
+
# None when this build would analyse the batch, the reason as a string when it would not
|
|
38
|
+
reason = pkpdutils_core.is_supported(batch, options)
|
|
39
|
+
result = pkpdutils_core.analyze_batch(batch, options, n_workers=None)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`batch` and `options` are plain dicts of numpy arrays, numbers and strings, one key per field of the `batch/1` contract and of version 1 of the serialized options; the result is a dict of numpy arrays. Both are described in the rust documentation of the crate, and both are the internals of `pkpdutils` rather than a public interface of this package: they change with the contract version and with nothing else.
|
|
43
|
+
|
|
44
|
+
## What this build does not carry
|
|
45
|
+
|
|
46
|
+
`analyze_batch` is the single dose analysis. An analysis which is well formed and which this build does not carry raises `pkpdutils_core.UnsupportedError`, a subclass of `ValueError`, and that one exception is what a host answers by analysing the batch its own way. Every other failure keeps its natural type: a `KeyError`, a `TypeError` or a `ValueError` naming a key means the caller and this build disagree about the contract, which is a defect and never a reason to take another path. `is_supported` asks the same question without raising and returns the reason as a string, and a host asks it first.
|
|
47
|
+
|
|
48
|
+
Not carried today: the analysis of an effect curve, the multiple dose analysis (a `tau` or a protocol of more than one dose), the acceptance criteria, the named partial areas, the propagation of the uncertainty of a group curve and the unit conversion of a result.
|
|
49
|
+
|
|
50
|
+
## Threads, and a warning about `fork`
|
|
51
|
+
|
|
52
|
+
The wheels are built with the `parallel` feature of the kernel, so the row loop of a large batch is cut into contiguous shards which run on a [rayon](https://docs.rs/rayon) thread pool. The shard plan is `n_workers`: `None` lets the kernel plan it for the shape of the batch, `1` runs every row in the calling thread, and any other number is the most stretches the run may be cut into. The numbers are identical for every plan, down to the bit. The analysis releases the interpreter while it runs, so the threads of the caller run with it.
|
|
53
|
+
|
|
54
|
+
That pool is why **a process forked after an analysis must not be expected to work**. `os.fork`, and a `multiprocessing` context or a pool with the `fork` start method, copy the parent's memory without its threads, so the rayon workers do not exist in the child while every lock they held is still locked there. A child which then analyses a batch can deadlock. Use the `forkserver` or the `spawn` start method and the question does not arise; `pkpdutils` already starts its own process pools that way (`PROCESS_START_METHOD` of `pkpdutils.parallel`), to keep its own threads out of a `fork`. A child which never calls into this module is unaffected.
|
|
55
|
+
|
|
56
|
+
## Requirements
|
|
57
|
+
|
|
58
|
+
Python 3.13 or newer and numpy 2.2.2 or newer. One wheel per platform serves every python from 3.13 on: the extension is built against the stable ABI (`abi3`), so a new python release needs no new wheel.
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
MIT, see `LICENSE` in the repository.
|
|
63
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# pkpdutils-core
|
|
2
|
+
|
|
3
|
+
The compiled non-compartmental analysis kernel of [pkpdutils](https://github.com/matthiaskoenig/pkpdutils), as a python extension module.
|
|
4
|
+
|
|
5
|
+
This distribution is not a library to program against. It is the compiled engine of [`pkpdutils`](https://pypi.org/project/pkpdutils/), which will take it as a dependency and send it the batches this build can analyse; install `pkpdutils` rather than this package. Its two functions take and return the shapes `pkpdutils` already holds in memory. The source is in [pkpdutils-core](https://github.com/matthiaskoenig/pkpdutils-core), a rust workspace, and the numbers it computes are held to Phoenix WinNonlin, PKNCA and NonCompart at a relative 1e-8 by the oracle gates of that repository.
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
import pkpdutils_core
|
|
9
|
+
|
|
10
|
+
# the version of the crate this wheel was built from
|
|
11
|
+
version = pkpdutils_core.__version__
|
|
12
|
+
# None when this build would analyse the batch, the reason as a string when it would not
|
|
13
|
+
reason = pkpdutils_core.is_supported(batch, options)
|
|
14
|
+
result = pkpdutils_core.analyze_batch(batch, options, n_workers=None)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`batch` and `options` are plain dicts of numpy arrays, numbers and strings, one key per field of the `batch/1` contract and of version 1 of the serialized options; the result is a dict of numpy arrays. Both are described in the rust documentation of the crate, and both are the internals of `pkpdutils` rather than a public interface of this package: they change with the contract version and with nothing else.
|
|
18
|
+
|
|
19
|
+
## What this build does not carry
|
|
20
|
+
|
|
21
|
+
`analyze_batch` is the single dose analysis. An analysis which is well formed and which this build does not carry raises `pkpdutils_core.UnsupportedError`, a subclass of `ValueError`, and that one exception is what a host answers by analysing the batch its own way. Every other failure keeps its natural type: a `KeyError`, a `TypeError` or a `ValueError` naming a key means the caller and this build disagree about the contract, which is a defect and never a reason to take another path. `is_supported` asks the same question without raising and returns the reason as a string, and a host asks it first.
|
|
22
|
+
|
|
23
|
+
Not carried today: the analysis of an effect curve, the multiple dose analysis (a `tau` or a protocol of more than one dose), the acceptance criteria, the named partial areas, the propagation of the uncertainty of a group curve and the unit conversion of a result.
|
|
24
|
+
|
|
25
|
+
## Threads, and a warning about `fork`
|
|
26
|
+
|
|
27
|
+
The wheels are built with the `parallel` feature of the kernel, so the row loop of a large batch is cut into contiguous shards which run on a [rayon](https://docs.rs/rayon) thread pool. The shard plan is `n_workers`: `None` lets the kernel plan it for the shape of the batch, `1` runs every row in the calling thread, and any other number is the most stretches the run may be cut into. The numbers are identical for every plan, down to the bit. The analysis releases the interpreter while it runs, so the threads of the caller run with it.
|
|
28
|
+
|
|
29
|
+
That pool is why **a process forked after an analysis must not be expected to work**. `os.fork`, and a `multiprocessing` context or a pool with the `fork` start method, copy the parent's memory without its threads, so the rayon workers do not exist in the child while every lock they held is still locked there. A child which then analyses a batch can deadlock. Use the `forkserver` or the `spawn` start method and the question does not arise; `pkpdutils` already starts its own process pools that way (`PROCESS_START_METHOD` of `pkpdutils.parallel`), to keep its own threads out of a `fork`. A child which never calls into this module is unaffected.
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
Python 3.13 or newer and numpy 2.2.2 or newer. One wheel per platform serves every python from 3.13 on: the extension is built against the stable ABI (`abi3`), so a new python release needs no new wheel.
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
MIT, see `LICENSE` in the repository.
|