Installation

Add the package to a project, or set up a checkout for the tutorials

Requirements

  • Python: 3.11, 3.12 or 3.13.
  • Access: The repository is internal to Exabel. Installing from git needs read access to Exabel/postforecast on GitHub.
  • Dependencies: numpy, pandas, pandera, pydantic and scipy. They install with the package.

Add it to a project

Add the package from the main branch with uv:

uv add 'postforecast @ git+https://github.com/Exabel/postforecast.git' --branch main

Then make every uv sync move to the latest commit on main. Add this to the project’s pyproject.toml:

[tool.uv]
upgrade-package = ["postforecast"]
  • Without the setting: uv.lock keeps the commit it first resolved, and uv sync installs that commit until uv lock --upgrade-package postforecast runs.
  • Recorded commit: uv.lock still names the commit each sync installed, so an earlier environment can be reproduced from version control.

Check the install:

uv run python -c "import postforecast as pf; print(sorted(pf.available_methods()))"

Work from a checkout

A checkout is needed to run the tutorial notebooks, the examples or the tests.

git clone https://github.com/Exabel/postforecast.git
cd postforecast
just install
  • Environment: just install creates .venv from the lock file and installs the commit hooks.
  • Notebook kernel: Select .venv/bin/python as the kernel for the notebooks in docs/tutorials/.
  • Tutorial helper: Keep docs/tutorials/tutorial_support.py beside the notebooks. It supplies their example data and figure styling.
  • Reading online: Every notebook on this site carries its computed outputs, so the tutorials can be followed without a local environment.

Run the notebooks

  • Working directory: Open notebooks in docs/tutorials/ and use the checkout’s .venv/bin/python. Keep tutorial_support.py beside them.
  • In-memory examples: Input panel, point-in-time, anchoring and Bayesian notebooks need no downloaded data.
  • Real-data examples: Both model-walkthrough.ipynb and forecast-improvement.ipynb need an ADC export containing universe.parquet and signals/. Set POSTFORECAST_EXPORT to its directory before launching the notebook environment. Their setup cells state the default snapshot.
  • Missing export: Execution stops; no synthetic substitute is used. Saved outputs remain readable without the export.
  • Refresh: just docs execute runs every notebook and updates saved outputs. just docs build also builds the site; both require the real-data export.

Next

Continue with Usage for the first calculation.