pkpdutils 1.7.0__tar.gz → 2.0.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.
Files changed (394) hide show
  1. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.bumpversion.toml +1 -1
  2. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/workflows/ci-cd.yml +2 -2
  3. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/CITATION.cff +1 -1
  4. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/CLAUDE.md +6 -6
  5. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/PKG-INFO +7 -9
  6. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/README.md +3 -3
  7. pkpdutils-2.0.0/conftest.py +6 -0
  8. pkpdutils-2.0.0/docs/benchmark.md +134 -0
  9. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/bioequivalence.md +5 -5
  10. pkpdutils-2.0.0/docs/data/nca_benchmark.json +7036 -0
  11. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/ddi.md +2 -2
  12. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/development.md +15 -9
  13. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/fitting.md +4 -4
  14. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/formats.md +1 -1
  15. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/gallery.md +37 -39
  16. pkpdutils-2.0.0/docs/images/bioequivalence.svg +1 -0
  17. pkpdutils-2.0.0/docs/images/bioequivalence_parameters.svg +1 -0
  18. pkpdutils-2.0.0/docs/images/covariate.svg +1 -0
  19. pkpdutils-2.0.0/docs/images/ddi.svg +1 -0
  20. pkpdutils-2.0.0/docs/images/dose_proportionality.svg +1 -0
  21. pkpdutils-2.0.0/docs/images/emax.svg +1 -0
  22. pkpdutils-2.0.0/docs/images/fitting_exponential.svg +1 -0
  23. pkpdutils-2.0.0/docs/images/fitting_gof.svg +1 -0
  24. pkpdutils-2.0.0/docs/images/formats.svg +1 -0
  25. pkpdutils-2.0.0/docs/images/group_uncertainty.svg +1 -0
  26. pkpdutils-2.0.0/docs/images/meta_analysis.svg +1 -0
  27. pkpdutils-2.0.0/docs/images/nca_batch.svg +1 -0
  28. pkpdutils-2.0.0/docs/images/nca_batch_curves.svg +1 -0
  29. pkpdutils-2.0.0/docs/images/nca_batch_study.svg +1 -0
  30. pkpdutils-2.0.0/docs/images/nca_from_sbmlsim.svg +1 -0
  31. pkpdutils-2.0.0/docs/images/nca_single.svg +1 -0
  32. pkpdutils-2.0.0/docs/images/nca_terminal_windows.svg +1 -0
  33. pkpdutils-2.0.0/docs/images/report.svg +1 -0
  34. pkpdutils-2.0.0/docs/images/sparse.svg +1 -0
  35. pkpdutils-2.0.0/docs/images/steady_state.svg +1 -0
  36. pkpdutils-2.0.0/docs/images/steady_state_troughs.svg +1 -0
  37. pkpdutils-2.0.0/docs/images/timecourses.svg +1 -0
  38. pkpdutils-2.0.0/docs/images/urine.svg +1 -0
  39. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/index.md +3 -3
  40. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/installation.md +2 -2
  41. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/nca.md +5 -5
  42. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/pd.md +1 -1
  43. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/plotting.md +66 -66
  44. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/reporting.md +9 -9
  45. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/sparse.md +2 -2
  46. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/statistics.md +1 -1
  47. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/timecourses.md +1 -1
  48. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/uncertainty.md +1 -1
  49. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/urine.md +2 -2
  50. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/workflows.md +14 -14
  51. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/README.md +1 -1
  52. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/bioequivalence.py +5 -5
  53. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/covariate.py +4 -4
  54. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/ddi.py +3 -3
  55. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/dose_proportionality.py +3 -5
  56. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/emax.py +3 -3
  57. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/fitting_exponential.py +4 -6
  58. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/formats.py +3 -3
  59. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/group_uncertainty.py +11 -11
  60. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/meta_analysis.py +3 -5
  61. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/nca_batch.py +6 -6
  62. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/nca_from_sbmlsim.py +3 -3
  63. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/nca_single.py +6 -6
  64. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/report.py +3 -3
  65. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/sparse.py +4 -7
  66. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/steady_state.py +6 -6
  67. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/timecourses.py +9 -11
  68. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/urine.py +4 -7
  69. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/pyproject.toml +7 -9
  70. pkpdutils-2.0.0/release-notes/1.7.1.md +9 -0
  71. pkpdutils-2.0.0/release-notes/2.0.0.md +11 -0
  72. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/benchmark.py +505 -29
  73. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/render_examples.py +7 -7
  74. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/__init__.py +7 -6
  75. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/plot/__init__.py +13 -8
  76. pkpdutils-2.0.0/src/pkpdutils/plot/_common.py +1002 -0
  77. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/plot/fit.py +286 -180
  78. pkpdutils-2.0.0/src/pkpdutils/plot/meta.py +156 -0
  79. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/plot/nca.py +1037 -611
  80. pkpdutils-2.0.0/src/pkpdutils/plot/parameters.py +257 -0
  81. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/plot/ratio.py +126 -94
  82. pkpdutils-2.0.0/src/pkpdutils/plot/save.py +62 -0
  83. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/plot/style.py +13 -10
  84. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/plot/timecourse.py +409 -324
  85. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/report.py +16 -25
  86. pkpdutils-2.0.0/tests/docs/test_benchmark_profiling.py +166 -0
  87. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/docs/test_snippets.py +1 -5
  88. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/examples/test_examples.py +1 -1
  89. pkpdutils-2.0.0/tests/plot/test_plot_common.py +399 -0
  90. pkpdutils-2.0.0/tests/plot/test_plot_fit.py +256 -0
  91. pkpdutils-2.0.0/tests/plot/test_plot_meta.py +99 -0
  92. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/plot/test_plot_nca.py +326 -353
  93. pkpdutils-2.0.0/tests/plot/test_plot_parameters.py +355 -0
  94. pkpdutils-2.0.0/tests/plot/test_plot_ratio.py +131 -0
  95. pkpdutils-2.0.0/tests/plot/test_plot_save.py +34 -0
  96. pkpdutils-2.0.0/tests/plot/test_plot_timecourse.py +524 -0
  97. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/plot/test_plot_urine_sparse.py +37 -34
  98. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_api.py +60 -47
  99. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_package.py +1 -1
  100. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_report.py +23 -19
  101. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tox.ini +4 -1
  102. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/uv.lock +29 -473
  103. pkpdutils-1.7.0/conftest.py +0 -15
  104. pkpdutils-1.7.0/docs/benchmark.md +0 -73
  105. pkpdutils-1.7.0/docs/images/bioequivalence.png +0 -0
  106. pkpdutils-1.7.0/docs/images/bioequivalence_parameters.png +0 -0
  107. pkpdutils-1.7.0/docs/images/covariate.png +0 -0
  108. pkpdutils-1.7.0/docs/images/ddi.png +0 -0
  109. pkpdutils-1.7.0/docs/images/dose_proportionality.png +0 -0
  110. pkpdutils-1.7.0/docs/images/emax.png +0 -0
  111. pkpdutils-1.7.0/docs/images/fitting_exponential.png +0 -0
  112. pkpdutils-1.7.0/docs/images/fitting_gof.png +0 -0
  113. pkpdutils-1.7.0/docs/images/formats.png +0 -0
  114. pkpdutils-1.7.0/docs/images/group_uncertainty.png +0 -0
  115. pkpdutils-1.7.0/docs/images/meta_analysis.png +0 -0
  116. pkpdutils-1.7.0/docs/images/nca_batch.png +0 -0
  117. pkpdutils-1.7.0/docs/images/nca_batch_curves.png +0 -0
  118. pkpdutils-1.7.0/docs/images/nca_batch_study.png +0 -0
  119. pkpdutils-1.7.0/docs/images/nca_from_sbmlsim.png +0 -0
  120. pkpdutils-1.7.0/docs/images/nca_single.png +0 -0
  121. pkpdutils-1.7.0/docs/images/nca_terminal_windows.png +0 -0
  122. pkpdutils-1.7.0/docs/images/report.png +0 -0
  123. pkpdutils-1.7.0/docs/images/sparse.png +0 -0
  124. pkpdutils-1.7.0/docs/images/steady_state.png +0 -0
  125. pkpdutils-1.7.0/docs/images/steady_state_troughs.png +0 -0
  126. pkpdutils-1.7.0/docs/images/timecourses.png +0 -0
  127. pkpdutils-1.7.0/docs/images/urine.png +0 -0
  128. pkpdutils-1.7.0/src/pkpdutils/plot/_common.py +0 -645
  129. pkpdutils-1.7.0/src/pkpdutils/plot/meta.py +0 -133
  130. pkpdutils-1.7.0/src/pkpdutils/plot/parameters.py +0 -197
  131. pkpdutils-1.7.0/src/pkpdutils/plot/save.py +0 -91
  132. pkpdutils-1.7.0/tests/plot/test_plot_common.py +0 -371
  133. pkpdutils-1.7.0/tests/plot/test_plot_fit.py +0 -234
  134. pkpdutils-1.7.0/tests/plot/test_plot_meta.py +0 -85
  135. pkpdutils-1.7.0/tests/plot/test_plot_parameters.py +0 -395
  136. pkpdutils-1.7.0/tests/plot/test_plot_ratio.py +0 -138
  137. pkpdutils-1.7.0/tests/plot/test_plot_save.py +0 -43
  138. pkpdutils-1.7.0/tests/plot/test_plot_timecourse.py +0 -526
  139. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/CODEOWNERS +0 -0
  140. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/ISSUE_TEMPLATE/01-bug-report.md +0 -0
  141. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/ISSUE_TEMPLATE/02-question.md +0 -0
  142. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/ISSUE_TEMPLATE/03-feature-request.md +0 -0
  143. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  144. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/dependabot.yml +0 -0
  145. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/pull_request_template.md +0 -0
  146. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/rulesets/apply.sh +0 -0
  147. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/rulesets/develop.json +0 -0
  148. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/rulesets/main.json +0 -0
  149. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/rulesets/tags.json +0 -0
  150. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/workflows/docs.yml +0 -0
  151. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/workflows/ruff.yml +0 -0
  152. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.github/workflows/ty.yml +0 -0
  153. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.gitignore +0 -0
  154. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.pre-commit-config.yaml +0 -0
  155. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.python-version +0 -0
  156. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.ruff.toml +0 -0
  157. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/.zenodo.json +0 -0
  158. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/LICENSE +0 -0
  159. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/cdisc.md +0 -0
  160. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/console.md +0 -0
  161. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/crosswalk.md +0 -0
  162. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/fit.compare.md +0 -0
  163. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/fit.md +0 -0
  164. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/fit.models.md +0 -0
  165. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/fit.proportionality.md +0 -0
  166. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/index.md +0 -0
  167. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/io.md +0 -0
  168. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/log.md +0 -0
  169. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.analytes.md +0 -0
  170. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.auc.md +0 -0
  171. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.bioavailability.md +0 -0
  172. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.engine.md +0 -0
  173. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.intervals.md +0 -0
  174. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.md +0 -0
  175. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.options.md +0 -0
  176. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.report.md +0 -0
  177. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.result.md +0 -0
  178. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.sparse.md +0 -0
  179. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.steady_state.md +0 -0
  180. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.terminal.md +0 -0
  181. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.tss.md +0 -0
  182. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.uncertainty.md +0 -0
  183. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/nca.urine.md +0 -0
  184. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/parallel.md +0 -0
  185. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/plot.md +0 -0
  186. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/report.md +0 -0
  187. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/result.md +0 -0
  188. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/stats.bioequivalence.md +0 -0
  189. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/stats.ddi.md +0 -0
  190. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/stats.md +0 -0
  191. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/stats.meta.md +0 -0
  192. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/stats.power.md +0 -0
  193. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/timecourse.md +0 -0
  194. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/api/units.md +0 -0
  195. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/benchmark_datasets.md +0 -0
  196. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/indometh.csv +0 -0
  197. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/indometh-bolus-linear-log.csv +0 -0
  198. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/indometh-bolus-linear.csv +0 -0
  199. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/indometh-infusion-linear-log.csv +0 -0
  200. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/indometh-infusion-linear.csv +0 -0
  201. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/indometh-oral-linear-log.csv +0 -0
  202. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/indometh-oral-linear.csv +0 -0
  203. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/theoph-linear-log.csv +0 -0
  204. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/noncompart/theoph-linear.csv +0 -0
  205. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/indometh-bolus-linear-log.csv +0 -0
  206. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/indometh-bolus-linear.csv +0 -0
  207. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/indometh-infusion-linear-log.csv +0 -0
  208. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/indometh-infusion-linear.csv +0 -0
  209. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/indometh-oral-linear-log.csv +0 -0
  210. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/indometh-oral-linear.csv +0 -0
  211. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/theoph-linear-log.csv +0 -0
  212. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/pknca/theoph-linear.csv +0 -0
  213. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/scenarios.csv +0 -0
  214. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/theoph.csv +0 -0
  215. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/versions.csv +0 -0
  216. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Indometh_Linear.csv +0 -0
  217. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Indometh_Linear_Infusion.csv +0 -0
  218. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Indometh_Linear_Wrong_Extravascular.csv +0 -0
  219. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Indometh_Log.csv +0 -0
  220. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Indometh_Log_Infusion.csv +0 -0
  221. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Indometh_Log_Wrong_Extravascular.csv +0 -0
  222. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Theoph_Linear.csv +0 -0
  223. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/benchmarks/winnonlin/Final_Parameters_Pivoted_Theoph_Log.csv +0 -0
  224. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/data/study.csv +0 -0
  225. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/glossary.md +0 -0
  226. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/javascripts/mathjax.js +0 -0
  227. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/references.md +0 -0
  228. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/robots.txt +0 -0
  229. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/stylesheets/extra.css +0 -0
  230. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/units.md +0 -0
  231. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/validation.md +0 -0
  232. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/docs/validation_table.md +0 -0
  233. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/examples/__init__.py +0 -0
  234. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.1.5.md +0 -0
  235. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.1.6.md +0 -0
  236. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.2.0.md +0 -0
  237. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.2.1.md +0 -0
  238. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.2.2.md +0 -0
  239. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.3.0.md +0 -0
  240. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/0.3.1.md +0 -0
  241. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.0.0.md +0 -0
  242. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.1.0.md +0 -0
  243. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.2.0.md +0 -0
  244. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.3.0.md +0 -0
  245. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.4.0.md +0 -0
  246. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.5.0.md +0 -0
  247. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.6.0.md +0 -0
  248. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.6.1.md +0 -0
  249. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/release-notes/1.7.0.md +0 -0
  250. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/__init__.py +0 -0
  251. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/benchmark_datasets.R +0 -0
  252. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/benchmark_datasets.py +0 -0
  253. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/llms_txt.py +0 -0
  254. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/reference_t_isf.py +0 -0
  255. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/scripts/validation.py +0 -0
  256. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/cdisc.py +0 -0
  257. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/console.py +0 -0
  258. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/crosswalk.py +0 -0
  259. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/data/pkparmcd.csv +0 -0
  260. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/__init__.py +0 -0
  261. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/compare.py +0 -0
  262. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/engine.py +0 -0
  263. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/frontends.py +0 -0
  264. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/model.py +0 -0
  265. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/models.py +0 -0
  266. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/models_exponential.py +0 -0
  267. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/models_linear.py +0 -0
  268. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/models_response.py +0 -0
  269. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/options.py +0 -0
  270. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/proportionality.py +0 -0
  271. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/fit/result.py +0 -0
  272. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/io.py +0 -0
  273. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/log.py +0 -0
  274. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/__init__.py +0 -0
  275. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/analytes.py +0 -0
  276. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/auc.py +0 -0
  277. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/bioavailability.py +0 -0
  278. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/engine.py +0 -0
  279. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/intervals.py +0 -0
  280. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/nca.py +0 -0
  281. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/options.py +0 -0
  282. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/report.py +0 -0
  283. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/result.py +0 -0
  284. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/sparse.py +0 -0
  285. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/steady_state.py +0 -0
  286. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/terminal.py +0 -0
  287. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/tss.py +0 -0
  288. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/uncertainty.py +0 -0
  289. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/nca/urine.py +0 -0
  290. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/parallel.py +0 -0
  291. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/py.typed +0 -0
  292. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/result.py +0 -0
  293. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/__init__.py +0 -0
  294. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/bioequivalence.py +0 -0
  295. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/ddi.py +0 -0
  296. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/meta.py +0 -0
  297. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/power.py +0 -0
  298. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/ratio.py +0 -0
  299. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/sample.py +0 -0
  300. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/stats/tests.py +0 -0
  301. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/timecourse.py +0 -0
  302. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/src/pkpdutils/units.py +0 -0
  303. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/conftest.py +0 -0
  304. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/Divoll1982_Fig1.tsv +0 -0
  305. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/Kim2011_Fig2.tsv +0 -0
  306. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/Lane2014_Fig1.tsv +0 -0
  307. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/cdisc/pkunit_c85494.csv +0 -0
  308. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/data_example1.csv +0 -0
  309. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/data_example2.csv +0 -0
  310. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/formats/adnca.csv +0 -0
  311. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/formats/monolix_events.csv +0 -0
  312. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/formats/multiple_dose_events.csv +0 -0
  313. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/formats/pknca_conc.csv +0 -0
  314. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/formats/pknca_dose.csv +0 -0
  315. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/midazolam.tsv +0 -0
  316. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/reference/meta_bcg.json +0 -0
  317. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/reference/nca_reference.json +0 -0
  318. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/validation/README.md +0 -0
  319. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/data/validation/reference.json +0 -0
  320. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/docs/__init__.py +0 -0
  321. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/docs/test_benchmark.py +0 -0
  322. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/docs/test_benchmark_datasets.py +0 -0
  323. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/examples/__init__.py +0 -0
  324. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/__init__.py +0 -0
  325. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_engine.py +0 -0
  326. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_engine_advanced.py +0 -0
  327. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_engine_range.py +0 -0
  328. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_fit_options.py +0 -0
  329. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_frontends.py +0 -0
  330. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_model.py +0 -0
  331. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_models_exponential.py +0 -0
  332. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_models_linear.py +0 -0
  333. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_models_response.py +0 -0
  334. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_proportionality.py +0 -0
  335. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/fit/test_review_units.py +0 -0
  336. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/__init__.py +0 -0
  337. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_acceptance.py +0 -0
  338. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_analytes.py +0 -0
  339. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_auc.py +0 -0
  340. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_benchmark_datasets.py +0 -0
  341. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_bioavailability.py +0 -0
  342. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_blq.py +0 -0
  343. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_candidates.py +0 -0
  344. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_engine.py +0 -0
  345. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_exclude.py +0 -0
  346. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_intervals.py +0 -0
  347. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_named_partial_aucs.py +0 -0
  348. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_nca.py +0 -0
  349. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_options.py +0 -0
  350. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_parameters.py +0 -0
  351. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_partial_auc.py +0 -0
  352. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_reference.py +0 -0
  353. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_report.py +0 -0
  354. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_result.py +0 -0
  355. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_review_regressions.py +0 -0
  356. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_routes.py +0 -0
  357. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_sparse.py +0 -0
  358. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_steady_state.py +0 -0
  359. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_steady_state_parameters.py +0 -0
  360. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_summarize.py +0 -0
  361. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_terminal.py +0 -0
  362. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_terminal_noise.py +0 -0
  363. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_tss.py +0 -0
  364. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_uncertainty.py +0 -0
  365. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_urine.py +0 -0
  366. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_validation.py +0 -0
  367. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/nca/test_windows.py +0 -0
  368. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/plot/__init__.py +0 -0
  369. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/__init__.py +0 -0
  370. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_bioequivalence.py +0 -0
  371. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_carryover.py +0 -0
  372. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_ddi.py +0 -0
  373. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_hodges_lehmann.py +0 -0
  374. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_meta.py +0 -0
  375. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_power.py +0 -0
  376. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_ratio.py +0 -0
  377. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_replicate.py +0 -0
  378. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_review_regressions.py +0 -0
  379. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_sample.py +0 -0
  380. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/stats/test_tests.py +0 -0
  381. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_cdisc.py +0 -0
  382. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_citation.py +0 -0
  383. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_console.py +0 -0
  384. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_crosswalk.py +0 -0
  385. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_io.py +0 -0
  386. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_log.py +0 -0
  387. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_nominal_time.py +0 -0
  388. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_parallel.py +0 -0
  389. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_quantiles.py +0 -0
  390. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_result.py +0 -0
  391. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_timecourse.py +0 -0
  392. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_timecourses.py +0 -0
  393. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/tests/test_units.py +0 -0
  394. {pkpdutils-1.7.0 → pkpdutils-2.0.0}/zensical.toml +0 -0
