Put the deployment-only dependencies behind a server extra
A data-science environment installing fluksio waited for lxml, aiohttp and the rest of a connector stack it has nothing to talk to. Outbound mail, error reporting and the MQTT and InfluxDB clients moved to `fluksio[server]`, which the image installs; each import is guarded and names the extra. `tenacity` had no import site at all and is gone. 23 fewer packages and the compiled ones among them — a bare `pip install fluksio` still serves, runs every python node, and registers the mqtt and influxdb node types, which only need the library when one is actually built. sentry-sdk arrives anyway underneath `fastapi[standard]`; what changed there is that nothing of ours requires it. The dev environment keeps every extra: the suite exercises the connectors and strict mypy checks their call sites. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Hra4ndWMCLU5F3KjUuVAc
This commit is contained in:
@@ -105,11 +105,13 @@ down: ## Stop all running containers
|
||||
# Run `make dev-backend` and `make dev-frontend` in two separate terminals.
|
||||
|
||||
install: ## Install all dependencies (backend + frontend)
|
||||
cd backend && uv sync
|
||||
# Every extra: the suite exercises the connectors that moved into
|
||||
# `fluksio[server]`, and strict mypy checks their call sites.
|
||||
cd backend && uv sync --all-extras
|
||||
cd frontend && bun install
|
||||
|
||||
dev-backend: ## Start the FastAPI backend with hot-reload (local)
|
||||
cd backend && uv run fastapi dev fluksio/main.py
|
||||
cd backend && uv run --all-extras fastapi dev fluksio/main.py
|
||||
|
||||
dev-frontend: ## Start the Vite dev server (local)
|
||||
cd frontend && bun dev
|
||||
@@ -130,7 +132,7 @@ test: test-backend test-frontend ## Run all tests (backend + frontend)
|
||||
test-backend: ## Run backend tests (pytest + coverage)
|
||||
# Its own SQLite file in a temp directory (tests/__init__.py), so this needs
|
||||
# nothing running and touches no development data.
|
||||
cd backend && uv run bash scripts/test.sh
|
||||
cd backend && uv run --all-extras bash scripts/test.sh
|
||||
|
||||
PW_VERSION = $(shell sed -n 's/.*"@playwright\/test": "[^0-9]*\([0-9.]*\)".*/\1/p' frontend/package.json | head -1)
|
||||
|
||||
@@ -181,9 +183,9 @@ build: ## Build the fluksio and fluksio-worker wheels into dist/
|
||||
lint: lint-backend lint-frontend ## Run all linters
|
||||
|
||||
lint-backend: ## Lint backend with ruff + mypy
|
||||
cd backend && uv run ruff check .
|
||||
cd backend && uv run ruff format --check .
|
||||
cd backend && uv run mypy fluksio
|
||||
cd backend && uv run --all-extras ruff check .
|
||||
cd backend && uv run --all-extras ruff format --check .
|
||||
cd backend && uv run --all-extras mypy fluksio
|
||||
cd worker && uv run --no-project --with mypy mypy fluksio_worker
|
||||
|
||||
lint-frontend: ## Lint frontend with biome
|
||||
|
||||
Reference in New Issue
Block a user