From db46a154c81f6c65be6f59ca743df0c70be7afaa Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Mon, 4 May 2026 21:54:17 +0200 Subject: [PATCH] chore: project scaffolding mit uv und pyproject.toml --- .env.example | 12 ++++++++++++ .gitignore | 12 ++++++++++++ app/__init__.py | 0 app/ingest/__init__.py | 0 app/webhook/__init__.py | 0 pyproject.toml | 37 +++++++++++++++++++++++++++++++++++++ tests/__init__.py | 0 7 files changed, 61 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 app/__init__.py create mode 100644 app/ingest/__init__.py create mode 100644 app/webhook/__init__.py create mode 100644 pyproject.toml create mode 100644 tests/__init__.py diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..892125c --- /dev/null +++ b/.env.example @@ -0,0 +1,12 @@ +NEXTCLOUD_WEBDAV_URL=https://nc.example.com/remote.php/dav/files/myuser +NEXTCLOUD_USER=myuser +NEXTCLOUD_APP_PASSWORD=changeme +OLLAMA_URL=http://ollama:11434 +OLLAMA_EMBED_MODEL=qwen3-embedding:0.6b +QDRANT_URL=http://qdrant:6333 +QDRANT_COLLECTION=rag_thb_studium +WEBHOOK_SECRET=changeme +INGEST_ROOT=Documents/THB/Studium +CHUNK_SIZE_WORDS=500 +CHUNK_OVERLAP_WORDS=50 +LOG_LEVEL=INFO diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9c0394 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +__pycache__/ +*.pyc +.pytest_cache/ +.venv/ +venv/ +.env +*.egg-info/ +dist/ +build/ +.coverage +.idea/ +.vscode/ diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/ingest/__init__.py b/app/ingest/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/webhook/__init__.py b/app/webhook/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..93716a5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,37 @@ +[project] +name = "rag-ingestor" +version = "0.1.0" +description = "Nextcloud → Qdrant RAG ingestion service" +requires-python = ">=3.12" +dependencies = [ + "fastapi>=0.115", + "uvicorn[standard]>=0.32", + "httpx>=0.28", + "pydantic>=2.10", + "pydantic-settings>=2.7", + "pymupdf>=1.25", + "python-docx>=1.1", + "ollama>=0.4", + "qdrant-client>=1.12", +] + +[dependency-groups] +dev = [ + "pytest>=8.3", + "pytest-asyncio>=0.25", + "respx>=0.22", +] + +[tool.pytest.ini_options] +asyncio_mode = "auto" +testpaths = ["tests"] + +[tool.uv] +package = true + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["app"] diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29