@@ -1,5 +1,5 @@
1
1
  [tool.bumpversion]
2
- current_version = "1.7.0"
2
+ current_version = "2.0.0"
3
3
  commit = true
4
4
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\.dev(?P<dev>\\d+))?"
5
5
  serialize = ["{major}.{minor}.{patch}.dev{dev}", "{major}.{minor}.{patch}"]
@@ -26,8 +26,8 @@ jobs:
26
26
  strategy:
27
27
  fail-fast: false
28
28
  matrix:
29
- # continuous integration tests python 3.14 on every platform, the older
30
- # and newer versions are tested locally with `tox run-parallel`, see
29
+ # continuous integration tests python 3.14 on every platform, the newer
30
+ # version is tested locally with `tox run-parallel`, see
31
31
  # docs/development.md
32
32
  os: [ubuntu-latest, windows-latest, macos-latest]
33
33
  python-version: ["3.14"]
@@ -8,7 +8,7 @@ authors:
8
8
  given-names: "Matthias"
9
9
  orcid: "https://orcid.org/0000-0003-1725-179X"
10
10
  affiliation: "Humboldt-University Berlin, Faculty of Life Science, Institute for Biology, Berlin; University Lübeck; University Hospital Schleswig-Holstein, Campus Lübeck, First Department of Medicine, Germany"
11
- version: "1.7.0"
11
+ version: "2.0.0"
12
12
  date-released: "2026-11-01"
13
13
  doi: "10.5281/zenodo.23870615"
14
14
  license: MIT
@@ -4,7 +4,7 @@ This file provides guidance when working with code in this repository.
4
4
 
5
5
  ## Project
6
6
 
7
- `pkpdutils` is a python library for the pharmacokinetic and pharmacodynamic analysis of timecourses and parameters: non-compartmental analysis, uncertainty propagation, curve fitting, statistics on parameters (tests, bioequivalence, drug-drug interactions, meta-analysis) and figures. Pure library, no CLI entry points. Requires python >= 3.13, packaged with hatchling (version is read from `src/pkpdutils/__init__.py`). Runtime dependencies are `numpy`, `scipy`, `pandas`, `xarray`, `pint`, `pydantic`, `matplotlib`, `rich` and `pillow` (reached through matplotlib, a direct dependency only for its floor 13.0.0, the fix of the advisories of 12.x). It was `pkdb_analysis` until 0.3.1.
7
+ `pkpdutils` is a python library for the pharmacokinetic and pharmacodynamic analysis of timecourses and parameters: non-compartmental analysis, uncertainty propagation, curve fitting, statistics on parameters (tests, bioequivalence, drug-drug interactions, meta-analysis) and figures. Pure library, no CLI entry points. Requires python >= 3.14 (the floor of sbmlsim-core), packaged with hatchling (version is read from `src/pkpdutils/__init__.py`). Runtime dependencies are `pkpdutils-core`, `numpy`, `scipy`, `pandas`, `xarray`, `pint`, `pydantic`, `sbmlsim-core` (the chart builder `sbmlsim_core.chart` and its renderer, which draw the figures; sbmlsim depends on pkpdutils, so the figures cannot use sbmlsim) and `rich`. It was `pkdb_analysis` until 0.3.1.
8
8
 
9
9
  ## Commands
10
10
 
