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.
- splita-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
- splita-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- splita-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +7 -0
- splita-0.1.0/.github/workflows/ci.yml +28 -0
- splita-0.1.0/.github/workflows/docs.yml +24 -0
- splita-0.1.0/.gitignore +21 -0
- splita-0.1.0/.pre-commit-config.yaml +7 -0
- splita-0.1.0/.python-version +1 -0
- splita-0.1.0/CHANGELOG.md +22 -0
- splita-0.1.0/CODE_OF_CONDUCT.md +55 -0
- splita-0.1.0/CONTRIBUTING.md +79 -0
- splita-0.1.0/LICENSE +21 -0
- splita-0.1.0/PKG-INFO +508 -0
- splita-0.1.0/README.md +458 -0
- splita-0.1.0/SECURITY.md +31 -0
- splita-0.1.0/docs/api/index.md +185 -0
- splita-0.1.0/docs/benchmarks.md +158 -0
- splita-0.1.0/docs/comparison.md +121 -0
- splita-0.1.0/docs/contributing.md +46 -0
- splita-0.1.0/docs/cookbook/ecommerce.md +172 -0
- splita-0.1.0/docs/cookbook/marketplace.md +171 -0
- splita-0.1.0/docs/cookbook/mobile.md +197 -0
- splita-0.1.0/docs/cookbook/subscription.md +163 -0
- splita-0.1.0/docs/getting-started/concepts.md +129 -0
- splita-0.1.0/docs/getting-started/installation.md +82 -0
- splita-0.1.0/docs/getting-started/quickstart.md +121 -0
- splita-0.1.0/docs/guide/bandits.md +157 -0
- splita-0.1.0/docs/guide/bayesian.md +153 -0
- splita-0.1.0/docs/guide/causal.md +201 -0
- splita-0.1.0/docs/guide/data-quality.md +115 -0
- splita-0.1.0/docs/guide/experiment.md +181 -0
- splita-0.1.0/docs/guide/planning.md +125 -0
- splita-0.1.0/docs/guide/sequential.md +185 -0
- splita-0.1.0/docs/guide/variance-reduction.md +196 -0
- splita-0.1.0/docs/index.md +81 -0
- splita-0.1.0/docs/references.md +120 -0
- splita-0.1.0/examples/kaggle_patterns.py +363 -0
- splita-0.1.0/examples/quickstart.py +134 -0
- splita-0.1.0/examples/real_world_validation.py +613 -0
- splita-0.1.0/mkdocs.yml +56 -0
- splita-0.1.0/pyproject.toml +116 -0
- splita-0.1.0/src/splita/__init__.py +73 -0
- splita-0.1.0/src/splita/__main__.py +5 -0
- splita-0.1.0/src/splita/_advisory.py +199 -0
- splita-0.1.0/src/splita/_experimental.py +17 -0
- splita-0.1.0/src/splita/_playground_app.py +680 -0
- splita-0.1.0/src/splita/_types.py +5112 -0
- splita-0.1.0/src/splita/_utils.py +307 -0
- splita-0.1.0/src/splita/_validation.py +538 -0
- splita-0.1.0/src/splita/audit_trail.py +133 -0
- splita-0.1.0/src/splita/auto.py +306 -0
- splita-0.1.0/src/splita/bandits/__init__.py +7 -0
- splita-0.1.0/src/splita/bandits/bayesian_stopping.py +176 -0
- splita-0.1.0/src/splita/bandits/lints.py +260 -0
- splita-0.1.0/src/splita/bandits/linucb.py +258 -0
- splita-0.1.0/src/splita/bandits/offline_evaluation.py +225 -0
- splita-0.1.0/src/splita/bandits/thompson.py +359 -0
- splita-0.1.0/src/splita/causal/__init__.py +41 -0
- splita-0.1.0/src/splita/causal/bipartite.py +230 -0
- splita-0.1.0/src/splita/causal/cluster.py +252 -0
- splita-0.1.0/src/splita/causal/continuous_treatment.py +255 -0
- splita-0.1.0/src/splita/causal/did.py +171 -0
- splita-0.1.0/src/splita/causal/doubly_robust.py +244 -0
- splita-0.1.0/src/splita/causal/dynamic_effects.py +240 -0
- splita-0.1.0/src/splita/causal/geo_experiment.py +206 -0
- splita-0.1.0/src/splita/causal/instrumental_variables.py +190 -0
- splita-0.1.0/src/splita/causal/interference.py +261 -0
- splita-0.1.0/src/splita/causal/marketplace.py +255 -0
- splita-0.1.0/src/splita/causal/mediation.py +231 -0
- splita-0.1.0/src/splita/causal/propensity_matching.py +334 -0
- splita-0.1.0/src/splita/causal/rdd.py +216 -0
- splita-0.1.0/src/splita/causal/surrogate.py +221 -0
- splita-0.1.0/src/splita/causal/surrogate_index.py +298 -0
- splita-0.1.0/src/splita/causal/switchback.py +206 -0
- splita-0.1.0/src/splita/causal/synthetic_control.py +247 -0
- splita-0.1.0/src/splita/causal/tmle.py +228 -0
- splita-0.1.0/src/splita/causal/transportability.py +204 -0
- splita-0.1.0/src/splita/check.py +276 -0
- splita-0.1.0/src/splita/compare.py +123 -0
- splita-0.1.0/src/splita/core/__init__.py +50 -0
- splita-0.1.0/src/splita/core/bayesian.py +244 -0
- splita-0.1.0/src/splita/core/causal_forest.py +425 -0
- splita-0.1.0/src/splita/core/correction.py +237 -0
- splita-0.1.0/src/splita/core/dilution.py +109 -0
- splita-0.1.0/src/splita/core/experiment.py +740 -0
- splita-0.1.0/src/splita/core/funnel.py +229 -0
- splita-0.1.0/src/splita/core/hte.py +315 -0
- splita-0.1.0/src/splita/core/interleaving.py +260 -0
- splita-0.1.0/src/splita/core/metric_decomposition.py +165 -0
- splita-0.1.0/src/splita/core/mixed_effects.py +240 -0
- splita-0.1.0/src/splita/core/multi_objective.py +198 -0
- splita-0.1.0/src/splita/core/objective_bayesian.py +192 -0
- splita-0.1.0/src/splita/core/oec.py +194 -0
- splita-0.1.0/src/splita/core/optimal_proxy.py +210 -0
- splita-0.1.0/src/splita/core/permutation.py +136 -0
- splita-0.1.0/src/splita/core/power_simulation.py +231 -0
- splita-0.1.0/src/splita/core/quantile.py +211 -0
- splita-0.1.0/src/splita/core/risk_aware.py +205 -0
- splita-0.1.0/src/splita/core/sample_size.py +565 -0
- splita-0.1.0/src/splita/core/srm.py +211 -0
- splita-0.1.0/src/splita/core/stratified.py +255 -0
- splita-0.1.0/src/splita/core/survival.py +304 -0
- splita-0.1.0/src/splita/core/triggered.py +322 -0
- splita-0.1.0/src/splita/datasets/__init__.py +26 -0
- splita-0.1.0/src/splita/datasets/generators.py +373 -0
- splita-0.1.0/src/splita/design/__init__.py +20 -0
- splita-0.1.0/src/splita/design/adaptive_enrichment.py +208 -0
- splita-0.1.0/src/splita/design/bayesian_optimization.py +280 -0
- splita-0.1.0/src/splita/design/budget_split.py +172 -0
- splita-0.1.0/src/splita/design/factorial.py +349 -0
- splita-0.1.0/src/splita/design/pairwise.py +192 -0
- splita-0.1.0/src/splita/design/response_adaptive.py +199 -0
- splita-0.1.0/src/splita/diagnose.py +178 -0
- splita-0.1.0/src/splita/diagnostics/__init__.py +28 -0
- splita-0.1.0/src/splita/diagnostics/aa_test.py +149 -0
- splita-0.1.0/src/splita/diagnostics/carryover.py +136 -0
- splita-0.1.0/src/splita/diagnostics/effect_timeseries.py +208 -0
- splita-0.1.0/src/splita/diagnostics/flicker.py +189 -0
- splita-0.1.0/src/splita/diagnostics/nonstationarity.py +292 -0
- splita-0.1.0/src/splita/diagnostics/novelty.py +257 -0
- splita-0.1.0/src/splita/diagnostics/phacking.py +181 -0
- splita-0.1.0/src/splita/diagnostics/pre_experiment.py +262 -0
- splita-0.1.0/src/splita/diagnostics/randomization.py +181 -0
- splita-0.1.0/src/splita/errors.py +43 -0
- splita-0.1.0/src/splita/explain.py +974 -0
- splita-0.1.0/src/splita/export/__init__.py +10 -0
- splita-0.1.0/src/splita/export/latex.py +153 -0
- splita-0.1.0/src/splita/governance/__init__.py +12 -0
- splita-0.1.0/src/splita/governance/conflict.py +233 -0
- splita-0.1.0/src/splita/governance/guardrail.py +214 -0
- splita-0.1.0/src/splita/governance/registry.py +227 -0
- splita-0.1.0/src/splita/integrations/__init__.py +1 -0
- splita-0.1.0/src/splita/integrations/migrate.py +195 -0
- splita-0.1.0/src/splita/integrations/notify.py +168 -0
- splita-0.1.0/src/splita/integrations/pandas_accessor.py +115 -0
- splita-0.1.0/src/splita/integrations/polars_support.py +52 -0
- splita-0.1.0/src/splita/log.py +123 -0
- splita-0.1.0/src/splita/meta_analysis.py +160 -0
- splita-0.1.0/src/splita/monitor.py +217 -0
- splita-0.1.0/src/splita/playground.py +58 -0
- splita-0.1.0/src/splita/plugins.py +102 -0
- splita-0.1.0/src/splita/power_report.py +287 -0
- splita-0.1.0/src/splita/py.typed +0 -0
- splita-0.1.0/src/splita/recommend.py +357 -0
- splita-0.1.0/src/splita/report.py +502 -0
- splita-0.1.0/src/splita/sequential/__init__.py +17 -0
- splita-0.1.0/src/splita/sequential/confidence_sequence.py +305 -0
- splita-0.1.0/src/splita/sequential/evalue.py +280 -0
- splita-0.1.0/src/splita/sequential/group_sequential.py +441 -0
- splita-0.1.0/src/splita/sequential/msprt.py +346 -0
- splita-0.1.0/src/splita/sequential/safe_testing.py +319 -0
- splita-0.1.0/src/splita/sequential/sample_size_reest.py +144 -0
- splita-0.1.0/src/splita/sequential/yeast.py +209 -0
- splita-0.1.0/src/splita/serve.py +197 -0
- splita-0.1.0/src/splita/simulate.py +165 -0
- splita-0.1.0/src/splita/variance/__init__.py +33 -0
- splita-0.1.0/src/splita/variance/adaptive_winsorization.py +275 -0
- splita-0.1.0/src/splita/variance/cluster_bootstrap.py +194 -0
- splita-0.1.0/src/splita/variance/cupac.py +586 -0
- splita-0.1.0/src/splita/variance/cuped.py +352 -0
- splita-0.1.0/src/splita/variance/double_ml.py +304 -0
- splita-0.1.0/src/splita/variance/inex.py +213 -0
- splita-0.1.0/src/splita/variance/multivariate_cuped.py +360 -0
- splita-0.1.0/src/splita/variance/nonstationary.py +137 -0
- splita-0.1.0/src/splita/variance/outliers.py +379 -0
- splita-0.1.0/src/splita/variance/post_stratification.py +190 -0
- splita-0.1.0/src/splita/variance/ppi.py +119 -0
- splita-0.1.0/src/splita/variance/regression_adjustment.py +257 -0
- splita-0.1.0/src/splita/variance/robust_estimators.py +242 -0
- splita-0.1.0/src/splita/variance/trimmed_mean.py +166 -0
- splita-0.1.0/src/splita/verbose.py +33 -0
- splita-0.1.0/src/splita/viz/__init__.py +21 -0
- splita-0.1.0/src/splita/viz/plots.py +304 -0
- splita-0.1.0/src/splita/what_if.py +233 -0
- splita-0.1.0/src/splita/widget.py +151 -0
- splita-0.1.0/tests/bandits/test_bayesian_stopping.py +194 -0
- splita-0.1.0/tests/bandits/test_lints.py +297 -0
- splita-0.1.0/tests/bandits/test_linucb.py +182 -0
- splita-0.1.0/tests/bandits/test_offline_evaluation.py +205 -0
- splita-0.1.0/tests/bandits/test_thompson.py +429 -0
- splita-0.1.0/tests/causal/test_bipartite.py +148 -0
- splita-0.1.0/tests/causal/test_cluster.py +322 -0
- splita-0.1.0/tests/causal/test_continuous_treatment.py +176 -0
- splita-0.1.0/tests/causal/test_did.py +243 -0
- splita-0.1.0/tests/causal/test_doubly_robust.py +112 -0
- splita-0.1.0/tests/causal/test_dynamic_effects.py +141 -0
- splita-0.1.0/tests/causal/test_geo_experiment.py +125 -0
- splita-0.1.0/tests/causal/test_instrumental_variables.py +202 -0
- splita-0.1.0/tests/causal/test_interference.py +251 -0
- splita-0.1.0/tests/causal/test_marketplace.py +150 -0
- splita-0.1.0/tests/causal/test_mediation.py +174 -0
- splita-0.1.0/tests/causal/test_propensity_matching.py +218 -0
- splita-0.1.0/tests/causal/test_rdd.py +128 -0
- splita-0.1.0/tests/causal/test_surrogate.py +186 -0
- splita-0.1.0/tests/causal/test_surrogate_index.py +265 -0
- splita-0.1.0/tests/causal/test_switchback.py +217 -0
- splita-0.1.0/tests/causal/test_synthetic_control.py +300 -0
- splita-0.1.0/tests/causal/test_tmle.py +130 -0
- splita-0.1.0/tests/causal/test_transportability.py +131 -0
- splita-0.1.0/tests/conftest.py +35 -0
- splita-0.1.0/tests/core/test_bayesian.py +416 -0
- splita-0.1.0/tests/core/test_causal_forest.py +273 -0
- splita-0.1.0/tests/core/test_correction.py +346 -0
- splita-0.1.0/tests/core/test_dilution.py +119 -0
- splita-0.1.0/tests/core/test_experiment.py +748 -0
- splita-0.1.0/tests/core/test_funnel.py +233 -0
- splita-0.1.0/tests/core/test_hte.py +248 -0
- splita-0.1.0/tests/core/test_interleaving.py +181 -0
- splita-0.1.0/tests/core/test_metric_decomposition.py +122 -0
- splita-0.1.0/tests/core/test_mixed_effects.py +188 -0
- splita-0.1.0/tests/core/test_multi_objective.py +342 -0
- splita-0.1.0/tests/core/test_objective_bayesian.py +114 -0
- splita-0.1.0/tests/core/test_oec.py +231 -0
- splita-0.1.0/tests/core/test_optimal_proxy.py +122 -0
- splita-0.1.0/tests/core/test_permutation.py +256 -0
- splita-0.1.0/tests/core/test_power_simulation.py +359 -0
- splita-0.1.0/tests/core/test_quantile.py +452 -0
- splita-0.1.0/tests/core/test_risk_aware.py +121 -0
- splita-0.1.0/tests/core/test_sample_size.py +381 -0
- splita-0.1.0/tests/core/test_scenarios.py +2562 -0
- splita-0.1.0/tests/core/test_srm.py +263 -0
- splita-0.1.0/tests/core/test_stratified.py +374 -0
- splita-0.1.0/tests/core/test_survival.py +189 -0
- splita-0.1.0/tests/core/test_triggered.py +301 -0
- splita-0.1.0/tests/design/test_adaptive_enrichment.py +146 -0
- splita-0.1.0/tests/design/test_bayesian_optimization.py +133 -0
- splita-0.1.0/tests/design/test_budget_split.py +118 -0
- splita-0.1.0/tests/design/test_factorial.py +181 -0
- splita-0.1.0/tests/design/test_pairwise.py +182 -0
- splita-0.1.0/tests/design/test_response_adaptive.py +181 -0
- splita-0.1.0/tests/diagnostics/test_aa.py +210 -0
- splita-0.1.0/tests/diagnostics/test_carryover.py +156 -0
- splita-0.1.0/tests/diagnostics/test_flicker.py +180 -0
- splita-0.1.0/tests/diagnostics/test_nonstationarity.py +278 -0
- splita-0.1.0/tests/diagnostics/test_novelty.py +273 -0
- splita-0.1.0/tests/diagnostics/test_phacking.py +110 -0
- splita-0.1.0/tests/diagnostics/test_pre_experiment.py +159 -0
- splita-0.1.0/tests/diagnostics/test_randomization.py +237 -0
- splita-0.1.0/tests/diagnostics/test_timeseries.py +309 -0
- splita-0.1.0/tests/governance/test_conflict.py +245 -0
- splita-0.1.0/tests/governance/test_guardrail.py +227 -0
- splita-0.1.0/tests/governance/test_registry.py +167 -0
- splita-0.1.0/tests/sequential/test_confidence_sequence.py +425 -0
- splita-0.1.0/tests/sequential/test_evalue.py +235 -0
- splita-0.1.0/tests/sequential/test_group_sequential.py +354 -0
- splita-0.1.0/tests/sequential/test_msprt.py +501 -0
- splita-0.1.0/tests/sequential/test_safe_testing.py +385 -0
- splita-0.1.0/tests/sequential/test_sample_size_reest.py +131 -0
- splita-0.1.0/tests/sequential/test_yeast.py +123 -0
- splita-0.1.0/tests/test_advisory.py +336 -0
- splita-0.1.0/tests/test_audit_trail.py +166 -0
- splita-0.1.0/tests/test_auto.py +231 -0
- splita-0.1.0/tests/test_check.py +190 -0
- splita-0.1.0/tests/test_compare.py +180 -0
- splita-0.1.0/tests/test_coverage_gaps.py +870 -0
- splita-0.1.0/tests/test_coverage_gaps2.py +358 -0
- splita-0.1.0/tests/test_datasets.py +242 -0
- splita-0.1.0/tests/test_diagnose.py +220 -0
- splita-0.1.0/tests/test_errors.py +23 -0
- splita-0.1.0/tests/test_explain.py +1121 -0
- splita-0.1.0/tests/test_latex_export.py +122 -0
- splita-0.1.0/tests/test_log.py +120 -0
- splita-0.1.0/tests/test_meta_analysis.py +120 -0
- splita-0.1.0/tests/test_migrate.py +134 -0
- splita-0.1.0/tests/test_monitor.py +164 -0
- splita-0.1.0/tests/test_multilingual_explain.py +312 -0
- splita-0.1.0/tests/test_notify.py +161 -0
- splita-0.1.0/tests/test_pandas_accessor.py +102 -0
- splita-0.1.0/tests/test_performance.py +119 -0
- splita-0.1.0/tests/test_playground.py +48 -0
- splita-0.1.0/tests/test_plugins.py +118 -0
- splita-0.1.0/tests/test_polars_support.py +51 -0
- splita-0.1.0/tests/test_power_report.py +99 -0
- splita-0.1.0/tests/test_recommend.py +208 -0
- splita-0.1.0/tests/test_report.py +254 -0
- splita-0.1.0/tests/test_serve.py +152 -0
- splita-0.1.0/tests/test_simulate.py +139 -0
- splita-0.1.0/tests/test_smoke.py +315 -0
- splita-0.1.0/tests/test_statistical_audit.py +1565 -0
- splita-0.1.0/tests/test_types.py +678 -0
- splita-0.1.0/tests/test_utils.py +239 -0
- splita-0.1.0/tests/test_validation.py +326 -0
- splita-0.1.0/tests/test_what_if.py +162 -0
- splita-0.1.0/tests/test_widget.py +27 -0
- splita-0.1.0/tests/variance/test_adaptive_winsorization.py +295 -0
- splita-0.1.0/tests/variance/test_cluster_bootstrap.py +225 -0
- splita-0.1.0/tests/variance/test_cupac.py +560 -0
- splita-0.1.0/tests/variance/test_cuped.py +355 -0
- splita-0.1.0/tests/variance/test_double_ml.py +371 -0
- splita-0.1.0/tests/variance/test_inex.py +131 -0
- splita-0.1.0/tests/variance/test_multivariate_cuped.py +323 -0
- splita-0.1.0/tests/variance/test_nonstationary_adj.py +118 -0
- splita-0.1.0/tests/variance/test_outliers.py +528 -0
- splita-0.1.0/tests/variance/test_post_stratification.py +212 -0
- splita-0.1.0/tests/variance/test_ppi.py +125 -0
- splita-0.1.0/tests/variance/test_regression_adjustment.py +456 -0
- splita-0.1.0/tests/variance/test_robust_estimators.py +166 -0
- splita-0.1.0/tests/variance/test_trimmed_mean.py +210 -0
- 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,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
|
splita-0.1.0/.gitignore
ADDED
|
@@ -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 @@
|
|
|
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.
|