From 38cd58a190ec8b8433547e73a431f8eab5a125c1 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Tue, 13 Oct 2026 07:26:03 -0500 Subject: [PATCH] build(workspace): configure uv build-backend and add package readmes - Configure [tool.uv.build-backend] with module-name and module-root for worker and bff - Add package README files for services/worker and services/bff - Add pytest-asyncio to dev dependencies with auto loop scope - Mandate live todo.txt tracking in AGENTS.md --- AGENTS.md | 3 ++- pyproject.toml | 8 ++++++++ services/bff/README.md | 3 +++ services/bff/pyproject.toml | 5 +++++ services/worker/README.md | 3 +++ services/worker/pyproject.toml | 5 +++++ uv.lock | 15 +++++++++++++++ 7 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 services/bff/README.md create mode 100644 services/worker/README.md diff --git a/AGENTS.md b/AGENTS.md index 7115413..3222b75 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,8 @@ The working tree represents the user's active work. 2. **Check for Existing Files:** Before creating any new file, verify whether the file (or a user equivalent) already exists on disk. Never overwrite or re-scaffold user work. 3. **Never Overwrite Blindly:** Use available file-reading tools. Preserve user comments, links, and conventions. Prefer surgical edits over wholesale overwrites. 4. **No Destructive Git Commands:** Never run `reset --hard`, `clean -fd`, `restore`, `checkout`, `stash`, `rebase`, or `amend` without explicit permission. -5. **Final Diff Verification:** Before completing work, run `git status` and `git diff` to verify that no unrelated user changes were modified or discarded. Distinguish user changes from agent changes in completion reports. +5. **Live Task Tracking (`todo.txt`):** Keep `todo.txt` synchronized with code reality. When a task or milestone is implemented and verified, mark it as completed (`x YYYY-MM-DD ...`) immediately. Never leave completed work marked as pending. +6. **Final Diff Verification:** Before completing work, run `git status` and `git diff` to verify that no unrelated user changes were modified or discarded. Distinguish user changes from agent changes in completion reports. --- diff --git a/pyproject.toml b/pyproject.toml index ae98f70..4fa94fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dev = [ "mypy-protobuf>=5.1.0", "pyright>=1.1.411", "pytest>=8.0.0", + "pytest-asyncio>=0.24.0", "ruff>=0.16.5", ] @@ -33,3 +34,10 @@ extend-exclude = ["services/**/magnetflix/"] [tool.ruff.lint] select = ["E", "F", "I"] + +[tool.pytest.ini_options] +asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" +testpaths = ["tests"] +pythonpath = ["services/bff/src", "services/worker/src"] + diff --git a/services/bff/README.md b/services/bff/README.md new file mode 100644 index 0000000..5275a88 --- /dev/null +++ b/services/bff/README.md @@ -0,0 +1,3 @@ +# MagNetFlix BFF + +FastAPI Backend-for-Frontend and Web Gateway for MagNetFlix. diff --git a/services/bff/pyproject.toml b/services/bff/pyproject.toml index 50ff944..9c6fe66 100644 --- a/services/bff/pyproject.toml +++ b/services/bff/pyproject.toml @@ -16,3 +16,8 @@ dependencies = [ [build-system] requires = ["uv_build>=0.12.5,<0.13.0"] build-backend = "uv_build" + +[tool.uv.build-backend] +module-name = "bff" +module-root = "src" + diff --git a/services/worker/README.md b/services/worker/README.md new file mode 100644 index 0000000..71aa3a5 --- /dev/null +++ b/services/worker/README.md @@ -0,0 +1,3 @@ +# MagNetFlix Worker + +gRPC Pipeline Worker and Transmission coordinator for MagNetFlix. diff --git a/services/worker/pyproject.toml b/services/worker/pyproject.toml index 8682743..514ad03 100644 --- a/services/worker/pyproject.toml +++ b/services/worker/pyproject.toml @@ -18,3 +18,8 @@ dependencies = [ [build-system] requires = ["uv_build>=0.12.5,<0.13.0"] build-backend = "uv_build" + +[tool.uv.build-backend] +module-name = "worker" +module-root = "src" + diff --git a/uv.lock b/uv.lock index 5f9a59c..e968870 100644 --- a/uv.lock +++ b/uv.lock @@ -553,6 +553,7 @@ dev = [ { name = "mypy-protobuf" }, { name = "pyright" }, { name = "pytest" }, + { name = "pytest-asyncio" }, { name = "ruff" }, ] @@ -565,6 +566,7 @@ dev = [ { name = "mypy-protobuf", specifier = ">=5.1.0" }, { name = "pyright", specifier = ">=1.1.411" }, { name = "pytest", specifier = ">=8.0.0" }, + { name = "pytest-asyncio", specifier = ">=0.24.0" }, { name = "ruff", specifier = ">=0.16.5" }, ] @@ -826,6 +828,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] +[[package]] +name = "pytest-asyncio" +version = "1.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/7c/d36d04db312ecf4298932ef77e6e4a9e8ad017906e24e34f0b0c361a2473/pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42", size = 58514, upload-time = "2026-05-26T09:56:04.083Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/03/e2/08a497ef684b88559c9cc5f4ad53a37e7b99e727094a86d6ea32536d5d3c/pytest_asyncio-1.4.0-py3-none-any.whl", hash = "sha256:933ca923a23075a87fb7070c0ec272a6848489824d887c85c812670932835aa1", size = 16930, upload-time = "2026-05-26T09:56:02.576Z" }, +] + [[package]] name = "python-dotenv" version = "1.2.3"