Follow these steps to quickly install all dependencies and set up the working environment.
- Clone the repository:
git clone https://github.com/sambaiga/bayesian-modelling.git- Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh- Create and activate the virtual environment
# Create the environment in .venv
uv venv --python 3.11 # Activate the environment # macOS/Linux
source .venv/bin/activateOR
.venv\Scripts\activate #Windows PowerShell- Install all dependencies
This command reads the pyproject.toml file and installs all required packages (main, dev, test, etc.).
uv sync --all-extras --devThen verify everything works
uv run python -c "import bayes; print('Bayes imported successfully!')"-
Install the project in editable mode. This is crucial for development and ensures you can import your local ark package (e.g., in Jupyter notebooks).
uv pip install -e . -
Initialize pre-commit hooks This sets up hooks that automatically format and lint your code before each commit. Since pre-commit is now installed in your environment, we run it via
uv run.uv run pre-commit install
then
uv run pre-commit autoupdate- Enable nbdime for improved Jupyter Notebook version diffs
uv run nbdime config-git --enable --global- Install git-cliff (for changelog) If you want to maintain an automated changelog: If you want to maintain an automated changelog:
# macOS
brew install git-cliff
# Linux
curl -LsSf https://github.com/orhun/git-cliff/releases/latest/download/git-cliff-install.sh | sh
# Windows (PowerShell)
winget install -e --id gitcliff.gitcliff
# or
iwr https://github.com/orhun/git-cliff/releases/latest/download/git-cliff-install.ps1 -useb | iex
# Any OS (if you have Rust/Cargo)
cargo install git-cliffOnce setup is complete:
- Open the project in VS Code. Make sure you have the Python and Jupyter Notebook extensions installed.
- Run the appropriate notebook (file with
.ipynbextension) from the/notebooksfolder. - Verify imports and paths load correctly.