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/postforecaston 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 mainThen 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.lockkeeps the commit it first resolved, anduv syncinstalls that commit untiluv lock --upgrade-package postforecastruns. - Recorded commit:
uv.lockstill 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 installcreates.venvfrom the lock file and installs the commit hooks. - Notebook kernel: Select
.venv/bin/pythonas the kernel for the notebooks indocs/tutorials/. - Tutorial helper: Keep
docs/tutorials/tutorial_support.pybeside 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. Keeptutorial_support.pybeside them. - In-memory examples: Input panel, point-in-time, anchoring and Bayesian notebooks need no downloaded data.
- Real-data examples: Both
model-walkthrough.ipynbandforecast-improvement.ipynbneed an ADC export containinguniverse.parquetandsignals/. SetPOSTFORECAST_EXPORTto 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 executeruns every notebook and updates saved outputs.just docs buildalso builds the site; both require the real-data export.
Next
Continue with Usage for the first calculation.