mozanalysis.config

mozanalysis.config.ConfigLoader = <mozanalysis.config._ConfigLoader object>

Loads config files from an external repository.

Config objects are converted into mozanalysis native types.

class mozanalysis.config._ConfigLoader[source]

Loads config files from an external repository.

Config objects are converted into mozanalysis native types.

with_configs_from(repo_urls: list[str] | None, is_private: bool = False) _ConfigLoader[source]

Load configs from another repository and merge with default configs.

get_metric(metric_slug: str, app_name: str)[source]

Load a metric definition for the given app.

Returns a mozanalysis.metrics.Metric instance.

get_data_source(data_source_slug: str, app_name: str)[source]

Load a data source definition for the given app.

Returns a mozanalysis.metrics.DataSource instance.

get_segment(segment_slug: str, app_name: str)[source]

Load a segment definition for the given app.

Returns a mozanalysis.segments.Segment instance.

get_segment_data_source(data_source_slug: str, app_name: str)[source]

Load a segment data source definition for the given app.

Returns a mozanalysis.segments.SegmentDataSource instance.

get_outcome_metric(metric_slug: str, outcome_slug: str, app_name: str)[source]

Load a metric definition from an outcome defined for the given app.

Parametrized metrics are not supported, since they may not be defined outside of an experiment.

Returns a mozanalysis.metrics.Metric instance.

get_outcome_data_source(data_source_slug: str, outcome_slug: str, app_name: str)[source]

Load a data source definition from an outcome defined for the given app.

Returns a mozanalysis.metrics.DataSource instance.