mozilla / jetstream

This machine kills superstition. 💨
https://experimenter.info/jetstream/jetstream
Mozilla Public License 2.0
22 stars 18 forks source link
nimbus

CircleCI

jetstream

Automated experiment analysis.

Jetstream automatically calculates metrics and applies statistical treatments to collected experiment data for different analysis windows.

For more information, see the documentation.

Local installation

# Create and activate a python virtual environment.
python3 -m venv venv/
source venv/bin/activate
# --no-deps to workaround https://github.com/pypa/pip/issues/9644
pip install --no-deps -r requirements.txt
pip install -e .

Running tests

Linting

ruff check jetstream

ruff can also fix lint issues:

Dependencies

Jetstream uses pip-tools to manage dependencies, along with a script that runs the pip-tools commands. There are two requirements files auto-generated by script/update_deps:

Add a new dependency

  1. Add to pyproject.toml list of dependencies.
  2. Generate new requirements files with ./script/update_deps
  3. Install with python -m pip install -r requirements.txt

Update all dependencies

./script/update_deps

Be sure to run pip install --no-deps -r requirements.txt and reinstall jetstream (pip install -e .) afterwards, and test functionality!

Update a single dependency

  1. Prefer to update all dependencies (see above)!

  2. Edit requirements.in

    • mypy==1.8.0 --> mypy==1.9.0
  3. Regenerate requirements.txt

    • pip-compile --generate-hashes -o requirements.txt requirements.in
    • (Note: this is the last line of script/update_deps)
  4. Install dependencies

    • pip install --no-deps -r requirements.txt
    • pip install -e .
  5. Test!