@@ -20,7 +20,7 @@ pytest -n 0 # in one process, e.g. for --pdb
20
20
  pytest -m "not docs and not examples" # without the doc snippets and the example scripts
21
21
  pytest tests/test_units.py # single file
22
22
  pytest tests/test_units.py::test_parse_unit # single test
23
- tox r -e py3.14 # single tox env (py3.13, py3.14, py3.15 available)
23
+ tox r -e py3.14 # single tox env (py3.14, py3.15 available)
24
24
  tox run-parallel # full matrix + ty, run before opening a pull request
25
25
 
26
26
  # lint / format / types
@@ -71,7 +71,7 @@ Documentation is [Zensical](https://zensical.org/): markdown sources in `docs/`,
71
71
 
72
72
  **`result.py`.** `ParameterResult` is the shared container of `NCAResult` and `FitResult`: an `xarray.Dataset` over the sample dimensions with `attrs["units"]` per variable and the integer `flags`, the classification of the variables (`parameters`, `derived_variables`, `statistics` of `statistic_variables`, `point_variables`, with the suffixes of `base_name`), `to_quantities`, `to_dataframe` (one row per sample, point variables excluded), `flag_table` and `summarize(dim)` (mean, `x_sd`, `x_se`, `x_cv`, the t interval, the quartiles, `x_min`, `x_max`, `x_n` and the geometric statistics, the `interval_*` point variables reduced over `dim` as well). `summary_table(result, dim, *, by, parameters, stats, digits, units, layout)` (also a method) formats those numbers into the parameter table of a publication: one row per parameter and group, every cell a string of `digits` significant digits, `TABLE_STATISTICS` the statistics it knows and `DEFAULT_STATISTICS` the ones it writes without being asked. `to_units(units)` converts named variables of a result with pint, together with the variables derived from them (the uncertainty and summary companions and the dose normalized `x_dn`, whose dose stays; the dimensionless `x_cv`, `x_geocv`, `x_n` are left alone) and rewrites `attrs["units"]`; `dose_normalized_names` is the hook for a parameter whose normalized variable is not `x_dn` (`auc_inf_obs` is `auc_inf_dn`).
73
73
 
74
- **`report.py`.** The study report: `Report` (a title and a list of sections, `add_text`, `add_table(frame, caption)`, `add_figure(fig, caption, dpi=150)` which renders the figure to PNG right away, `write_html` self-contained with base64 figures and `write_markdown` with the figures as files next to it, every cell formatted with `result.format_number`) and `study_report(batch, result, *, dim, by=None, options=None)`, which assembles the package of ICH M13A 2.2.2: `methods_line`, the summary table with `M13A_STATISTICS`, `acceptability_table`, the parameters per subject, `plot_mean_timecourse` and `plot_nca_grid`. `matplotlib` is imported inside `study_report`, so `import pkpdutils` stays free of it.
74
+ **`report.py`.** The study report: `Report` (a title and a list of sections, `add_text`, `add_table(frame, caption)`, `add_figure(chart, caption)` which renders the chart to SVG right away, `write_html` self-contained with base64 SVG figures and `write_markdown` with the figures as files next to it, every cell formatted with `result.format_number`) and `study_report(batch, result, *, dim, by=None, options=None)`, which assembles the package of ICH M13A 2.2.2: `methods_line`, the summary table with `M13A_STATISTICS`, `acceptability_table`, the parameters per subject, `plot_mean_timecourse` and `plot_nca_grid`. `pkpdutils.plot` is imported inside `study_report`, so a report of tables does not load the chart builder.
75
75
 
76
76
  **`parallel.py`.** The worker pools of the package: `executor(kind, n_workers)` returns one lazily created, `atexit`-closed executor per kind (`"thread"`, `"process"`) and size, shared by every call of the process; `resolve_workers(n_workers, n_rows, threshold, max_workers=8)` turns the option into a worker count (`None` automatic and serial below the threshold, `1` serial) and `split_rows(n_rows, n_workers, min_rows, max_rows)` cuts the rows into about one contiguous slice per worker. The NCA runs its rows in threads (`NCA_WORKER_THRESHOLD`, 20 000 rows; the core is vectorized numpy and releases the GIL), the fit in processes (`FIT_WORKER_THRESHOLD`, 2 000 rows; a row is a python-heavy `least_squares` search and a pooled call needs the `if __name__ == "__main__":` guard). The process pool starts its workers with `PROCESS_START_METHOD` (`forkserver`, `spawn` on macOS and Windows) on every python version, never with the `fork` default of python 3.13, which may deadlock next to the threads of the NCA. A broken pool is dropped and replaced by the next `executor` call.
77
77
 
@@ -91,15 +91,15 @@ Documentation is [Zensical](https://zensical.org/): markdown sources in `docs/`,
91
91
 
92
92
  **`stats/` - statistics on parameters.** `sample.py` holds `ParameterSample` (individual values with `labels` and `coords`, or summary `mean`/`sd`/`n`, `geomean`/`geocv`; `log_moments` translates summary data with the log-normal relations), `Scale`, `Summary` and `summarize`; `ParameterResult.sample(name, dim, **indexers)` builds one from a result (the non-dimension coordinates of a batch travel through `nca` and `fit_timecourses` via the module-level `sample_coordinates`). `tests.py` has `compare` (scipy t, rank and permutation tests, Welch from moments for summary data, `TestResult` with the effect, its t interval, Cohen's d and Hedges' g), `multiple_comparison` (Holm, Bonferroni, BH) and `hodges_lehmann(a, b, *, paired=None, ci_level=0.90)` (the median of the Walsh averages or of the pairwise differences with the distribution free interval of the order statistics, the null distributions enumerated exactly up to `EXACT_MAX_N` values and approximated above, the p value of the matching rank test and the achieved coverage in `ci_level`; the `tmax` comparison of the EMA); `ratio.py` the geometric mean ratio with a t interval (paired by label or Welch) and `ratio_table`, the ratio table of a publication (one row per parameter, the ratio and its interval in percent, a `BEResult` adding the within-subject CV and the verdict); `bioequivalence.py` `tost` and `bioequivalence` (TOST; `Design` detected from the samples: `REPLICATE` from the sequences `TRTR`/`RTRT`, `TRT`/`RTR`, `TRRT`/`RTTR` as the fixed effects ANOVA of the log values with sequence, subject within sequence, period and formulation (EMA Method A, `BEParameter.anova`, `cv_intra_r`/`cv_intra_t` from the administrations of each formulation alone), 2x2 crossover from the `period`/`sequence` coordinates as the period-difference analysis of Chow & Liu, paired, parallel; `scaling="none"|"ema"|"fda"|"fda_nti"|"ema_nti"` applies the reference-scaled rules with `abel_limits` (widening above a `cv_intra_r` of 30 %, for the `scaled_parameters`, `("cmax",)` by default) and `rsabe_criterion` (whose point estimate is the subject-level difference the criterion is built on, not the effect of the ANOVA) and writes `scaled`, `limits_scaled`, `criterion`, `sd_ratio_upper`), `carryover_table`; `power.py` `power_tost` and `sample_size_tost` (the exact power of the two one-sided tests through Owen's Q by `scipy.integrate.quad`, the design constants of PowerTOST in `DESIGNS`, an odd `n` split into the two sequences it would really have, pinned to the published examples of PowerTOST in `tests/stats/test_power.py`); `ddi.py` `DDIThresholds` (FDA 2020 and EMA 2012, identical values) with `ddi_classification` (conservative bound of an interval, `uncertain`), `substrate_sensitivity(auc_ratio, *, thresholds=None)` and `ddi_table` (one row per parameter: the ratio with its 90 % interval, the class and its strength); `meta.py` `effect_size` (Hedges' g, mean difference, log ratio), `fixed_effect`, `random_effects` (DerSimonian-Laird), `heterogeneity`, `meta_analysis` over `Study` objects and `effects_from_arrays`. Results are frozen dataclasses. `tests/data/reference/meta_bcg.json` holds the BCG trials with the metafor results as the regression reference.
93
93
 
94
- **`plot/` - figures.** `style.py` (`PlotStyle`, `dose_color`, `partial_color`), `timecourse.py` (`plot_timecourse` with `by`, `facet` and `max_legend`, `plot_mean_timecourse`: the mean of every group with its spread band, the individuals faint behind it, a linear and a semi-logarithmic panel and one legend, `plot_study_curves`: the four panels of a study report, the individuals on the actual times and the group means on the nominal times (`nominal_grid`, `on_nominal_times`), linear and semi-logarithmic), `nca.py` (`plot_nca` with a third panel listing the parameters with units and intervals, `plot_nca_grid` with one legend for the figure and the sample coordinates as panel titles, `draw_nca_panel` with error bars of the data, the confidence band of the terminal regression, the annotated peak, last point and half-life, shading `AUC(0-tau)` of a multiple dose result and, with `partial=` and `partial_range=`, a named partial area of `NCAOptions.partial_aucs` (`plot_nca(partial=)` and `plot_nca_grid(partial=)` read the interval from `NCAResult.partial_aucs` and shift it onto the panel), `plot_terminal_windows` of the candidate windows of the terminal regression (`TerminalPhase.keep_candidates`) against their start time with the chosen one marked, `plot_intervals` of the `interval_*` variables against the interval number, `plot_troughs` of `interval_ctrough`/`interval_cmin` per group against the interval end or number), `fit.py` (`plot_fit`, `plot_goodness_of_fit`, `plot_dose_proportionality`, `plot_bland_altman`), `parameters.py` (`plot_parameters`), `ratio.py` (`plot_ratio`), `meta.py` (`plot_forest`). `plot_ratio` and `plot_forest` write `estimate [low, high]` (and the weight of a study) in a column beside the rows; `plot_fit` and `plot_dose_proportionality` label their axes from `attrs["x_name"]`/`attrs["y_name"]`, which the front ends in `fit/frontends.py` set. A dose of a protocol of several doses is a dotted line and an infusion the shaded window from the dose time to its end (`draw_nca_panel` marks the dose it analyses alone, since the panel starts there). Every signature is `f(data, *, <options>, ax=None, style=DEFAULT_STYLE)`, `axes: Sequence[Axes] | None` for the multi-panel figures (`plot_nca`, `plot_nca_grid`, `plot_fit`, `plot_mean_timecourse`, `plot_timecourse(facet=...)`), a logarithmic axis is `log_x`/`log_y` (`plot_bland_altman` takes `log_ratio`, which selects the statistic) and every log axis carries plain tick labels; `_common.py` holds `figure_of`, `axes_of`, `plain_log_ticks`, `log_scale`, `sample_labels`, `sample_colors`, `group_colors`, `sample_title`, `format_value`, `dose_markers`, `estimate_text`, `unit_label`, `axis_label`, `group_order`, `annotation_room`, `make_room_right`, `legend_above_data` and `annotate_column`; `figure_of` and `axes_of` return the root figure of axes inside a subfigure. A unit of a result is labelled in the short symbols of pint (`mg/l` for `milligram / liter`) and a unit the data spells itself is kept as it is. Functions return the `Figure` and never show it; `draw_nca_panel` returns the `Axes` and is exported.
94
+ **`plot/` - figures.** `style.py` (`PlotStyle`, `dose_color`, `partial_color`), `timecourse.py` (`plot_timecourse` with `by`, `facet` and `max_legend`, `plot_mean_timecourse`: the mean of every group with its spread band, the individuals faint behind it, a linear and a semi-logarithmic panel and one legend, `plot_study_curves`: the four panels of a study report, the individuals on the actual times and the group means on the nominal times (`nominal_grid`, `on_nominal_times`), linear and semi-logarithmic), `nca.py` (`plot_nca` with a third panel listing the parameters with units and intervals, `plot_nca_grid` with one legend for the figure and the sample coordinates as panel titles, `draw_nca_panel` with error bars of the data, the confidence band of the terminal regression, the annotated peak, last point and half-life, shading `AUC(0-tau)` of a multiple dose result and, with `partial=` and `partial_range=`, a named partial area of `NCAOptions.partial_aucs` (`plot_nca(partial=)` and `plot_nca_grid(partial=)` read the interval from `NCAResult.partial_aucs` and shift it onto the panel), `plot_terminal_windows` of the candidate windows of the terminal regression (`TerminalPhase.keep_candidates`) against their start time with the chosen one marked, `plot_intervals` of the `interval_*` variables against the interval number, `plot_troughs` of `interval_ctrough`/`interval_cmin` per group against the interval end or number), `fit.py` (`plot_fit`, `plot_goodness_of_fit`, `plot_dose_proportionality`, `plot_bland_altman`), `parameters.py` (`plot_parameters`), `ratio.py` (`plot_ratio`), `meta.py` (`plot_forest`). `plot_ratio` and `plot_forest` write `estimate [low, high]` (and the weight of a study) in a column beside the rows; `plot_fit` and `plot_dose_proportionality` label their axes from `attrs["x_name"]`/`attrs["y_name"]`, which the front ends in `fit/frontends.py` set. A dose of a protocol of several doses is a dotted line and an infusion the shaded window from the dose time to its end (`draw_nca_panel` marks the dose it analyses alone, since the panel starts there). The figures are charts of `sbmlsim_core.chart` (a chart is saved by the suffix of its path, SVG by default, `save_figure` writes several formats). Every signature is `f(data, *, <options>, chart=None, row=0, column=0, style=DEFAULT_STYLE)`: without `chart` the function draws a chart of its own (`new_chart`, the size in inches of the former matplotlib figure, `INCH` pixels per inch, matplotlib's font sizes), with one it adds its panels to the cells of that chart from `(row, column)` on (`chart_of` checks they fit), a logarithmic axis is `log_x`/`log_y` (`plot_bland_altman` takes `log_ratio`, which selects the statistic) and every log axis carries plain tick labels; `_common.py` holds `new_chart`, `chart_of`, `marker` (the chart's markers or matplotlib's codes), `log_axis`, `data_limits` (matplotlib's margins, so that a shaded dose window spans the panel), `plain_log_ticks`, `value_axis`, `Frame` (the panel as the renderer lays it out, `sbmlsim_core.figure_geometry`, which converts an offset in points into values of the axes for the annotations), `sample_labels`, `sample_colors`, `group_colors` (`sbmlsim_core.color_scale`), `sample_title`, `format_value`, `dose_markers`, `estimate_text`, `unit_label`, `axis_label`, `group_order`, `annotation_room`, `make_room_right`, `row_axis`, `row_panel_width`, `annotate_column` and `legend_room`. A unit of a result is labelled in the short symbols of pint (`mg/l` for `milligram / liter`) and a unit the data spells itself is kept as it is. Functions return the `Chart`; `draw_nca_panel` returns the `ChartPlot` and is exported.
95
95
 
96
96
  ## Conventions
97
97
 
98
98
  - Type checking is done with [ty](https://docs.astral.sh/ty/). `[tool.ty.terminal] error-on-warning = true` means warnings fail the check, so the tree must stay at zero diagnostics. Suppress a diagnostic with a rule-specific `# ty: ignore[rule-name]`, never a blanket `# type: ignore`. ty also runs as a pre-commit hook (`--extra dev`).
99
99
  - Every module, class and function of the package carries full type annotations and a google style docstring (ruff `D`); `examples/`, `tests/` and `scripts/` are exempt from the docstring rules. Docstrings of parameters and methods carry the formula and a citation key of `docs/references.md`.
100
100
  - Results are `xarray.Dataset` objects with one variable per parameter over the sample dimensions of the input and `attrs["units"]` on every variable.
101
- - `examples/` at the top level holds the runnable examples, they are not part of the package and are run as modules (`python -m examples.timecourses`). An example writes into the current working directory and never opens a window; the `conftest.py` at the root selects the `Agg` backend for the test session. `tests/examples/test_examples.py` runs them.
102
- - Library code does not call `plt.show()`; figures are returned or saved.
101
+ - `examples/` at the top level holds the runnable examples, they are not part of the package and are run as modules (`python -m examples.timecourses`). An example writes its figures as SVG into the current working directory and never opens a window. `tests/examples/test_examples.py` runs them.
102
+ - Library code never shows a figure; charts are returned or saved, as SVG unless a caller asks for another format.
103
103
  - Test fixtures live in `tests/data/`; `tests/data/reference/nca_reference.json` holds the results of `pkdb_analysis` 0.3.1 on them and is the regression reference of the NCA.
104
104
  - `tests/data/validation/` holds the reference file of the two public validation datasets (`theoph.csv`, `indometh.csv` of R `datasets`, which live in `docs/data/benchmarks/`, the indomethacin profiles analysed both as a bolus and as a 0.25 h infusion), the published Phoenix WinNonlin and PKNCA results with their sources in `reference.json` and the `README.md` naming source and license; `tests/nca/test_validation.py` compares every parameter of every subject against them and `scripts/validation.py` writes the committed comparison table `docs/validation_table.md` and the table of `docs/validation.md`.
105
105
  - `docs/workflows.md` holds the five walk-throughs from the data of a study to its table and figure (a study table, bioequivalence, drug-drug interaction, steady state, dose proportionality); `docs/data/` holds the only files a page may read: `study.csv`, the event table the quickstart of `docs/index.md` reads, and `benchmarks/`, the datasets, the scenario manifest and the WinNonlin, PKNCA and NonCompart result tables of `docs/benchmark_datasets.md` (the snippet runner copies both next to a page).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pkpdutils
3
- Version: 1.7.0
3
+ Version: 2.0.0
4
4
  Summary: pkpdutils are python utilities for the pharmacokinetic and pharmacodynamic analysis of timecourses and parameters.
5
5
  Project-URL: Homepage, https://matthiaskoenig.github.io/pkpdutils
6
6
  Project-URL: Documentation, https://matthiaskoenig.github.io/pkpdutils
@@ -16,21 +16,19 @@ Keywords: bioequivalence,drug-drug interaction,meta-analysis,non-compartmental a
16
16
  Classifier: Development Status :: 5 - Production/Stable
17
17
  Classifier: Intended Audience :: Science/Research
18
18
  Classifier: Operating System :: OS Independent
19
- Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: 3.14
21
20
  Classifier: Programming Language :: Python :: 3.15
22
21
  Classifier: Programming Language :: Python :: Implementation :: CPython
23
22
  Classifier: Topic :: Scientific/Engineering
24
23
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
25
- Requires-Python: >=3.13
26
- Requires-Dist: matplotlib>=3.10.0
24
+ Requires-Python: >=3.14
27
25
  Requires-Dist: numpy>=2.2.2
28
26
  Requires-Dist: pandas>=2.2.0
29
- Requires-Dist: pillow>=13.0.0
30
27
  Requires-Dist: pint>=0.25.3
31
- Requires-Dist: pkpdutils-core<0.7,>=0.6.0
28
+ Requires-Dist: pkpdutils-core<0.8,>=0.7.0
32
29
  Requires-Dist: pydantic>=2.10.0
33
30
  Requires-Dist: rich>=14.0.0
31
+ Requires-Dist: sbmlsim-core>=0.34.0
34
32
  Requires-Dist: scipy>=1.15.0
35
33
  Requires-Dist: xarray>=2025.1.0
36
34
  Provides-Extra: dev
@@ -105,10 +103,10 @@ table = summary_table(
105
103
  unit_style="short",
106
104
  )
107
105
  print_table(table, title="Pharmacokinetic parameters by dose group")
108
- plot_mean_timecourse(batch, by="dose").savefig("study_curves.png", dpi=120)
106
+ plot_mean_timecourse(batch, by="dose").save("study_curves.svg")
109
107
  ```
110
108
 
111
- ![The mean curve of every dose group with its standard deviation, linear and semi-logarithmic](https://raw.githubusercontent.com/matthiaskoenig/pkpdutils/develop/docs/images/nca_batch_curves.png)
109
+ ![The mean curve of every dose group with its standard deviation, linear and semi-logarithmic](https://raw.githubusercontent.com/matthiaskoenig/pkpdutils/develop/docs/images/nca_batch_curves.svg)
112
110
 
113
111
  The table the snippet prints, the geometric mean with its coefficient of variation per dose group:
114
112
 
@@ -142,7 +140,7 @@ If you use `pkpdutils` please cite the archived software on [Zenodo](https://doi
142
140
 
143
141
  ## Installation
144
142
 
145
- `pkpdutils` requires python >= 3.13 and is available from [pypi](https://pypi.python.org/pypi/pkpdutils):
143
+ `pkpdutils` requires python >= 3.14 and is available from [pypi](https://pypi.python.org/pypi/pkpdutils):
146
144
 
147
145
  ```bash
148
146
  uv add pkpdutils
@@ -56,10 +56,10 @@ table = summary_table(
56
56
  unit_style="short",
57
57
  )
58
58
  print_table(table, title="Pharmacokinetic parameters by dose group")
59
- plot_mean_timecourse(batch, by="dose").savefig("study_curves.png", dpi=120)
59
+ plot_mean_timecourse(batch, by="dose").save("study_curves.svg")
60
60
  ```
61
61
 
62
- ![The mean curve of every dose group with its standard deviation, linear and semi-logarithmic](https://raw.githubusercontent.com/matthiaskoenig/pkpdutils/develop/docs/images/nca_batch_curves.png)
62
+ ![The mean curve of every dose group with its standard deviation, linear and semi-logarithmic](https://raw.githubusercontent.com/matthiaskoenig/pkpdutils/develop/docs/images/nca_batch_curves.svg)
63
63
 
64
64
  The table the snippet prints, the geometric mean with its coefficient of variation per dose group:
65
65
 
@@ -93,7 +93,7 @@ If you use `pkpdutils` please cite the archived software on [Zenodo](https://doi
93
93
 
94
94
  ## Installation
95
95
 
96
- `pkpdutils` requires python >= 3.13 and is available from [pypi](https://pypi.python.org/pypi/pkpdutils):
96
+ `pkpdutils` requires python >= 3.14 and is available from [pypi](https://pypi.python.org/pypi/pkpdutils):
97
97
 
98
98
  ```bash
99
99
  uv add pkpdutils
@@ -0,0 +1,6 @@
1
+ """Test session configuration.
2
+
3
+ The examples are importable: they are not part of the package, they live in
4
+ `examples/` at the root of the repository. pytest puts the directory of this
5
+ file on `sys.path`, so that the tests can import the examples.
6
+ """
@@ -0,0 +1,134 @@
1
+ # Performance
2
+
3
+ The non-compartmental analysis (NCA) runs through the Rust kernel [`pkpdutils-core`](https://github.com/matthiaskoenig/pkpdutils-core), installed with the package, or the Python implementation in `pkpdutils.nca.nca`. This benchmark measures the speedup of the public `nca()` call and profiles where both paths spend their time.
4
+
5
+ The workload is reproducible, seeded, noisy mono-exponential intravenous bolus profiles, with a single dose, automatic terminal-window selection, and no uncertainty propagation. The sweep covers both short and densely sampled profiles. Imports and fixture construction are excluded. These results do not measure bootstrap, delta-method uncertainty, multiple dosing, other routes, or the separate summary, urine, sparse and steady-state APIs. Use the other hot-path cases to investigate those workloads.
6
+
7
+ Every case checks dispatch eligibility and compares warmed results, including values, missing values, dtypes and unit attributes, before timing. The benchmark refuses to run with `PKPDUTILS_COMPARE_ENGINES=1`: that differential gate runs both engines inside the Rust path and would invalidate the speedup. Continuous integration uses the gate separately to check numerical parity across the test suite; see [NCA](nca.md#the-two-engines).
8
+
9
+ ## The two engines on one batch
10
+
11
+ `scripts/benchmark.py` runs each shape in a fresh interpreter. Both engines use the same prebuilt batch and options. Each engine warms once, then timed pairs alternate order: Rust/Python, Python/Rust. Garbage collection runs before each measurement, outside its timer. The Python path uses the private benchmark switch `pkpdutils.nca.engine._force_python`.
12
+
13
+ Times are median wall times. Each adjacent IQR column is the difference between the 75th and 25th percentiles of that engine's samples, not a confidence interval. Speedup is the Python median divided by the Rust median; values above 1 favor Rust. Small differences near 1 need reruns. [Raw samples and machine metadata](data/nca_benchmark.json) retain every run, dependency versions, CPU affinity, worker policy and thread environment.
14
+
15
+ <!-- timings:start -->
16
+ Measured on 2026-11-19, python 3.14.10 on Linux x86_64, 12th Gen Intel(R) Core(TM) i7-12700, with 20 logical CPUs, `pkpdutils` 1.7.0 with `pkpdutils-core` 0.7.0, 15 timed runs per engine and case after one warm-up run each, with automatic workers.
17
+
18
+ | case | size | points | kernel ms | IQR ms | python ms | IQR ms | speedup | peak RSS MB |
19
+ |---|---|---|---|---|---|---|---|---|
20
+ | engine-1x12 | 1 curve x 12 points | 12 | 1.29 | 0.05 | 1.57 | 0.06 | 1.22x | 171 |
21
+ | engine-100x12 | 100 curves x 12 points | 1 200 | 1.36 | 0.03 | 1.89 | 0.07 | 1.38x | 171 |
22
+ | engine-10x200 | 10 curves x 200 points | 2 000 | 1.41 | 0.04 | 1.97 | 0.04 | 1.39x | 172 |
23
+ | engine-250x12 | 250 curves x 12 points | 3 000 | 1.47 | 0.05 | 2.29 | 0.07 | 1.56x | 174 |
24
+ | engine-1000x12 | 1 000 curves x 12 points | 12 000 | 1.77 | 0.24 | 4.19 | 0.14 | 2.37x | 187 |
25
+ | engine-100x200 | 100 curves x 200 points | 20 000 | 1.64 | 0.26 | 6.00 | 0.33 | 3.66x | 189 |
26
+ | engine-10000x12 | 10 000 curves x 12 points | 120 000 | 5.27 | 0.22 | 30.95 | 0.49 | 5.88x | 216 |
27
+ | engine-1000x200 | 1 000 curves x 200 points | 200 000 | 3.50 | 0.55 | 52.06 | 1.94 | 14.89x | 238 |
28
+ | engine-100000x12 | 100 000 curves x 12 points | 1 200 000 | 52.13 | 2.68 | 97.03 | 5.31 | 1.86x | 615 |
29
+ | engine-10000x200 | 10 000 curves x 200 points | 2 000 000 | 18.91 | 1.83 | 477.87 | 9.11 | 25.27x | 511 |
30
+
31
+ The largest ratio of this run is 25.27x, at 10 000 curves x 200 points, and the smallest 1.22x, at 1 curve x 12 points. Every shape of this run is at or above 1.00x; no crossover is observed among the measured shapes. Of two shapes of nearly equal work the ratios differ most between 10 000 curves x 12 points at 5.88x and 1 000 curves x 200 points at 14.89x. From 100 curves x 12 points on every shape of this run is a clear win, the first of them at 1.38x.
32
+ <!-- timings:end -->
33
+
34
+ ## Interpreting batch size and workers
35
+
36
+ Dispatch and dataset construction impose a fixed per-call cost, while array conversion, output copies and numerical work also scale with batch size. Batching profiles amortizes the fixed part. Shape matters too: equal point counts do not imply equal timings, since every profile produces its own output parameters and terminal-window search. The generated sentences report the measured range rather than assuming a crossover or a monotone speedup.
37
+
38
+ Both columns use automatic workers. Python switches to a shared thread pool at `NCA_WORKER_THRESHOLD` (20 000 profiles); Rust uses its own shard policy. This is the speedup of the installed defaults, including their worker policies, not an equal-thread comparison of languages. Use `--n-workers 1` for a controlled serial comparison, or an explicit count for scaling studies. Profile counts and sampling density should both inform future worker-threshold tuning.
39
+
40
+ ### Serial control
41
+
42
+ Both engines use `n_workers=1` in these controls, measured in fresh processes after the automatic-worker sweep, with the same repeat count. The comparison includes host and binding costs; it does not isolate language arithmetic. Machine load can differ between cases, so compare dispersion as well as medians. The raw JSON retains these cases under `serial_rows`.
43
+
44
+ <!-- serial:start -->
45
+ | case | size | points | kernel ms | IQR ms | python ms | IQR ms | speedup | peak RSS MB |
46
+ |---|---|---|---|---|---|---|---|---|
47
+ | engine-100000x12 | 100 000 curves x 12 points | 1 200 000 | 100.07 | 9.05 | 273.66 | 2.35 | 2.73x | 467 |
48
+ | engine-10000x200 | 10 000 curves x 200 points | 2 000 000 | 88.37 | 3.32 | 474.16 | 10.16 | 5.37x | 503 |
49
+ <!-- serial:end -->
50
+
51
+ ## Profiling the timings
52
+
53
+ The phase table comes from separate instrumented calls after each case's speed measurements. These are **mean wall times**, not the medians above: phases are exclusive, and their means sum to the mean total before rounding. Instrumentation adds overhead, so use the first table for speedup. The raw JSON includes every phase sample for every shape; this table shows representative shapes.
54
+
55
+ <!-- profiles:start -->
56
+ | case | engine | total ms | input + dispatch ms | binding ms | output adaptation ms | Python compute ms | result ms | other ms |
57
+ |---|---|---|---|---|---|---|---|---|
58
+ | engine-1x12 | kernel | 1.224 | 0.207 | 0.106 | 0.079 | 0.000 | 0.559 | 0.273 |
59
+ | engine-1x12 | python | 1.536 | 0.002 | 0.000 | 0.000 | 0.663 | 0.562 | 0.310 |
60
+ | engine-1000x200 | kernel | 3.339 | 0.656 | 1.532 | 0.117 | 0.000 | 0.667 | 0.368 |
61
+ | engine-1000x200 | python | 52.066 | 0.001 | 0.000 | 0.000 | 50.872 | 0.661 | 0.532 |
62
+ | engine-100000x12 | kernel | 55.603 | 3.218 | 44.559 | 0.335 | 0.000 | 4.244 | 3.248 |
63
+ | engine-100000x12 | python | 100.028 | 0.001 | 0.000 | 0.000 | 91.610 | 4.256 | 4.161 |
64
+ | engine-10000x200 | kernel | 18.426 | 3.846 | 12.877 | 0.149 | 0.000 | 0.926 | 0.627 |
65
+ | engine-10000x200 | python | 474.506 | 0.001 | 0.000 | 0.000 | 471.941 | 0.909 | 1.655 |
66
+
67
+ For one curve, result assembly is 45.7 % of the profiled Rust path and the binding is 8.6 %. For 10 000 curves x 200 points, the binding is 69.9 % and result assembly is 5.0 %. Even eliminating the entire binding call would cap further speedup on that shape at 3.32x with the remaining costs unchanged. For 100 000 curves x 12 points, output adaptation is 0.6 % and result assembly is 7.6 % of the profiled Rust path. The independent serial Python function profile of the dense batch ranks `auc.py:60(segment_areas)` (191.73 ms self time), `terminal.py:106(window_statistics)` (105.04 ms self time), `_shape_base_impl.py:60(take_along_axis)` (33.35 ms self time) highest.
68
+ <!-- profiles:end -->
69
+
70
+ The boundaries are:
71
+
72
+ - **Input + dispatch:** preparing the batch and options dictionaries and checking kernel support. The JSON separates input preparation from the rest of dispatch.
73
+ - **Binding:** `pkpdutils_core.analyze_batch`, including PyO3 input copies, native computation, native workers and Python output conversion. This is not a measurement of pure Rust computation.
74
+ - **Output adaptation:** the rest of `engine.run_kernel`, including parameter mapping, dtype and unit normalization, excluding the binding and any input preparation.
75
+ - **Python compute:** `run_analysis_rows`, including NumPy computation and any thread-pool wait. No Python computation runs in the eligible Rust path.
76
+ - **Result:** `_to_result`, including parameter scaling, array copies, coordinates, units and the xarray result dataset.
77
+ - **Other:** the remaining host orchestration, validation, flags, dose handling and option serialization, plus instrumentation overhead outside the named boundaries.
78
+
79
+ `--profile` also collects an independent `cProfile` run for each engine and case, using `n_workers=1` in both engines so Python numerical functions stay in the calling thread. These are diagnostic profiles of the serial paths, not timings of the automatic worker policy. Their overhead varies with Python call count; function times are never used in either table. The JSON retains the highest self and cumulative times. `--profile-dir` additionally saves `.prof` and `.txt` files, sorted by cumulative and self time. Python profiling cannot split native Rust work from conversion inside the binding. Use phase timers for parallel wall-time attribution and native sampling with symbols before attributing a Rust cost to a specific algorithm.
80
+
81
+ ## Further improvements to investigate
82
+
83
+ These are candidates supported by the measured boundaries and code inspection, not measured gains from changes:
84
+
85
+ 1. **Reduce result copies and repeated result construction.** `_to_result` multiplies numeric columns even when the unit factor is 1, and casts integer columns again after the Rust adapter normalizes their dtype. Investigate reusing arrays for identity conversions and `astype(copy=False)`, while preserving result ownership and independence. Reuse validated schema and unit metadata where inputs permit it. The result share in the phase table bounds the benefit.
86
+ 2. **Avoid decoding the same inputs twice.** The support predicate and the analysis binding each decode the input batch into owned Rust buffers. Consider a validated prepared-input handle, or a support check that reads only metadata, while preserving fallback semantics and safe buffer ownership when the GIL is released. The input/dispatch phase and binding phase contain this work, but the profile does not isolate its share. Rust output vectors already transfer to NumPy without copying; a new output buffer interface alone would not remove these input costs. Returning computation-unit columns could also avoid reversing and reapplying scale factors, but the measured output-adaptation share is small.
87
+ 3. **Batch small analyses.** Submit many compatible profiles in one `Timecourses` object to amortize dispatch and xarray construction. Measure the actual workload: combining profiles changes output size and worker selection as well as call count.
88
+ 4. **Tune workers against both dimensions.** Compare serial and automatic runs on the same machine. Benchmark profile counts near the Python threshold, long profiles and concurrent callers before changing shard sizes or thresholds. Avoid inferring thread efficiency from the default speedup alone.
89
+ 5. **Profile inside Rust before changing its algorithms.** Native sampling or kernel microbenchmarks can distinguish terminal-window fitting, AUC integration, allocations and binding conversion. The serial Python hotspots identify costs the Rust path already avoids; they do not identify Rust hotspots. The optimistic binding-removal bound applies only to changes inside that boundary with all other costs held constant.
90
+
91
+ ## What the memory column says
92
+
93
+ `peak RSS MB` is the process high-water mark after both uninstrumented engines have run, before profiling. It includes imports, fixture construction, warm-up validation and both engine allocations. It is not a per-engine comparison or an incremental allocation measurement. Allocator retention can keep RSS above the size of live arrays.
94
+
95
+ ## What the kernel does not carry
96
+
97
+ An analysis `pkpdutils-core` does not carry takes the python path, with the numbers and the timings it always had, and no table of this page covers it: the two columns would be the same engine twice. The dispatch decides once per batch, and the reason it gives is the kernel's own sentence:
98
+
99
+ <!-- refusals:start -->
100
+ | analysis | the reason the dispatch gives |
101
+ |---|---|
102
+ | an effect curve | the analysis of an effect curve (Kind::Effect) |
103
+ | the acceptance criteria of the terminal phase | the acceptance criteria (NcaOptions::acceptance) |
104
+ | a named partial area | the named partial areas (NcaOptions::partial_aucs) |
105
+ | routes which differ in their dosing | a batch of several routes of which only some have a multiple dose row, whose variables the python core reports per route |
106
+ | the reporting units of a result | the unit conversion of a result (NcaOptions::units) |
107
+ <!-- refusals:end -->
108
+
109
+ A batch of several routes is analysed by whichever engine the dispatch picked, in one call, and the result is the same: the kernel reports the union of the variables of the routes in its own order and the host sorts it into the order the python core would have reported, so the columns of a table do not depend on which engine ran.
110
+
111
+ ## Reproducing this page
112
+
113
+ ```bash
114
+ uv run python scripts/benchmark.py engines # the table above
115
+ uv run python scripts/benchmark.py --write --repeat 15 # speedups, serial control, phases and JSON
116
+ uv run python scripts/benchmark.py --check # exit 1 if the page no longer matches the cases
117
+ uv run python scripts/benchmark.py all --repeat 5 # the hot paths of the package as well
118
+
119
+ # Save phases, raw samples and independent Python profiles for the same run.
120
+ uv run python scripts/benchmark.py --write --repeat 15 --profile-dir /tmp/nca-profiles
121
+
122
+ # Controlled worker comparison without replacing the automatic-worker page.
123
+ uv run python scripts/benchmark.py engine-100000x12 engine-10000x200 \
124
+ --n-workers 1 --repeat 9 --profile --output /tmp/nca-serial.json
125
+
126
+ # Read the independent function profile interactively.
127
+ python -m pstats /tmp/nca-profiles/engine-10000x200-kernel.prof
128
+ ```
129
+
130
+ The numbers are of the machine named above the table, and of its load on that day. They are comparable against another run of the same script on the same machine, which is what a change to either engine is measured with, and they are no promise about another machine: the crossover in particular moves with the cost of a python call against the cost of a memory copy. Rerun `--write` after a release of `pkpdutils-core`, after a change to the dispatch or to the python core, and on the machine whose numbers you want to quote.
131
+
132
+ `--check` compares what the script controls: the cases, size labels, timing and phase columns, numeric cells, and the refusal table. It does not impose machine-specific speed thresholds. `tests/docs/test_benchmark.py` runs this check; profiling tests check accounting, actual engine selection and restoration of instrumentation. Timings and measured summary sentences are written by `--write`.
133
+
134
+ The JSON preserves provenance and dispersion so a rerun can be assessed instead of comparing rounded headline ratios. The phase percentages and binding-removal bound are generated from that run, alongside the tables.
@@ -189,9 +189,9 @@ print(f"cv_intra {peak.cv_intra * 100:.2f} %, TOST p = {peak.p_value:.3f}")
189
189
  print(f"p_period {peak.p_period:.3f}, p_sequence {peak.p_sequence:.3f}")
190
190
  print("bioequivalent:", be.bioequivalent)
191
191
 
192
- plot_ratio(be).savefig("bioequivalence.png", dpi=120)
193
- plot_parameters(test, "cmax", "individual", by="sequence", log_y=True).savefig(
194
- "bioequivalence_parameters.png", dpi=120
192
+ plot_ratio(be).save("bioequivalence.svg")
193
+ plot_parameters(test, "cmax", "individual", by="sequence", log_y=True).save(
194
+ "bioequivalence_parameters.svg"
195
195
  )
196
196
  ```
197
197
 
@@ -214,9 +214,9 @@ The exposure of the two formulations is equivalent, the peak is not: the slower
214
214
 
215
215
  The figure of the report puts the three ratios on a logarithmic axis against the acceptance limits, with the numbers in a column beside them, and the individual values behind the peak ratio show where the failure comes from (both figures are the ones `examples/bioequivalence.py` writes from the same data):
216
216
 
217
- ![The geometric mean ratios of a 2x2 crossover against the 80-125 % limits](images/bioequivalence.png)
217
+ ![The geometric mean ratios of a 2x2 crossover against the 80-125 % limits](images/bioequivalence.svg)
218
218
 
219
- ![The individual cmax of both sequences as jittered points with a box plot](images/bioequivalence_parameters.png)
219
+ ![The individual cmax of both sequences as jittered points with a box plot](images/bioequivalence_parameters.svg)
220
220
 
221
221
  `tost` runs the same decision on two samples directly, and `design=` reads the same data under another design. The comparison shows what the crossover buys: the ratio is the same number, the interval of the parallel analysis is more than five times as wide, because it carries the between-subject variability the crossover removed.
222
222