splita 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. splita-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
  2. splita-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  3. splita-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +7 -0
  4. splita-0.1.0/.github/workflows/ci.yml +28 -0
  5. splita-0.1.0/.github/workflows/docs.yml +24 -0
  6. splita-0.1.0/.gitignore +21 -0
  7. splita-0.1.0/.pre-commit-config.yaml +7 -0
  8. splita-0.1.0/.python-version +1 -0
  9. splita-0.1.0/CHANGELOG.md +22 -0
  10. splita-0.1.0/CODE_OF_CONDUCT.md +55 -0
  11. splita-0.1.0/CONTRIBUTING.md +79 -0
  12. splita-0.1.0/LICENSE +21 -0
  13. splita-0.1.0/PKG-INFO +508 -0
  14. splita-0.1.0/README.md +458 -0
  15. splita-0.1.0/SECURITY.md +31 -0
  16. splita-0.1.0/docs/api/index.md +185 -0
  17. splita-0.1.0/docs/benchmarks.md +158 -0
  18. splita-0.1.0/docs/comparison.md +121 -0
  19. splita-0.1.0/docs/contributing.md +46 -0
  20. splita-0.1.0/docs/cookbook/ecommerce.md +172 -0
  21. splita-0.1.0/docs/cookbook/marketplace.md +171 -0
  22. splita-0.1.0/docs/cookbook/mobile.md +197 -0
  23. splita-0.1.0/docs/cookbook/subscription.md +163 -0
  24. splita-0.1.0/docs/getting-started/concepts.md +129 -0
  25. splita-0.1.0/docs/getting-started/installation.md +82 -0
  26. splita-0.1.0/docs/getting-started/quickstart.md +121 -0
  27. splita-0.1.0/docs/guide/bandits.md +157 -0
  28. splita-0.1.0/docs/guide/bayesian.md +153 -0
  29. splita-0.1.0/docs/guide/causal.md +201 -0
  30. splita-0.1.0/docs/guide/data-quality.md +115 -0
  31. splita-0.1.0/docs/guide/experiment.md +181 -0
  32. splita-0.1.0/docs/guide/planning.md +125 -0
  33. splita-0.1.0/docs/guide/sequential.md +185 -0
  34. splita-0.1.0/docs/guide/variance-reduction.md +196 -0
  35. splita-0.1.0/docs/index.md +81 -0
  36. splita-0.1.0/docs/references.md +120 -0
  37. splita-0.1.0/examples/kaggle_patterns.py +363 -0
  38. splita-0.1.0/examples/quickstart.py +134 -0
  39. splita-0.1.0/examples/real_world_validation.py +613 -0
  40. splita-0.1.0/mkdocs.yml +56 -0
  41. splita-0.1.0/pyproject.toml +116 -0
  42. splita-0.1.0/src/splita/__init__.py +73 -0
  43. splita-0.1.0/src/splita/__main__.py +5 -0
  44. splita-0.1.0/src/splita/_advisory.py +199 -0
  45. splita-0.1.0/src/splita/_experimental.py +17 -0
  46. splita-0.1.0/src/splita/_playground_app.py +680 -0
  47. splita-0.1.0/src/splita/_types.py +5112 -0
  48. splita-0.1.0/src/splita/_utils.py +307 -0
  49. splita-0.1.0/src/splita/_validation.py +538 -0
  50. splita-0.1.0/src/splita/audit_trail.py +133 -0
  51. splita-0.1.0/src/splita/auto.py +306 -0
  52. splita-0.1.0/src/splita/bandits/__init__.py +7 -0
  53. splita-0.1.0/src/splita/bandits/bayesian_stopping.py +176 -0
  54. splita-0.1.0/src/splita/bandits/lints.py +260 -0
  55. splita-0.1.0/src/splita/bandits/linucb.py +258 -0
  56. splita-0.1.0/src/splita/bandits/offline_evaluation.py +225 -0
  57. splita-0.1.0/src/splita/bandits/thompson.py +359 -0
  58. splita-0.1.0/src/splita/causal/__init__.py +41 -0
  59. splita-0.1.0/src/splita/causal/bipartite.py +230 -0
  60. splita-0.1.0/src/splita/causal/cluster.py +252 -0
  61. splita-0.1.0/src/splita/causal/continuous_treatment.py +255 -0
  62. splita-0.1.0/src/splita/causal/did.py +171 -0
  63. splita-0.1.0/src/splita/causal/doubly_robust.py +244 -0
  64. splita-0.1.0/src/splita/causal/dynamic_effects.py +240 -0
  65. splita-0.1.0/src/splita/causal/geo_experiment.py +206 -0
  66. splita-0.1.0/src/splita/causal/instrumental_variables.py +190 -0
  67. splita-0.1.0/src/splita/causal/interference.py +261 -0
  68. splita-0.1.0/src/splita/causal/marketplace.py +255 -0
  69. splita-0.1.0/src/splita/causal/mediation.py +231 -0
  70. splita-0.1.0/src/splita/causal/propensity_matching.py +334 -0
  71. splita-0.1.0/src/splita/causal/rdd.py +216 -0
  72. splita-0.1.0/src/splita/causal/surrogate.py +221 -0
  73. splita-0.1.0/src/splita/causal/surrogate_index.py +298 -0
  74. splita-0.1.0/src/splita/causal/switchback.py +206 -0
  75. splita-0.1.0/src/splita/causal/synthetic_control.py +247 -0
  76. splita-0.1.0/src/splita/causal/tmle.py +228 -0
  77. splita-0.1.0/src/splita/causal/transportability.py +204 -0
  78. splita-0.1.0/src/splita/check.py +276 -0
  79. splita-0.1.0/src/splita/compare.py +123 -0
  80. splita-0.1.0/src/splita/core/__init__.py +50 -0
  81. splita-0.1.0/src/splita/core/bayesian.py +244 -0
  82. splita-0.1.0/src/splita/core/causal_forest.py +425 -0
  83. splita-0.1.0/src/splita/core/correction.py +237 -0
  84. splita-0.1.0/src/splita/core/dilution.py +109 -0
  85. splita-0.1.0/src/splita/core/experiment.py +740 -0
  86. splita-0.1.0/src/splita/core/funnel.py +229 -0
  87. splita-0.1.0/src/splita/core/hte.py +315 -0
  88. splita-0.1.0/src/splita/core/interleaving.py +260 -0
  89. splita-0.1.0/src/splita/core/metric_decomposition.py +165 -0
  90. splita-0.1.0/src/splita/core/mixed_effects.py +240 -0
  91. splita-0.1.0/src/splita/core/multi_objective.py +198 -0
  92. splita-0.1.0/src/splita/core/objective_bayesian.py +192 -0
  93. splita-0.1.0/src/splita/core/oec.py +194 -0
  94. splita-0.1.0/src/splita/core/optimal_proxy.py +210 -0
  95. splita-0.1.0/src/splita/core/permutation.py +136 -0
  96. splita-0.1.0/src/splita/core/power_simulation.py +231 -0
  97. splita-0.1.0/src/splita/core/quantile.py +211 -0
  98. splita-0.1.0/src/splita/core/risk_aware.py +205 -0
  99. splita-0.1.0/src/splita/core/sample_size.py +565 -0
  100. splita-0.1.0/src/splita/core/srm.py +211 -0
  101. splita-0.1.0/src/splita/core/stratified.py +255 -0
  102. splita-0.1.0/src/splita/core/survival.py +304 -0
  103. splita-0.1.0/src/splita/core/triggered.py +322 -0
  104. splita-0.1.0/src/splita/datasets/__init__.py +26 -0
  105. splita-0.1.0/src/splita/datasets/generators.py +373 -0
  106. splita-0.1.0/src/splita/design/__init__.py +20 -0
  107. splita-0.1.0/src/splita/design/adaptive_enrichment.py +208 -0
  108. splita-0.1.0/src/splita/design/bayesian_optimization.py +280 -0
  109. splita-0.1.0/src/splita/design/budget_split.py +172 -0
  110. splita-0.1.0/src/splita/design/factorial.py +349 -0
  111. splita-0.1.0/src/splita/design/pairwise.py +192 -0
  112. splita-0.1.0/src/splita/design/response_adaptive.py +199 -0
  113. splita-0.1.0/src/splita/diagnose.py +178 -0
  114. splita-0.1.0/src/splita/diagnostics/__init__.py +28 -0
  115. splita-0.1.0/src/splita/diagnostics/aa_test.py +149 -0
  116. splita-0.1.0/src/splita/diagnostics/carryover.py +136 -0
  117. splita-0.1.0/src/splita/diagnostics/effect_timeseries.py +208 -0
  118. splita-0.1.0/src/splita/diagnostics/flicker.py +189 -0
  119. splita-0.1.0/src/splita/diagnostics/nonstationarity.py +292 -0
  120. splita-0.1.0/src/splita/diagnostics/novelty.py +257 -0
  121. splita-0.1.0/src/splita/diagnostics/phacking.py +181 -0
  122. splita-0.1.0/src/splita/diagnostics/pre_experiment.py +262 -0
  123. splita-0.1.0/src/splita/diagnostics/randomization.py +181 -0
  124. splita-0.1.0/src/splita/errors.py +43 -0
  125. splita-0.1.0/src/splita/explain.py +974 -0
  126. splita-0.1.0/src/splita/export/__init__.py +10 -0
  127. splita-0.1.0/src/splita/export/latex.py +153 -0
  128. splita-0.1.0/src/splita/governance/__init__.py +12 -0
  129. splita-0.1.0/src/splita/governance/conflict.py +233 -0
  130. splita-0.1.0/src/splita/governance/guardrail.py +214 -0
  131. splita-0.1.0/src/splita/governance/registry.py +227 -0
  132. splita-0.1.0/src/splita/integrations/__init__.py +1 -0
  133. splita-0.1.0/src/splita/integrations/migrate.py +195 -0
  134. splita-0.1.0/src/splita/integrations/notify.py +168 -0
  135. splita-0.1.0/src/splita/integrations/pandas_accessor.py +115 -0
  136. splita-0.1.0/src/splita/integrations/polars_support.py +52 -0
  137. splita-0.1.0/src/splita/log.py +123 -0
  138. splita-0.1.0/src/splita/meta_analysis.py +160 -0
  139. splita-0.1.0/src/splita/monitor.py +217 -0
  140. splita-0.1.0/src/splita/playground.py +58 -0
  141. splita-0.1.0/src/splita/plugins.py +102 -0
  142. splita-0.1.0/src/splita/power_report.py +287 -0
  143. splita-0.1.0/src/splita/py.typed +0 -0
  144. splita-0.1.0/src/splita/recommend.py +357 -0
  145. splita-0.1.0/src/splita/report.py +502 -0
  146. splita-0.1.0/src/splita/sequential/__init__.py +17 -0
  147. splita-0.1.0/src/splita/sequential/confidence_sequence.py +305 -0
  148. splita-0.1.0/src/splita/sequential/evalue.py +280 -0
  149. splita-0.1.0/src/splita/sequential/group_sequential.py +441 -0
  150. splita-0.1.0/src/splita/sequential/msprt.py +346 -0
  151. splita-0.1.0/src/splita/sequential/safe_testing.py +319 -0
  152. splita-0.1.0/src/splita/sequential/sample_size_reest.py +144 -0
  153. splita-0.1.0/src/splita/sequential/yeast.py +209 -0
  154. splita-0.1.0/src/splita/serve.py +197 -0
  155. splita-0.1.0/src/splita/simulate.py +165 -0
  156. splita-0.1.0/src/splita/variance/__init__.py +33 -0
  157. splita-0.1.0/src/splita/variance/adaptive_winsorization.py +275 -0
  158. splita-0.1.0/src/splita/variance/cluster_bootstrap.py +194 -0
  159. splita-0.1.0/src/splita/variance/cupac.py +586 -0
  160. splita-0.1.0/src/splita/variance/cuped.py +352 -0
  161. splita-0.1.0/src/splita/variance/double_ml.py +304 -0
  162. splita-0.1.0/src/splita/variance/inex.py +213 -0
  163. splita-0.1.0/src/splita/variance/multivariate_cuped.py +360 -0
  164. splita-0.1.0/src/splita/variance/nonstationary.py +137 -0
  165. splita-0.1.0/src/splita/variance/outliers.py +379 -0
  166. splita-0.1.0/src/splita/variance/post_stratification.py +190 -0
  167. splita-0.1.0/src/splita/variance/ppi.py +119 -0
  168. splita-0.1.0/src/splita/variance/regression_adjustment.py +257 -0
  169. splita-0.1.0/src/splita/variance/robust_estimators.py +242 -0
  170. splita-0.1.0/src/splita/variance/trimmed_mean.py +166 -0
  171. splita-0.1.0/src/splita/verbose.py +33 -0
  172. splita-0.1.0/src/splita/viz/__init__.py +21 -0
  173. splita-0.1.0/src/splita/viz/plots.py +304 -0
  174. splita-0.1.0/src/splita/what_if.py +233 -0
  175. splita-0.1.0/src/splita/widget.py +151 -0
  176. splita-0.1.0/tests/bandits/test_bayesian_stopping.py +194 -0
  177. splita-0.1.0/tests/bandits/test_lints.py +297 -0
  178. splita-0.1.0/tests/bandits/test_linucb.py +182 -0
  179. splita-0.1.0/tests/bandits/test_offline_evaluation.py +205 -0
  180. splita-0.1.0/tests/bandits/test_thompson.py +429 -0
  181. splita-0.1.0/tests/causal/test_bipartite.py +148 -0
  182. splita-0.1.0/tests/causal/test_cluster.py +322 -0
  183. splita-0.1.0/tests/causal/test_continuous_treatment.py +176 -0
  184. splita-0.1.0/tests/causal/test_did.py +243 -0
  185. splita-0.1.0/tests/causal/test_doubly_robust.py +112 -0
  186. splita-0.1.0/tests/causal/test_dynamic_effects.py +141 -0
  187. splita-0.1.0/tests/causal/test_geo_experiment.py +125 -0
  188. splita-0.1.0/tests/causal/test_instrumental_variables.py +202 -0
  189. splita-0.1.0/tests/causal/test_interference.py +251 -0
  190. splita-0.1.0/tests/causal/test_marketplace.py +150 -0
  191. splita-0.1.0/tests/causal/test_mediation.py +174 -0
  192. splita-0.1.0/tests/causal/test_propensity_matching.py +218 -0
  193. splita-0.1.0/tests/causal/test_rdd.py +128 -0
  194. splita-0.1.0/tests/causal/test_surrogate.py +186 -0
  195. splita-0.1.0/tests/causal/test_surrogate_index.py +265 -0
  196. splita-0.1.0/tests/causal/test_switchback.py +217 -0
  197. splita-0.1.0/tests/causal/test_synthetic_control.py +300 -0
  198. splita-0.1.0/tests/causal/test_tmle.py +130 -0
  199. splita-0.1.0/tests/causal/test_transportability.py +131 -0
  200. splita-0.1.0/tests/conftest.py +35 -0
  201. splita-0.1.0/tests/core/test_bayesian.py +416 -0
  202. splita-0.1.0/tests/core/test_causal_forest.py +273 -0
  203. splita-0.1.0/tests/core/test_correction.py +346 -0
  204. splita-0.1.0/tests/core/test_dilution.py +119 -0
  205. splita-0.1.0/tests/core/test_experiment.py +748 -0
  206. splita-0.1.0/tests/core/test_funnel.py +233 -0
  207. splita-0.1.0/tests/core/test_hte.py +248 -0
  208. splita-0.1.0/tests/core/test_interleaving.py +181 -0
  209. splita-0.1.0/tests/core/test_metric_decomposition.py +122 -0
  210. splita-0.1.0/tests/core/test_mixed_effects.py +188 -0
  211. splita-0.1.0/tests/core/test_multi_objective.py +342 -0
  212. splita-0.1.0/tests/core/test_objective_bayesian.py +114 -0
  213. splita-0.1.0/tests/core/test_oec.py +231 -0
  214. splita-0.1.0/tests/core/test_optimal_proxy.py +122 -0
  215. splita-0.1.0/tests/core/test_permutation.py +256 -0
  216. splita-0.1.0/tests/core/test_power_simulation.py +359 -0
  217. splita-0.1.0/tests/core/test_quantile.py +452 -0
  218. splita-0.1.0/tests/core/test_risk_aware.py +121 -0
  219. splita-0.1.0/tests/core/test_sample_size.py +381 -0
  220. splita-0.1.0/tests/core/test_scenarios.py +2562 -0
  221. splita-0.1.0/tests/core/test_srm.py +263 -0
  222. splita-0.1.0/tests/core/test_stratified.py +374 -0
  223. splita-0.1.0/tests/core/test_survival.py +189 -0
  224. splita-0.1.0/tests/core/test_triggered.py +301 -0
  225. splita-0.1.0/tests/design/test_adaptive_enrichment.py +146 -0
  226. splita-0.1.0/tests/design/test_bayesian_optimization.py +133 -0
  227. splita-0.1.0/tests/design/test_budget_split.py +118 -0
  228. splita-0.1.0/tests/design/test_factorial.py +181 -0
  229. splita-0.1.0/tests/design/test_pairwise.py +182 -0
  230. splita-0.1.0/tests/design/test_response_adaptive.py +181 -0
  231. splita-0.1.0/tests/diagnostics/test_aa.py +210 -0
  232. splita-0.1.0/tests/diagnostics/test_carryover.py +156 -0
  233. splita-0.1.0/tests/diagnostics/test_flicker.py +180 -0
  234. splita-0.1.0/tests/diagnostics/test_nonstationarity.py +278 -0
  235. splita-0.1.0/tests/diagnostics/test_novelty.py +273 -0
  236. splita-0.1.0/tests/diagnostics/test_phacking.py +110 -0
  237. splita-0.1.0/tests/diagnostics/test_pre_experiment.py +159 -0
  238. splita-0.1.0/tests/diagnostics/test_randomization.py +237 -0
  239. splita-0.1.0/tests/diagnostics/test_timeseries.py +309 -0
  240. splita-0.1.0/tests/governance/test_conflict.py +245 -0
  241. splita-0.1.0/tests/governance/test_guardrail.py +227 -0
  242. splita-0.1.0/tests/governance/test_registry.py +167 -0
  243. splita-0.1.0/tests/sequential/test_confidence_sequence.py +425 -0
  244. splita-0.1.0/tests/sequential/test_evalue.py +235 -0
  245. splita-0.1.0/tests/sequential/test_group_sequential.py +354 -0
  246. splita-0.1.0/tests/sequential/test_msprt.py +501 -0
  247. splita-0.1.0/tests/sequential/test_safe_testing.py +385 -0
  248. splita-0.1.0/tests/sequential/test_sample_size_reest.py +131 -0
  249. splita-0.1.0/tests/sequential/test_yeast.py +123 -0
  250. splita-0.1.0/tests/test_advisory.py +336 -0
  251. splita-0.1.0/tests/test_audit_trail.py +166 -0
  252. splita-0.1.0/tests/test_auto.py +231 -0
  253. splita-0.1.0/tests/test_check.py +190 -0
  254. splita-0.1.0/tests/test_compare.py +180 -0
  255. splita-0.1.0/tests/test_coverage_gaps.py +870 -0
  256. splita-0.1.0/tests/test_coverage_gaps2.py +358 -0
  257. splita-0.1.0/tests/test_datasets.py +242 -0
  258. splita-0.1.0/tests/test_diagnose.py +220 -0
  259. splita-0.1.0/tests/test_errors.py +23 -0
  260. splita-0.1.0/tests/test_explain.py +1121 -0
  261. splita-0.1.0/tests/test_latex_export.py +122 -0
  262. splita-0.1.0/tests/test_log.py +120 -0
  263. splita-0.1.0/tests/test_meta_analysis.py +120 -0
  264. splita-0.1.0/tests/test_migrate.py +134 -0
  265. splita-0.1.0/tests/test_monitor.py +164 -0
  266. splita-0.1.0/tests/test_multilingual_explain.py +312 -0
  267. splita-0.1.0/tests/test_notify.py +161 -0
  268. splita-0.1.0/tests/test_pandas_accessor.py +102 -0
  269. splita-0.1.0/tests/test_performance.py +119 -0
  270. splita-0.1.0/tests/test_playground.py +48 -0
  271. splita-0.1.0/tests/test_plugins.py +118 -0
  272. splita-0.1.0/tests/test_polars_support.py +51 -0
  273. splita-0.1.0/tests/test_power_report.py +99 -0
  274. splita-0.1.0/tests/test_recommend.py +208 -0
  275. splita-0.1.0/tests/test_report.py +254 -0
  276. splita-0.1.0/tests/test_serve.py +152 -0
  277. splita-0.1.0/tests/test_simulate.py +139 -0
  278. splita-0.1.0/tests/test_smoke.py +315 -0
  279. splita-0.1.0/tests/test_statistical_audit.py +1565 -0
  280. splita-0.1.0/tests/test_types.py +678 -0
  281. splita-0.1.0/tests/test_utils.py +239 -0
  282. splita-0.1.0/tests/test_validation.py +326 -0
  283. splita-0.1.0/tests/test_what_if.py +162 -0
  284. splita-0.1.0/tests/test_widget.py +27 -0
  285. splita-0.1.0/tests/variance/test_adaptive_winsorization.py +295 -0
  286. splita-0.1.0/tests/variance/test_cluster_bootstrap.py +225 -0
  287. splita-0.1.0/tests/variance/test_cupac.py +560 -0
  288. splita-0.1.0/tests/variance/test_cuped.py +355 -0
  289. splita-0.1.0/tests/variance/test_double_ml.py +371 -0
  290. splita-0.1.0/tests/variance/test_inex.py +131 -0
  291. splita-0.1.0/tests/variance/test_multivariate_cuped.py +323 -0
  292. splita-0.1.0/tests/variance/test_nonstationary_adj.py +118 -0
  293. splita-0.1.0/tests/variance/test_outliers.py +528 -0
  294. splita-0.1.0/tests/variance/test_post_stratification.py +212 -0
  295. splita-0.1.0/tests/variance/test_ppi.py +125 -0
  296. splita-0.1.0/tests/variance/test_regression_adjustment.py +456 -0
  297. splita-0.1.0/tests/variance/test_robust_estimators.py +166 -0
  298. splita-0.1.0/tests/variance/test_trimmed_mean.py +210 -0
  299. splita-0.1.0/tests/viz/test_plots.py +226 -0
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug in splita
4
+ title: "[BUG] "
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Describe the bug
10
+ A clear and concise description of the bug.
11
+
12
+ ## To reproduce
13
+ Steps to reproduce the behaviour:
14
+
15
+ ```python
16
+ # Minimal code example that triggers the bug
17
+ ```
18
+
19
+ ## Expected behaviour
20
+ What you expected to happen.
21
+
22
+ ## Actual behaviour
23
+ What actually happened. Include the full traceback if applicable.
24
+
25
+ ## Environment
26
+ - splita version:
27
+ - Python version:
28
+ - OS:
29
+ - NumPy version:
30
+ - SciPy version:
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or improvement
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Problem
10
+ What problem does this feature solve? What use case does it address?
11
+
12
+ ## Proposed solution
13
+ Describe the API or behaviour you'd like to see.
14
+
15
+ ```python
16
+ # Example usage of the proposed feature
17
+ ```
18
+
19
+ ## Alternatives considered
20
+ Any alternative solutions or workarounds you've considered.
21
+
22
+ ## References
23
+ Links to papers, blog posts, or other implementations if applicable.
@@ -0,0 +1,7 @@
1
+ ## What does this PR do?
2
+
3
+ ## Checklist
4
+ - [ ] Tests pass (`pytest tests/`)
5
+ - [ ] Lint passes (`ruff check src/`)
6
+ - [ ] Docstrings added for new public functions
7
+ - [ ] CHANGELOG.md updated (if user-facing change)
@@ -0,0 +1,28 @@
1
+ name: CI
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ lint:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: actions/setup-python@v5
10
+ with:
11
+ python-version: "3.12"
12
+ - run: pip install ruff
13
+ - run: ruff check src/
14
+ - run: ruff format --check src/
15
+
16
+ test:
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ matrix:
20
+ python-version: ["3.10", "3.11", "3.12"]
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+ - run: pip install -e ".[ml]"
27
+ - run: pip install pytest pytest-cov
28
+ - run: pytest tests/ -q --tb=short -x -p no:cacheprovider
@@ -0,0 +1,24 @@
1
+ name: Deploy Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ deploy:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+ - run: pip install mkdocs-material
21
+ - run: |
22
+ git config user.name "github-actions[bot]"
23
+ git config user.email "github-actions[bot]@users.noreply.github.com"
24
+ mkdocs gh-deploy --force
@@ -0,0 +1,21 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .mypy_cache/
10
+ .ruff_cache/
11
+ .pytest_cache/
12
+ .coverage
13
+ .coverage.*
14
+ htmlcov/
15
+ .venv/
16
+ venv/
17
+ *.so
18
+ .DS_Store
19
+ splita_api_spec.docx
20
+ .internal/
21
+ dist/
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.9.10
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
@@ -0,0 +1 @@
1
+ 3.10
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-03-15
9
+
10
+ ### Added
11
+
12
+ - Core experimentation engine (`Experiment`, `BayesianExperiment`, `QuantileExperiment`).
13
+ - Sequential testing methods (`mSPRT`, `EValue`, `EProcess`, `GroupSequential`, `ConfidenceSequence`, `YEAST`).
14
+ - Variance reduction techniques (`CUPED`, `CUPAC`, `DoubleML`, `PostStratification`, `RegressionAdjustment`).
15
+ - Causal inference suite (`DifferenceInDifferences`, `SyntheticControl`, `CausalForest`, `TMLE`, `DoublyRobustEstimator`).
16
+ - Experiment diagnostics (`AATest`, `SRMCheck`, `FlickerDetector`, `NoveltyCurve`, `PHackingDetector`).
17
+ - Multi-armed bandit algorithms (`ThompsonSampler`, `LinUCB`, `LinTS`).
18
+ - Experiment design helpers (`FractionalFactorialDesign`, `PairwiseDesign`, `BudgetSplitDesign`).
19
+ - Governance layer (`ExperimentRegistry`, `GuardrailMonitor`, `ConflictDetector`).
20
+ - Structured exception hierarchy (`errors.py`).
21
+ - Frozen dataclass result types for all public APIs.
22
+ - Comprehensive validation utilities (`_validation.py`).
@@ -0,0 +1,55 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behaviour that contributes to a positive environment:
18
+
19
+ - Using welcoming and inclusive language
20
+ - Being respectful of differing viewpoints and experiences
21
+ - Gracefully accepting constructive criticism
22
+ - Focusing on what is best for the community
23
+ - Showing empathy towards other community members
24
+
25
+ Examples of unacceptable behaviour:
26
+
27
+ - The use of sexualized language or imagery, and sexual attention or advances of any kind
28
+ - Trolling, insulting or derogatory comments, and personal or political attacks
29
+ - Public or private harassment
30
+ - Publishing others' private information without explicit permission
31
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
32
+
33
+ ## Enforcement Responsibilities
34
+
35
+ Community leaders are responsible for clarifying and enforcing our standards of
36
+ acceptable behaviour and will take appropriate and fair corrective action in
37
+ response to any behaviour that they deem inappropriate, threatening, offensive,
38
+ or harmful.
39
+
40
+ ## Scope
41
+
42
+ This Code of Conduct applies within all community spaces, and also applies when
43
+ an individual is officially representing the community in public spaces.
44
+
45
+ ## Enforcement
46
+
47
+ Instances of abusive, harassing, or otherwise unacceptable behaviour may be
48
+ reported to the project maintainers. All complaints will be reviewed and
49
+ investigated promptly and fairly.
50
+
51
+ ## Attribution
52
+
53
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
54
+ version 2.0, available at
55
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
@@ -0,0 +1,79 @@
1
+ # Contributing to splita
2
+
3
+ Thank you for your interest in contributing to splita! This guide will help you get started.
4
+
5
+ ## Development setup
6
+
7
+ ```bash
8
+ # Clone the repo
9
+ git clone https://github.com/Naareman/splita.git
10
+ cd splita
11
+
12
+ # Create a virtual environment
13
+ python -m venv .venv
14
+ source .venv/bin/activate
15
+
16
+ # Install in editable mode with dev dependencies
17
+ pip install -e ".[dev,ml]"
18
+
19
+ # Install pre-commit hooks
20
+ pre-commit install
21
+ ```
22
+
23
+ ## Running checks
24
+
25
+ ```bash
26
+ # Lint
27
+ ruff check src/ tests/
28
+
29
+ # Format
30
+ ruff format src/ tests/
31
+
32
+ # Type check
33
+ mypy src/splita/
34
+
35
+ # Tests
36
+ pytest
37
+
38
+ # Tests with coverage
39
+ pytest --cov=splita --cov-report=term-missing
40
+ ```
41
+
42
+ ## Pull request guidelines
43
+
44
+ 1. **Fork and branch.** Create a feature branch from `main` (e.g. `feat/my-feature` or `fix/issue-42`).
45
+ 2. **Write tests first.** Every public method needs tests covering the happy path, edge cases, and validation errors.
46
+ 3. **Follow existing patterns.** Look at similar classes in the codebase for API conventions.
47
+ 4. **Keep PRs focused.** One feature or fix per PR. Small PRs are reviewed faster.
48
+ 5. **Write a clear description.** Explain what the PR does and why, not just what files changed.
49
+
50
+ ## Code style
51
+
52
+ - **Python 3.10+** type hints: use `X | Y`, not `Optional[X]` or `Union[X, Y]`.
53
+ - **NumPy docstrings** (numpydoc format) on all public APIs.
54
+ - **snake_case** everywhere, no exceptions.
55
+ - **Frozen dataclasses** for all result types, with `.to_dict()`.
56
+ - **Keyword-only** config args (after positional data args).
57
+ - **Error messages** follow the 3-part structure: Problem, Detail, Hint.
58
+
59
+ ```python
60
+ raise ValueError(
61
+ "`alpha` must be in (0, 1), got 1.5.\n"
62
+ " Detail: alpha=1.5 means a 150% false positive rate, which is not meaningful.\n"
63
+ " Hint: typical values are 0.05, 0.01, or 0.10."
64
+ )
65
+ ```
66
+
67
+ ## Test conventions
68
+
69
+ - Mirror the `src/` structure in `tests/` (e.g. `src/splita/core/` -> `tests/core/`).
70
+ - Test file names: `test_<module>.py`.
71
+ - Use `pytest` fixtures for shared setup.
72
+ - Statistical correctness tests: compare against `scipy.stats` or known analytic solutions.
73
+ - Every `ValueError` / `TypeError` validation path must have a test.
74
+
75
+ ## Dependencies
76
+
77
+ - **Required:** numpy, scipy. Nothing else.
78
+ - **Optional:** scikit-learn (for CUPAC/ML features only).
79
+ - Do not add new dependencies without discussion in an issue first.
splita-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nareman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.