Skip to content
Development documentation. The PyPI package predates these APIs. Install from GitHub instead: pip install 'increment @ git+https://github.com/kylejcaron/increment.git' Keep any extras requested by the guide, such as increment[dashboard].

Start here

Analysis(experiment_name, definitions_path, con, backend, store, on_mixed_assignment)

Analyse one A/B experiment from declarative definitions.

experiment_name : str The name field of an experiment in the definitions YAML. definitions_path : str | Path Path to a definitions YAML file, or a directory of YAML files. con : SQLBackend Ibis backend connection holding the definitions’ fact tables, bound once at construction. backend : str | None Ibis dialect name for introspected SQL. Defaults to con’s own dialect. store : {“auto”, “always”, “none”} "auto" (default) materializes from the second top-level reduction; "always" starts with the first. Each qualifying call rescans current warehouse data; nested reductions reuse that call’s materialization. "none" keeps reductions unmaterialized. on_mixed_assignment : {“error”, “warn”, “exclude”} Policy for invalid warehouse assignments: units observed in more than one arm or with no assignment label. "error" (default) refuses; "warn"/"exclude" drop them, warning once or not at all. options: inherited_members: true

Report(defs, con)

Evaluate governed metrics over calendar time - no experiment.

Usage::

report = Report.from_definitions("definitions/", con)
trend = report.metric("purchase_rate", grain="week",
start=dt.date(2026, 1, 1))
trend.to_frame()
Definitions

Top-level semantic definitions loaded from a directory or YAML file.

Construct it with the validated source, metric, exposure, and experiment declarations, or obtain it from :func:increment.semantics.load.

increment.__version__ reports the installed package version.