feat: add gateway client with env-driven assembly

Includes config aggregation for multi-source env keys, from_env and
from_settings factories with explicit shared-backend injection,
gather_bounded, top-level exports, tightened import-linter layers with
the gate removed from the Makefile, and the finalized .env.example.
This commit is contained in:
2026-07-20 07:47:05 -04:00
parent 936895919c
commit 7b9815f4bc
30 changed files with 1701 additions and 253 deletions
+2 -7
View File
@@ -8,12 +8,9 @@ install:
test:
conda run -n $(ENV) pytest tests/ --cov=src/polygateway --cov-report=term-missing
# lint-imports 在 M1 模块落地前门控跳过(契约见 pyproject.toml [tool.importlinter]
lint:
conda run -n $(ENV) ruff check src/ tests/ --fix
@conda run -n $(ENV) python -c "import polygateway.ports" 2>/dev/null \
&& conda run -n $(ENV) lint-imports \
|| echo "import-linter: M1 模块未创建,跳过(契约已在 pyproject.toml 声明)"
conda run -n $(ENV) lint-imports
format:
conda run -n $(ENV) ruff format src/ tests/
@@ -21,9 +18,7 @@ format:
check:
conda run -n $(ENV) ruff format --check src/ tests/
conda run -n $(ENV) ruff check src/ tests/
@conda run -n $(ENV) python -c "import polygateway.ports" 2>/dev/null \
&& conda run -n $(ENV) lint-imports \
|| echo "import-linter: M1 模块未创建,跳过(契约已在 pyproject.toml 声明)"
conda run -n $(ENV) lint-imports
ci: check test