A library for Mozilla experiments analysis
Project description
Mozilla Experiments Analysis

The mozanalysis Python library is a library to standardize experiment analysis
at Mozilla for the purpose of producing decision reports templates that are
edited by data scientists.
Documentation
Online documentation is available at https://mozilla.github.io/mozanalysis/
Installation from pypi
- To install this package from pypi run:
pip install mozanalysis
Local Installation
Dependencies
Dependencies are specified in the requirements.txt and requirements-dev.txt files, which are used for testing and development respecitvely.
To create a virtualenv and set up the package execute the following, replacing requirements.txt with requirements-dev.txt if you plan on contributing to the package.
# Create and activate a python virtual environment.
python3 -m venv venv/
source venv/bin/activate
pip install -r requirements.txt
pip install -e . --no-dependencies
Development
Linting and Formatting are done with Ruff.
When adding new dependencies, add them to the pyproject.toml dependencies list. Then generate updated requirements files using the script script/update_deps. pip-compile is called in this script, which uses the specified dependencies to create the requirements.txt and requirements-dev.txt files. Finally, you'll want to update the requirements in your virtual env by running pip install -r requirements-dev.txt
Testing locally
With pytest
Run pytest on the commandline from the root of the package file structure.
With tox
Tox is included in the dev dependencies. If you want to run with tox, install the dev dependencies in the requirements-dev.txt as detailed above.
You can pass flags to tox to limit the different environments you test in
or the tests you run. Options after -- or positional arguments are forwarded to pytest.
For example, you can run:
-
tox -e lintto lint -
tox -e py311 -- -k utilsto only run tests with "utils" somewhere in the name, on Python 3.11 -
tox tests/test_utils.pyto run tests in a specific file
Deploying a new release
Releasing mozanalysis happens by tagging a CalVer based Git tag with the following pattern:
YYYY.M.MINOR
where YYYY is the four-digit year number, M is a single-digit month number and MINOR is a single-digit zero-based counter which does NOT relate to the day of the release. Valid versions numbers are:
2017.10.0
2018.1.0
2018.12.12
Once the (signed) Git tag has been pushed to the main GitHub repository using git push origin --tags, Circle CI will automatically build and push a release to PyPI after the tests have passed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file mozanalysis-2026.4.1.tar.gz.
File metadata
- Download URL: mozanalysis-2026.4.1.tar.gz
- Upload date:
- Size: 263.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
642b479ad6191dc0980de0a16062c02c67495ad654ceea012342cb52f23319d2
|
|
| MD5 |
ab27af78bb94f13b73dd9efc72ba8d33
|
|
| BLAKE2b-256 |
a3c0dfec1ec194dc45fcaddac9f7d1941328ea2a3dbdfad5a1ad63dd3a1c3ac5
|
Provenance
The following attestation bundles were made for mozanalysis-2026.4.1.tar.gz:
Publisher:
tagged-deploy.yml on mozilla/mozanalysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mozanalysis-2026.4.1.tar.gz -
Subject digest:
642b479ad6191dc0980de0a16062c02c67495ad654ceea012342cb52f23319d2 - Sigstore transparency entry: 1321148199
- Sigstore integration time:
-
Permalink:
mozilla/mozanalysis@0796561cc5d9d1d0bb26c611ac9b6cf417490e28 -
Branch / Tag:
refs/tags/2026.4.1 - Owner: https://github.com/mozilla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tagged-deploy.yml@0796561cc5d9d1d0bb26c611ac9b6cf417490e28 -
Trigger Event:
push
-
Statement type: