ab-analysis-kit 0.0.1.dev0__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.
- ab_analysis_kit-0.0.1.dev0/LICENSE +21 -0
- ab_analysis_kit-0.0.1.dev0/MANIFEST.in +11 -0
- ab_analysis_kit-0.0.1.dev0/PKG-INFO +126 -0
- ab_analysis_kit-0.0.1.dev0/README.md +61 -0
- ab_analysis_kit-0.0.1.dev0/ab_analysis_kit.egg-info/PKG-INFO +126 -0
- ab_analysis_kit-0.0.1.dev0/ab_analysis_kit.egg-info/SOURCES.txt +128 -0
- ab_analysis_kit-0.0.1.dev0/ab_analysis_kit.egg-info/dependency_links.txt +1 -0
- ab_analysis_kit-0.0.1.dev0/ab_analysis_kit.egg-info/entry_points.txt +2 -0
- ab_analysis_kit-0.0.1.dev0/ab_analysis_kit.egg-info/requires.txt +46 -0
- ab_analysis_kit-0.0.1.dev0/ab_analysis_kit.egg-info/top_level.txt +1 -0
- ab_analysis_kit-0.0.1.dev0/abkit/__init__.py +40 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/__init__.py +1 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/_output.py +111 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/__init__.py +1 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/_context.py +83 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/clean.py +133 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/explore.py +208 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/init.py +427 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/run.py +282 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/unlock.py +59 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/commands/validate.py +264 -0
- ab_analysis_kit-0.0.1.dev0/abkit/cli/main.py +279 -0
- ab_analysis_kit-0.0.1.dev0/abkit/compute/__init__.py +5 -0
- ab_analysis_kit-0.0.1.dev0/abkit/compute/recompute_backend.py +140 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/__init__.py +51 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/discovery.py +168 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/experiment_config.py +511 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/method_config.py +80 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/metric_config.py +214 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/profile.py +301 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/project_config.py +244 -0
- ab_analysis_kit-0.0.1.dev0/abkit/config/validator.py +393 -0
- ab_analysis_kit-0.0.1.dev0/abkit/core/__init__.py +26 -0
- ab_analysis_kit-0.0.1.dev0/abkit/core/interval.py +148 -0
- ab_analysis_kit-0.0.1.dev0/abkit/core/models.py +121 -0
- ab_analysis_kit-0.0.1.dev0/abkit/core/period_planner.py +206 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/__init__.py +51 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/_sql_manager.py +432 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/clickhouse_manager.py +495 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/__init__.py +6 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_aa_runs.py +53 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_base.py +71 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_experiments.py +82 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_exposures.py +163 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_maintenance.py +72 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_results.py +231 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_schema.py +23 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_tasks.py +237 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/_unit_state.py +148 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/internal_tables/manager.py +30 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/manager.py +450 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/mysql_manager.py +175 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/postgres_manager.py +145 -0
- ab_analysis_kit-0.0.1.dev0/abkit/database/tables.py +326 -0
- ab_analysis_kit-0.0.1.dev0/abkit/loaders/__init__.py +28 -0
- ab_analysis_kit-0.0.1.dev0/abkit/loaders/exposure_loader.py +121 -0
- ab_analysis_kit-0.0.1.dev0/abkit/loaders/metric_loader.py +251 -0
- ab_analysis_kit-0.0.1.dev0/abkit/loaders/query_template.py +167 -0
- ab_analysis_kit-0.0.1.dev0/abkit/loaders/templates/abkit_assignment.jinja +62 -0
- ab_analysis_kit-0.0.1.dev0/abkit/pipeline/__init__.py +37 -0
- ab_analysis_kit-0.0.1.dev0/abkit/pipeline/_types.py +52 -0
- ab_analysis_kit-0.0.1.dev0/abkit/pipeline/analyze.py +223 -0
- ab_analysis_kit-0.0.1.dev0/abkit/pipeline/driver.py +477 -0
- ab_analysis_kit-0.0.1.dev0/abkit/pipeline/enrich.py +137 -0
- ab_analysis_kit-0.0.1.dev0/abkit/pipeline/readout.py +779 -0
- ab_analysis_kit-0.0.1.dev0/abkit/reporting/__init__.py +19 -0
- ab_analysis_kit-0.0.1.dev0/abkit/reporting/assets/report.js +138 -0
- ab_analysis_kit-0.0.1.dev0/abkit/reporting/builder.py +484 -0
- ab_analysis_kit-0.0.1.dev0/abkit/reporting/calibration.py +182 -0
- ab_analysis_kit-0.0.1.dev0/abkit/reporting/html_report.py +109 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/__init__.py +94 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/accumulate.py +82 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/base.py +347 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/__init__.py +69 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/applier.py +81 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/bootstrap.py +311 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/ci.py +72 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/engine.py +383 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/paired_bootstrap.py +57 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/paired_post_normed_bootstrap.py +81 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/poisson_bootstrap.py +112 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/bootstrap/post_normed_bootstrap.py +102 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/correction.py +88 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/effects.py +141 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/exceptions.py +31 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/factory.py +26 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/__init__.py +10 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/cuped_ttest.py +183 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/paired_cuped_ttest.py +125 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/paired_ttest.py +136 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/ratio_delta.py +113 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/ttest.py +105 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/parametric/ztest.py +134 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/power.py +278 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/registry.py +111 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/result.py +84 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/rng.py +39 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/samples.py +531 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/sequential/__init__.py +18 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/sequential/apply.py +37 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/sequential/confidence_sequence.py +96 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/sequential/mixture.py +70 -0
- ab_analysis_kit-0.0.1.dev0/abkit/stats/srm.py +221 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/__init__.py +59 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/assets/explore.js +173 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/config_writer.py +409 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/html.py +88 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/payload.py +122 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/recompute.py +1039 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/server.py +882 -0
- ab_analysis_kit-0.0.1.dev0/abkit/tuning/session.py +233 -0
- ab_analysis_kit-0.0.1.dev0/abkit/utils/__init__.py +27 -0
- ab_analysis_kit-0.0.1.dev0/abkit/utils/datetime_utils.py +97 -0
- ab_analysis_kit-0.0.1.dev0/abkit/utils/env_interpolation.py +50 -0
- ab_analysis_kit-0.0.1.dev0/abkit/utils/json_utils.py +38 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/__init__.py +36 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/_types.py +35 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/inject.py +75 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/load.py +160 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/panel.py +59 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/persistence.py +59 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/resample.py +94 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/result.py +60 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/run_id.py +45 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/runner.py +389 -0
- ab_analysis_kit-0.0.1.dev0/abkit/validate/scoring.py +544 -0
- ab_analysis_kit-0.0.1.dev0/pyproject.toml +187 -0
- ab_analysis_kit-0.0.1.dev0/requirements.txt +10 -0
- ab_analysis_kit-0.0.1.dev0/setup.cfg +4 -0
- ab_analysis_kit-0.0.1.dev0/setup.py +6 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ab-analysis-kit authors
|
|
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.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include requirements.txt
|
|
4
|
+
recursive-include abkit *.py
|
|
5
|
+
recursive-include abkit/cli/assets *.md
|
|
6
|
+
recursive-include abkit/loaders/templates *.jinja
|
|
7
|
+
recursive-include abkit/reporting/assets *.js
|
|
8
|
+
recursive-include abkit/tuning/assets *.js
|
|
9
|
+
recursive-exclude tests *
|
|
10
|
+
recursive-exclude * __pycache__
|
|
11
|
+
recursive-exclude * *.pyc
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ab-analysis-kit
|
|
3
|
+
Version: 0.0.1.dev0
|
|
4
|
+
Summary: A/B experiment analysis as declarative YAML + SQL
|
|
5
|
+
Author: ab-analysis-kit authors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://abkit.pipelab.dev
|
|
8
|
+
Project-URL: Documentation, https://abkit.pipelab.dev
|
|
9
|
+
Project-URL: Repository, https://github.com/alexeiveselov92/ab-analysis-kit
|
|
10
|
+
Project-URL: Changelog, https://github.com/alexeiveselov92/ab-analysis-kit/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Issues, https://github.com/alexeiveselov92/ab-analysis-kit/issues
|
|
12
|
+
Keywords: ab-testing,experimentation,statistics,cuped,bootstrap,causal-inference,clickhouse
|
|
13
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: numpy>=1.24.0
|
|
27
|
+
Requires-Dist: scipy>=1.10.0
|
|
28
|
+
Requires-Dist: statsmodels>=0.14.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0.0
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: click>=8.0
|
|
32
|
+
Requires-Dist: jinja2>=3.0
|
|
33
|
+
Requires-Dist: orjson>=3.0
|
|
34
|
+
Requires-Dist: requests>=2.25.0
|
|
35
|
+
Provides-Extra: clickhouse
|
|
36
|
+
Requires-Dist: clickhouse-driver>=0.2.0; extra == "clickhouse"
|
|
37
|
+
Provides-Extra: postgres
|
|
38
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgres"
|
|
39
|
+
Provides-Extra: mysql
|
|
40
|
+
Requires-Dist: pymysql>=1.0.0; extra == "mysql"
|
|
41
|
+
Provides-Extra: all-db
|
|
42
|
+
Requires-Dist: clickhouse-driver>=0.2.0; extra == "all-db"
|
|
43
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all-db"
|
|
44
|
+
Requires-Dist: pymysql>=1.0.0; extra == "all-db"
|
|
45
|
+
Provides-Extra: orchestration
|
|
46
|
+
Requires-Dist: prefect>=2.0; extra == "orchestration"
|
|
47
|
+
Provides-Extra: all
|
|
48
|
+
Requires-Dist: clickhouse-driver>=0.2.0; extra == "all"
|
|
49
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
|
|
50
|
+
Requires-Dist: pymysql>=1.0.0; extra == "all"
|
|
51
|
+
Requires-Dist: prefect>=2.0; extra == "all"
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest-mock>=3.0; extra == "dev"
|
|
56
|
+
Requires-Dist: requests-mock>=1.12; extra == "dev"
|
|
57
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
58
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
59
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
60
|
+
Provides-Extra: integration
|
|
61
|
+
Requires-Dist: testcontainers[clickhouse,mysql,postgres]>=4.0; extra == "integration"
|
|
62
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "integration"
|
|
63
|
+
Requires-Dist: pymysql>=1.0.0; extra == "integration"
|
|
64
|
+
Dynamic: license-file
|
|
65
|
+
|
|
66
|
+
# ab-analysis-kit
|
|
67
|
+
|
|
68
|
+
**A/B experiment analysis as declarative YAML + SQL — with a chart-first cockpit.**
|
|
69
|
+
|
|
70
|
+
`ab-analysis-kit` (CLI `abk`) is an open-source, declarative
|
|
71
|
+
(dbt / [detectkit](https://dtk.pipelab.dev)-style), database-agnostic, numpy-first
|
|
72
|
+
Python library for analyzing A/B experiments. You define an **experiment** and its
|
|
73
|
+
**metrics** in YAML + SQL; abkit computes per-method effect + confidence interval +
|
|
74
|
+
p-value + MDE/power **cumulatively over the experiment's lifetime** (the
|
|
75
|
+
stabilization chart), writes them to a clean warehouse table any BI can read, and
|
|
76
|
+
gives you a local cockpit to tune the analysis and a harness to prove your method is
|
|
77
|
+
actually calibrated.
|
|
78
|
+
|
|
79
|
+
> **Status: pre-development.** This repo currently holds the **project-initiation
|
|
80
|
+
> specs** (the development contract). Start with the master plan (RU):
|
|
81
|
+
> [docs/ru/project-initiation-spec.md](docs/ru/project-initiation-spec.md), then the
|
|
82
|
+
> [specs index](docs/specs/00-overview.md).
|
|
83
|
+
|
|
84
|
+
## What it will do
|
|
85
|
+
|
|
86
|
+
- **Declarative experiments** — `experiments/*.yml` (assignment + variants +
|
|
87
|
+
comparisons) referencing a reusable `metrics/*.yml` library (YAML + SQL).
|
|
88
|
+
- **A rigorous statistical engine** — t-test, two-proportion z-test, CUPED, ratio
|
|
89
|
+
(delta-method), and a vectorised bootstrap family (plain/paired/Poisson/
|
|
90
|
+
post-normed), with relative & absolute effects, MDE/power, and multiple-testing
|
|
91
|
+
correction. Ported from a battle-tested legacy engine and improved deliberately.
|
|
92
|
+
- **The cumulative stabilization chart** — effect + CI per day from experiment
|
|
93
|
+
start, so you see the estimate converge and call a winner only once it stabilizes.
|
|
94
|
+
- **`abk explore`** — a local, chart-first cockpit to turn method knobs (CUPED,
|
|
95
|
+
stratification, alpha…) and watch the result recompute live, with A/A calibration
|
|
96
|
+
always in view. *The priority interface.*
|
|
97
|
+
- **`abk validate`** — an A/A false-positive + power matrix that measures your
|
|
98
|
+
method's **real** α (including the honest cumulative-peeking FPR), not the nominal.
|
|
99
|
+
- **BI-agnostic** — results land in one clean table; connect Grafana, Lightdash,
|
|
100
|
+
Metabase, or Superset. Orchestrate with **Prefect**.
|
|
101
|
+
- **AI-native** — `abk init-claude` sets up assistant context + skills so an
|
|
102
|
+
assistant can scaffold and tune experiments with (or for) you.
|
|
103
|
+
|
|
104
|
+
## Design at a glance
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
experiment (YAML) ──▶ load exposures ──▶ SRM gate ──▶ compute (t/z/CUPED/bootstrap) ──▶ readout
|
|
108
|
+
└ references reusable metrics (YAML + SQL) └ _ab_results → your BI
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
abkit is the sibling of detectkit: same DNA (CLI-first, db-agnostic, numpy-first,
|
|
112
|
+
self-contained reports, a chart-first cockpit, `init-claude`), with the anomaly
|
|
113
|
+
`detect` stage replaced by a statistical `compute` stage and the primary entity
|
|
114
|
+
flipped from *metric* to *experiment*.
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
- **Master plan (RU):** [docs/ru/project-initiation-spec.md](docs/ru/project-initiation-spec.md)
|
|
119
|
+
- **Specs index:** [docs/specs/00-overview.md](docs/specs/00-overview.md)
|
|
120
|
+
- **Architecture:** [docs/specs/architecture.md](docs/specs/architecture.md)
|
|
121
|
+
- **Roadmap:** [ROADMAP.md](ROADMAP.md) · **Principles:** [PRINCIPLES.md](PRINCIPLES.md)
|
|
122
|
+
- **Contributor guide:** [CLAUDE.md](CLAUDE.md)
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT (planned).
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# ab-analysis-kit
|
|
2
|
+
|
|
3
|
+
**A/B experiment analysis as declarative YAML + SQL — with a chart-first cockpit.**
|
|
4
|
+
|
|
5
|
+
`ab-analysis-kit` (CLI `abk`) is an open-source, declarative
|
|
6
|
+
(dbt / [detectkit](https://dtk.pipelab.dev)-style), database-agnostic, numpy-first
|
|
7
|
+
Python library for analyzing A/B experiments. You define an **experiment** and its
|
|
8
|
+
**metrics** in YAML + SQL; abkit computes per-method effect + confidence interval +
|
|
9
|
+
p-value + MDE/power **cumulatively over the experiment's lifetime** (the
|
|
10
|
+
stabilization chart), writes them to a clean warehouse table any BI can read, and
|
|
11
|
+
gives you a local cockpit to tune the analysis and a harness to prove your method is
|
|
12
|
+
actually calibrated.
|
|
13
|
+
|
|
14
|
+
> **Status: pre-development.** This repo currently holds the **project-initiation
|
|
15
|
+
> specs** (the development contract). Start with the master plan (RU):
|
|
16
|
+
> [docs/ru/project-initiation-spec.md](docs/ru/project-initiation-spec.md), then the
|
|
17
|
+
> [specs index](docs/specs/00-overview.md).
|
|
18
|
+
|
|
19
|
+
## What it will do
|
|
20
|
+
|
|
21
|
+
- **Declarative experiments** — `experiments/*.yml` (assignment + variants +
|
|
22
|
+
comparisons) referencing a reusable `metrics/*.yml` library (YAML + SQL).
|
|
23
|
+
- **A rigorous statistical engine** — t-test, two-proportion z-test, CUPED, ratio
|
|
24
|
+
(delta-method), and a vectorised bootstrap family (plain/paired/Poisson/
|
|
25
|
+
post-normed), with relative & absolute effects, MDE/power, and multiple-testing
|
|
26
|
+
correction. Ported from a battle-tested legacy engine and improved deliberately.
|
|
27
|
+
- **The cumulative stabilization chart** — effect + CI per day from experiment
|
|
28
|
+
start, so you see the estimate converge and call a winner only once it stabilizes.
|
|
29
|
+
- **`abk explore`** — a local, chart-first cockpit to turn method knobs (CUPED,
|
|
30
|
+
stratification, alpha…) and watch the result recompute live, with A/A calibration
|
|
31
|
+
always in view. *The priority interface.*
|
|
32
|
+
- **`abk validate`** — an A/A false-positive + power matrix that measures your
|
|
33
|
+
method's **real** α (including the honest cumulative-peeking FPR), not the nominal.
|
|
34
|
+
- **BI-agnostic** — results land in one clean table; connect Grafana, Lightdash,
|
|
35
|
+
Metabase, or Superset. Orchestrate with **Prefect**.
|
|
36
|
+
- **AI-native** — `abk init-claude` sets up assistant context + skills so an
|
|
37
|
+
assistant can scaffold and tune experiments with (or for) you.
|
|
38
|
+
|
|
39
|
+
## Design at a glance
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
experiment (YAML) ──▶ load exposures ──▶ SRM gate ──▶ compute (t/z/CUPED/bootstrap) ──▶ readout
|
|
43
|
+
└ references reusable metrics (YAML + SQL) └ _ab_results → your BI
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
abkit is the sibling of detectkit: same DNA (CLI-first, db-agnostic, numpy-first,
|
|
47
|
+
self-contained reports, a chart-first cockpit, `init-claude`), with the anomaly
|
|
48
|
+
`detect` stage replaced by a statistical `compute` stage and the primary entity
|
|
49
|
+
flipped from *metric* to *experiment*.
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
- **Master plan (RU):** [docs/ru/project-initiation-spec.md](docs/ru/project-initiation-spec.md)
|
|
54
|
+
- **Specs index:** [docs/specs/00-overview.md](docs/specs/00-overview.md)
|
|
55
|
+
- **Architecture:** [docs/specs/architecture.md](docs/specs/architecture.md)
|
|
56
|
+
- **Roadmap:** [ROADMAP.md](ROADMAP.md) · **Principles:** [PRINCIPLES.md](PRINCIPLES.md)
|
|
57
|
+
- **Contributor guide:** [CLAUDE.md](CLAUDE.md)
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT (planned).
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ab-analysis-kit
|
|
3
|
+
Version: 0.0.1.dev0
|
|
4
|
+
Summary: A/B experiment analysis as declarative YAML + SQL
|
|
5
|
+
Author: ab-analysis-kit authors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://abkit.pipelab.dev
|
|
8
|
+
Project-URL: Documentation, https://abkit.pipelab.dev
|
|
9
|
+
Project-URL: Repository, https://github.com/alexeiveselov92/ab-analysis-kit
|
|
10
|
+
Project-URL: Changelog, https://github.com/alexeiveselov92/ab-analysis-kit/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Issues, https://github.com/alexeiveselov92/ab-analysis-kit/issues
|
|
12
|
+
Keywords: ab-testing,experimentation,statistics,cuped,bootstrap,causal-inference,clickhouse
|
|
13
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: numpy>=1.24.0
|
|
27
|
+
Requires-Dist: scipy>=1.10.0
|
|
28
|
+
Requires-Dist: statsmodels>=0.14.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0.0
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: click>=8.0
|
|
32
|
+
Requires-Dist: jinja2>=3.0
|
|
33
|
+
Requires-Dist: orjson>=3.0
|
|
34
|
+
Requires-Dist: requests>=2.25.0
|
|
35
|
+
Provides-Extra: clickhouse
|
|
36
|
+
Requires-Dist: clickhouse-driver>=0.2.0; extra == "clickhouse"
|
|
37
|
+
Provides-Extra: postgres
|
|
38
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "postgres"
|
|
39
|
+
Provides-Extra: mysql
|
|
40
|
+
Requires-Dist: pymysql>=1.0.0; extra == "mysql"
|
|
41
|
+
Provides-Extra: all-db
|
|
42
|
+
Requires-Dist: clickhouse-driver>=0.2.0; extra == "all-db"
|
|
43
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all-db"
|
|
44
|
+
Requires-Dist: pymysql>=1.0.0; extra == "all-db"
|
|
45
|
+
Provides-Extra: orchestration
|
|
46
|
+
Requires-Dist: prefect>=2.0; extra == "orchestration"
|
|
47
|
+
Provides-Extra: all
|
|
48
|
+
Requires-Dist: clickhouse-driver>=0.2.0; extra == "all"
|
|
49
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "all"
|
|
50
|
+
Requires-Dist: pymysql>=1.0.0; extra == "all"
|
|
51
|
+
Requires-Dist: prefect>=2.0; extra == "all"
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest-mock>=3.0; extra == "dev"
|
|
56
|
+
Requires-Dist: requests-mock>=1.12; extra == "dev"
|
|
57
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
58
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
59
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
60
|
+
Provides-Extra: integration
|
|
61
|
+
Requires-Dist: testcontainers[clickhouse,mysql,postgres]>=4.0; extra == "integration"
|
|
62
|
+
Requires-Dist: psycopg2-binary>=2.9.0; extra == "integration"
|
|
63
|
+
Requires-Dist: pymysql>=1.0.0; extra == "integration"
|
|
64
|
+
Dynamic: license-file
|
|
65
|
+
|
|
66
|
+
# ab-analysis-kit
|
|
67
|
+
|
|
68
|
+
**A/B experiment analysis as declarative YAML + SQL — with a chart-first cockpit.**
|
|
69
|
+
|
|
70
|
+
`ab-analysis-kit` (CLI `abk`) is an open-source, declarative
|
|
71
|
+
(dbt / [detectkit](https://dtk.pipelab.dev)-style), database-agnostic, numpy-first
|
|
72
|
+
Python library for analyzing A/B experiments. You define an **experiment** and its
|
|
73
|
+
**metrics** in YAML + SQL; abkit computes per-method effect + confidence interval +
|
|
74
|
+
p-value + MDE/power **cumulatively over the experiment's lifetime** (the
|
|
75
|
+
stabilization chart), writes them to a clean warehouse table any BI can read, and
|
|
76
|
+
gives you a local cockpit to tune the analysis and a harness to prove your method is
|
|
77
|
+
actually calibrated.
|
|
78
|
+
|
|
79
|
+
> **Status: pre-development.** This repo currently holds the **project-initiation
|
|
80
|
+
> specs** (the development contract). Start with the master plan (RU):
|
|
81
|
+
> [docs/ru/project-initiation-spec.md](docs/ru/project-initiation-spec.md), then the
|
|
82
|
+
> [specs index](docs/specs/00-overview.md).
|
|
83
|
+
|
|
84
|
+
## What it will do
|
|
85
|
+
|
|
86
|
+
- **Declarative experiments** — `experiments/*.yml` (assignment + variants +
|
|
87
|
+
comparisons) referencing a reusable `metrics/*.yml` library (YAML + SQL).
|
|
88
|
+
- **A rigorous statistical engine** — t-test, two-proportion z-test, CUPED, ratio
|
|
89
|
+
(delta-method), and a vectorised bootstrap family (plain/paired/Poisson/
|
|
90
|
+
post-normed), with relative & absolute effects, MDE/power, and multiple-testing
|
|
91
|
+
correction. Ported from a battle-tested legacy engine and improved deliberately.
|
|
92
|
+
- **The cumulative stabilization chart** — effect + CI per day from experiment
|
|
93
|
+
start, so you see the estimate converge and call a winner only once it stabilizes.
|
|
94
|
+
- **`abk explore`** — a local, chart-first cockpit to turn method knobs (CUPED,
|
|
95
|
+
stratification, alpha…) and watch the result recompute live, with A/A calibration
|
|
96
|
+
always in view. *The priority interface.*
|
|
97
|
+
- **`abk validate`** — an A/A false-positive + power matrix that measures your
|
|
98
|
+
method's **real** α (including the honest cumulative-peeking FPR), not the nominal.
|
|
99
|
+
- **BI-agnostic** — results land in one clean table; connect Grafana, Lightdash,
|
|
100
|
+
Metabase, or Superset. Orchestrate with **Prefect**.
|
|
101
|
+
- **AI-native** — `abk init-claude` sets up assistant context + skills so an
|
|
102
|
+
assistant can scaffold and tune experiments with (or for) you.
|
|
103
|
+
|
|
104
|
+
## Design at a glance
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
experiment (YAML) ──▶ load exposures ──▶ SRM gate ──▶ compute (t/z/CUPED/bootstrap) ──▶ readout
|
|
108
|
+
└ references reusable metrics (YAML + SQL) └ _ab_results → your BI
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
abkit is the sibling of detectkit: same DNA (CLI-first, db-agnostic, numpy-first,
|
|
112
|
+
self-contained reports, a chart-first cockpit, `init-claude`), with the anomaly
|
|
113
|
+
`detect` stage replaced by a statistical `compute` stage and the primary entity
|
|
114
|
+
flipped from *metric* to *experiment*.
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
- **Master plan (RU):** [docs/ru/project-initiation-spec.md](docs/ru/project-initiation-spec.md)
|
|
119
|
+
- **Specs index:** [docs/specs/00-overview.md](docs/specs/00-overview.md)
|
|
120
|
+
- **Architecture:** [docs/specs/architecture.md](docs/specs/architecture.md)
|
|
121
|
+
- **Roadmap:** [ROADMAP.md](ROADMAP.md) · **Principles:** [PRINCIPLES.md](PRINCIPLES.md)
|
|
122
|
+
- **Contributor guide:** [CLAUDE.md](CLAUDE.md)
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT (planned).
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
requirements.txt
|
|
6
|
+
setup.py
|
|
7
|
+
ab_analysis_kit.egg-info/PKG-INFO
|
|
8
|
+
ab_analysis_kit.egg-info/SOURCES.txt
|
|
9
|
+
ab_analysis_kit.egg-info/dependency_links.txt
|
|
10
|
+
ab_analysis_kit.egg-info/entry_points.txt
|
|
11
|
+
ab_analysis_kit.egg-info/requires.txt
|
|
12
|
+
ab_analysis_kit.egg-info/top_level.txt
|
|
13
|
+
abkit/__init__.py
|
|
14
|
+
abkit/cli/__init__.py
|
|
15
|
+
abkit/cli/_output.py
|
|
16
|
+
abkit/cli/main.py
|
|
17
|
+
abkit/cli/commands/__init__.py
|
|
18
|
+
abkit/cli/commands/_context.py
|
|
19
|
+
abkit/cli/commands/clean.py
|
|
20
|
+
abkit/cli/commands/explore.py
|
|
21
|
+
abkit/cli/commands/init.py
|
|
22
|
+
abkit/cli/commands/run.py
|
|
23
|
+
abkit/cli/commands/unlock.py
|
|
24
|
+
abkit/cli/commands/validate.py
|
|
25
|
+
abkit/compute/__init__.py
|
|
26
|
+
abkit/compute/recompute_backend.py
|
|
27
|
+
abkit/config/__init__.py
|
|
28
|
+
abkit/config/discovery.py
|
|
29
|
+
abkit/config/experiment_config.py
|
|
30
|
+
abkit/config/method_config.py
|
|
31
|
+
abkit/config/metric_config.py
|
|
32
|
+
abkit/config/profile.py
|
|
33
|
+
abkit/config/project_config.py
|
|
34
|
+
abkit/config/validator.py
|
|
35
|
+
abkit/core/__init__.py
|
|
36
|
+
abkit/core/interval.py
|
|
37
|
+
abkit/core/models.py
|
|
38
|
+
abkit/core/period_planner.py
|
|
39
|
+
abkit/database/__init__.py
|
|
40
|
+
abkit/database/_sql_manager.py
|
|
41
|
+
abkit/database/clickhouse_manager.py
|
|
42
|
+
abkit/database/manager.py
|
|
43
|
+
abkit/database/mysql_manager.py
|
|
44
|
+
abkit/database/postgres_manager.py
|
|
45
|
+
abkit/database/tables.py
|
|
46
|
+
abkit/database/internal_tables/__init__.py
|
|
47
|
+
abkit/database/internal_tables/_aa_runs.py
|
|
48
|
+
abkit/database/internal_tables/_base.py
|
|
49
|
+
abkit/database/internal_tables/_experiments.py
|
|
50
|
+
abkit/database/internal_tables/_exposures.py
|
|
51
|
+
abkit/database/internal_tables/_maintenance.py
|
|
52
|
+
abkit/database/internal_tables/_results.py
|
|
53
|
+
abkit/database/internal_tables/_schema.py
|
|
54
|
+
abkit/database/internal_tables/_tasks.py
|
|
55
|
+
abkit/database/internal_tables/_unit_state.py
|
|
56
|
+
abkit/database/internal_tables/manager.py
|
|
57
|
+
abkit/loaders/__init__.py
|
|
58
|
+
abkit/loaders/exposure_loader.py
|
|
59
|
+
abkit/loaders/metric_loader.py
|
|
60
|
+
abkit/loaders/query_template.py
|
|
61
|
+
abkit/loaders/templates/abkit_assignment.jinja
|
|
62
|
+
abkit/pipeline/__init__.py
|
|
63
|
+
abkit/pipeline/_types.py
|
|
64
|
+
abkit/pipeline/analyze.py
|
|
65
|
+
abkit/pipeline/driver.py
|
|
66
|
+
abkit/pipeline/enrich.py
|
|
67
|
+
abkit/pipeline/readout.py
|
|
68
|
+
abkit/reporting/__init__.py
|
|
69
|
+
abkit/reporting/builder.py
|
|
70
|
+
abkit/reporting/calibration.py
|
|
71
|
+
abkit/reporting/html_report.py
|
|
72
|
+
abkit/reporting/assets/report.js
|
|
73
|
+
abkit/stats/__init__.py
|
|
74
|
+
abkit/stats/accumulate.py
|
|
75
|
+
abkit/stats/base.py
|
|
76
|
+
abkit/stats/correction.py
|
|
77
|
+
abkit/stats/effects.py
|
|
78
|
+
abkit/stats/exceptions.py
|
|
79
|
+
abkit/stats/factory.py
|
|
80
|
+
abkit/stats/power.py
|
|
81
|
+
abkit/stats/registry.py
|
|
82
|
+
abkit/stats/result.py
|
|
83
|
+
abkit/stats/rng.py
|
|
84
|
+
abkit/stats/samples.py
|
|
85
|
+
abkit/stats/srm.py
|
|
86
|
+
abkit/stats/bootstrap/__init__.py
|
|
87
|
+
abkit/stats/bootstrap/applier.py
|
|
88
|
+
abkit/stats/bootstrap/bootstrap.py
|
|
89
|
+
abkit/stats/bootstrap/ci.py
|
|
90
|
+
abkit/stats/bootstrap/engine.py
|
|
91
|
+
abkit/stats/bootstrap/paired_bootstrap.py
|
|
92
|
+
abkit/stats/bootstrap/paired_post_normed_bootstrap.py
|
|
93
|
+
abkit/stats/bootstrap/poisson_bootstrap.py
|
|
94
|
+
abkit/stats/bootstrap/post_normed_bootstrap.py
|
|
95
|
+
abkit/stats/parametric/__init__.py
|
|
96
|
+
abkit/stats/parametric/cuped_ttest.py
|
|
97
|
+
abkit/stats/parametric/paired_cuped_ttest.py
|
|
98
|
+
abkit/stats/parametric/paired_ttest.py
|
|
99
|
+
abkit/stats/parametric/ratio_delta.py
|
|
100
|
+
abkit/stats/parametric/ttest.py
|
|
101
|
+
abkit/stats/parametric/ztest.py
|
|
102
|
+
abkit/stats/sequential/__init__.py
|
|
103
|
+
abkit/stats/sequential/apply.py
|
|
104
|
+
abkit/stats/sequential/confidence_sequence.py
|
|
105
|
+
abkit/stats/sequential/mixture.py
|
|
106
|
+
abkit/tuning/__init__.py
|
|
107
|
+
abkit/tuning/config_writer.py
|
|
108
|
+
abkit/tuning/html.py
|
|
109
|
+
abkit/tuning/payload.py
|
|
110
|
+
abkit/tuning/recompute.py
|
|
111
|
+
abkit/tuning/server.py
|
|
112
|
+
abkit/tuning/session.py
|
|
113
|
+
abkit/tuning/assets/explore.js
|
|
114
|
+
abkit/utils/__init__.py
|
|
115
|
+
abkit/utils/datetime_utils.py
|
|
116
|
+
abkit/utils/env_interpolation.py
|
|
117
|
+
abkit/utils/json_utils.py
|
|
118
|
+
abkit/validate/__init__.py
|
|
119
|
+
abkit/validate/_types.py
|
|
120
|
+
abkit/validate/inject.py
|
|
121
|
+
abkit/validate/load.py
|
|
122
|
+
abkit/validate/panel.py
|
|
123
|
+
abkit/validate/persistence.py
|
|
124
|
+
abkit/validate/resample.py
|
|
125
|
+
abkit/validate/result.py
|
|
126
|
+
abkit/validate/run_id.py
|
|
127
|
+
abkit/validate/runner.py
|
|
128
|
+
abkit/validate/scoring.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
numpy>=1.24.0
|
|
2
|
+
scipy>=1.10.0
|
|
3
|
+
statsmodels>=0.14.0
|
|
4
|
+
pydantic>=2.0.0
|
|
5
|
+
pyyaml>=6.0
|
|
6
|
+
click>=8.0
|
|
7
|
+
jinja2>=3.0
|
|
8
|
+
orjson>=3.0
|
|
9
|
+
requests>=2.25.0
|
|
10
|
+
|
|
11
|
+
[all]
|
|
12
|
+
clickhouse-driver>=0.2.0
|
|
13
|
+
psycopg2-binary>=2.9.0
|
|
14
|
+
pymysql>=1.0.0
|
|
15
|
+
prefect>=2.0
|
|
16
|
+
|
|
17
|
+
[all-db]
|
|
18
|
+
clickhouse-driver>=0.2.0
|
|
19
|
+
psycopg2-binary>=2.9.0
|
|
20
|
+
pymysql>=1.0.0
|
|
21
|
+
|
|
22
|
+
[clickhouse]
|
|
23
|
+
clickhouse-driver>=0.2.0
|
|
24
|
+
|
|
25
|
+
[dev]
|
|
26
|
+
pytest>=7.0
|
|
27
|
+
pytest-cov>=4.0
|
|
28
|
+
pytest-mock>=3.0
|
|
29
|
+
requests-mock>=1.12
|
|
30
|
+
black>=23.0
|
|
31
|
+
mypy>=1.0
|
|
32
|
+
ruff>=0.1.0
|
|
33
|
+
|
|
34
|
+
[integration]
|
|
35
|
+
testcontainers[clickhouse,mysql,postgres]>=4.0
|
|
36
|
+
psycopg2-binary>=2.9.0
|
|
37
|
+
pymysql>=1.0.0
|
|
38
|
+
|
|
39
|
+
[mysql]
|
|
40
|
+
pymysql>=1.0.0
|
|
41
|
+
|
|
42
|
+
[orchestration]
|
|
43
|
+
prefect>=2.0
|
|
44
|
+
|
|
45
|
+
[postgres]
|
|
46
|
+
psycopg2-binary>=2.9.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
abkit
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""ab-analysis-kit — A/B experiment analysis as declarative YAML + SQL.
|
|
2
|
+
|
|
3
|
+
``abkit.stats`` (the pure numpy-first statistical core) is available and
|
|
4
|
+
re-exported lazily below; the declarative config, DB layer, pipeline and the
|
|
5
|
+
full CLI arrive per ``ROADMAP.md``. ``__version__`` is the single source of
|
|
6
|
+
truth for the CLI and the ``abk init-claude`` version stamp.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
__version__ = "0.0.1.dev0"
|
|
14
|
+
|
|
15
|
+
#: Symbols re-exported lazily from ``abkit.stats`` (PEP 562) so importing
|
|
16
|
+
#: ``abkit`` for ``__version__`` (the CLI path) stays numpy-free and fast.
|
|
17
|
+
_STATS_EXPORTS = frozenset(
|
|
18
|
+
{
|
|
19
|
+
"BaseMethod",
|
|
20
|
+
"Fraction",
|
|
21
|
+
"RatioSample",
|
|
22
|
+
"Sample",
|
|
23
|
+
"SufficientStats",
|
|
24
|
+
"TestResult",
|
|
25
|
+
"available_methods",
|
|
26
|
+
"create_method",
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __getattr__(name: str) -> Any:
|
|
32
|
+
if name in _STATS_EXPORTS:
|
|
33
|
+
import abkit.stats
|
|
34
|
+
|
|
35
|
+
return getattr(abkit.stats, name)
|
|
36
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def __dir__() -> list[str]:
|
|
40
|
+
return sorted(set(globals()) | _STATS_EXPORTS)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""The ``abk`` command-line interface package."""
|