switched to uv

This commit is contained in:
Yanxin Lu
2026-02-27 07:34:07 -08:00
parent e8c8256967
commit cf115bb48a
7 changed files with 12 additions and 22 deletions

View File

@@ -1,3 +1,3 @@
__pycache__/
*.pyc
venv
.venv/

View File

@@ -4,11 +4,14 @@ Learning-based mailbox cleanup using Himalaya (IMAP) + Ollama (local LLM). Class
## Prerequisites
- **uv** — Python package manager, handles venv and dependencies automatically.
- **Himalaya** — CLI email client, handles IMAP connection and auth.
- **Ollama** — local LLM server.
- **Python 3.8+**
```bash
# Install uv (macOS)
brew install uv
# Install himalaya (macOS)
brew install himalaya
@@ -18,12 +21,6 @@ himalaya account list # should show your account after setup
# Install and start Ollama, pull the model
brew install ollama
ollama pull kamekichi128/qwen3-4b-instruct-2507:latest
# Set up Python venv and install dependencies
cd scripts/email_processor
python3 -m venv venv
source venv/bin/activate
pip install ollama
```
## How It Works

View File

@@ -12,15 +12,10 @@
# ./email-processor.sh review accept # accept all suggestions
# ./email-processor.sh stats # show history stats
#
# Requires: Python 3.8+, himalaya, Ollama running with model.
# Requires: uv, himalaya, Ollama running with model.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Activate the virtualenv if it exists
if [ -d "$SCRIPT_DIR/venv" ]; then
source "$SCRIPT_DIR/venv/bin/activate"
fi
exec python3 "$SCRIPT_DIR/main.py" "$@"
exec uv run --project "$SCRIPT_DIR" python "$SCRIPT_DIR/main.py" "$@"

View File

@@ -0,0 +1,5 @@
[project]
name = "email-processor"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = ["ollama"]

View File

@@ -1 +0,0 @@
python3.13

View File

@@ -1 +0,0 @@
python3.13

View File

@@ -1,5 +0,0 @@
home = /opt/homebrew/opt/python@3.13/bin
include-system-site-packages = false
version = 3.13.0
executable = /opt/homebrew/Cellar/python@3.13/3.13.0_1/Frameworks/Python.framework/Versions/3.13/bin/python3.13
command = /opt/homebrew/opt/python@3.13/bin/python3.13 -m venv /Users/ylu/Documents/me/youlu-openclaw-workspace/scripts/email_processor/venv