"""Install tasks for the project.""" # %% IMPORTS from invoke import task from invoke.context import Context # %% TASKS @task def venv(ctx: Context) -> None: """Create a virtual environment.""" ctx.run("python3 -m venv .venv/") ctx.run(".venv/bin/pip install uv") @task def lock(ctx: Context) -> None: """Lock the main project dependencies.""" ctx.run(".venv/bin/uv pip compile requirements-main.txt -o requirements.txt") @task def main(ctx: Context) -> None: """Install the main dependencies.""" ctx.run(".venv/bin/uv pip install -r requirements.txt") @task def dev(ctx: Context) -> None: """Install the development dependencies.""" ctx.run(".venv/bin/uv pip install -r requirements-dev.txt") @task(pre=[venv, lock, main, dev], default=True) def all(_: Context) -> None: """Run all install tasks."""