From 14942a88ccac220ffe03a944f3dfe8847212be28 Mon Sep 17 00:00:00 2001 From: oabrivard Date: Sun, 8 Mar 2026 12:03:36 +0100 Subject: [PATCH] Switched from pip to uv --- .gitignore | 1 + README.md | 7 +++---- pyproject.toml | 19 +++++++++++++++++++ requirements.txt | 8 -------- 4 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 985554c..acd9139 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .env .venv/ +.uv-cache/ __pycache__/ *.pyc credentials.json diff --git a/README.md b/README.md index 8497e0e..2ce9252 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ This project runs a small local API service that: ## 1) Prerequisites - Python 3.11+ +- `uv` ([installation guide](https://docs.astral.sh/uv/getting-started/installation/)) - A Google account - An OpenAI-compatible API key for the LLM classifier - A Google Cloud project with: @@ -30,9 +31,7 @@ The first run opens a browser window for consent and creates `token.json`. ## 3) Install and configure ```bash -python3 -m venv .venv -source .venv/bin/activate -pip install -r requirements.txt +uv sync cp .env.example .env ``` @@ -45,7 +44,7 @@ Edit `.env` and set: ## 4) Run ```bash -uvicorn app.main:app --reload +uv run uvicorn app.main:app --reload ``` At startup, the scheduler runs every `GMAIL_SCAN_INTERVAL_MINUTES`. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f306a7c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[project] +name = "personal-gmail-calendar-agent" +version = "0.1.0" +description = "Personal agent for Gmail triage and calendar availability" +requires-python = ">=3.11" +dependencies = [ + "apscheduler", + "fastapi", + "google-api-python-client", + "google-auth", + "google-auth-oauthlib", + "openai", + "python-dotenv", + "uvicorn[standard]", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fbcd040..0000000 --- a/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -apscheduler -fastapi -google-api-python-client -google-auth -google-auth-oauthlib -openai -python-dotenv -uvicorn[standard]