From 0284ab800abce650ccc0eb684c80205f3753f974 Mon Sep 17 00:00:00 2001 From: Jacob Nelson Date: Sun, 23 Aug 2026 16:41:18 -0500 Subject: [PATCH] feat(agent): scaffold Python package for the accounting agent worker --- .gitignore | 4 ++++ agent/pyproject.toml | 26 ++++++++++++++++++++++++++ agent/src/agent/__init__.py | 1 + agent/src/agent/jobs/__init__.py | 0 agent/tests/test_smoke.py | 4 ++++ 5 files changed, 35 insertions(+) create mode 100644 agent/pyproject.toml create mode 100644 agent/src/agent/__init__.py create mode 100644 agent/src/agent/jobs/__init__.py create mode 100644 agent/tests/test_smoke.py diff --git a/.gitignore b/.gitignore index 2334d82..2f53b7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ .env *.log +.venv/ +__pycache__/ +*.egg-info/ +.pytest_cache/ diff --git a/agent/pyproject.toml b/agent/pyproject.toml new file mode 100644 index 0000000..e57172c --- /dev/null +++ b/agent/pyproject.toml @@ -0,0 +1,26 @@ +[project] +name = "firefly-agent" +version = "0.1.0" +description = "Personal accounting agent worker for the Firefly III stack" +requires-python = ">=3.12" +dependencies = [ + "apscheduler>=3.10,<4", + "httpx>=0.27", + "psycopg[binary]>=3.1", +] + +[project.optional-dependencies] +dev = [ + "pytest>=8", + "testcontainers[postgres]>=4", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/agent"] + +[tool.pytest.ini_options] +testpaths = ["tests"] diff --git a/agent/src/agent/__init__.py b/agent/src/agent/__init__.py new file mode 100644 index 0000000..3dc1f76 --- /dev/null +++ b/agent/src/agent/__init__.py @@ -0,0 +1 @@ +__version__ = "0.1.0" diff --git a/agent/src/agent/jobs/__init__.py b/agent/src/agent/jobs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/agent/tests/test_smoke.py b/agent/tests/test_smoke.py new file mode 100644 index 0000000..af2fbfe --- /dev/null +++ b/agent/tests/test_smoke.py @@ -0,0 +1,4 @@ +def test_package_imports(): + import agent + + assert agent.__version__ == "0.1.0"