Split the worker into a distribution of its own
A cluster or GPU host installs `pip install fluksio-worker` and gets the agent and the runner, not psycopg, numpy and the MCP SDK. The engine depends on it as a workspace member, so the file it launches node code with is the same file a remote worker runs — which is what keeps a node unable to tell the difference. Copying the two files by hand still works. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,8 +28,12 @@ dependencies = [
|
||||
"influxdb-client[async]>=1.40.0",
|
||||
"croniter>=1.3.0",
|
||||
"mcp>=1.29,<2",
|
||||
"fluksio-worker>=0.1,<0.2",
|
||||
]
|
||||
|
||||
[tool.uv.sources]
|
||||
fluksio-worker = { workspace = true }
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest<8.0.0,>=7.4.3",
|
||||
@@ -42,6 +46,11 @@ dev = [
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["fluksio"]
|
||||
|
||||
# Named rather than excluded: this directory also holds a working tree's
|
||||
# runtime data — `flow-data/` with the user venv in it — which is not source.
|
||||
[tool.hatch.build.targets.sdist]
|
||||
include = ["fluksio", "tests", "scripts", "alembic.ini", "pyproject.toml", "README.md"]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
@@ -92,12 +101,6 @@ ignore = [
|
||||
# Printing is what this one is about: node code is user code, and `print` is
|
||||
# how it says things.
|
||||
"tests/flow/test_logs.py" = ["ARG001", "T201"]
|
||||
# This one takes its own directory off sys.path before the rest of its imports
|
||||
# run, which is the whole point of doing it there.
|
||||
"fluksio/flow/worker_main.py" = ["E402"]
|
||||
# A standalone script copied onto another machine: it has no logger configured
|
||||
# before it tells you the one dependency it is missing.
|
||||
"fluksio/worker/fluksio_worker.py" = ["T201"]
|
||||
|
||||
[tool.ruff.lint.pyupgrade]
|
||||
# Preserve types, even if a file imports `from __future__ import annotations`.
|
||||
|
||||
Reference in New Issue
Block a user