alpha-engine-lib 0.34.0__tar.gz → 0.34.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/PKG-INFO +1 -1
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/pyproject.toml +1 -1
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/__init__.py +1 -1
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/read.py +25 -1
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/PKG-INFO +1 -1
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_pipeline_status_read.py +22 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/README.md +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/setup.cfg +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/agent_schemas.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/alerts.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/arcticdb.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/collector_results.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/cost.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/dates.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/decision_capture.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/ec2_spot.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/email_sender.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/eval_artifacts.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/logging.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/model_pricing.yaml +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pillars.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/__init__.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/registry.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/templates.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/preflight.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/__init__.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/db.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/embeddings.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/migrations/0001_content_tsv.sql +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/rerank.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/retrieval.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/rag/schema.sql +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/reconcile.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/secrets.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/sources/__init__.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/sources/protocols.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/ssm_log_capture.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/telegram.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/trading_calendar.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/transparency.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/transparency_inventory.yaml +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/universe.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/SOURCES.txt +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/dependency_links.txt +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/requires.txt +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/top_level.txt +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_agent_schemas.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_alerts.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_arcticdb.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_collector_results.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_cost.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_dates.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_decision_capture.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_ec2_spot.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_email_sender.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_eval_artifacts.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_logging.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_pillars.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_pipeline_status_registry.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_pipeline_status_templates.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_preflight.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_rag.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_rag_rerank.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_rag_retrieval_hybrid.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_reconcile.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_secrets.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_sources_protocols.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_ssm_log_capture.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_telegram.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_trading_calendar.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_transparency.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_universe.py +0 -0
- {alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/tests/test_version_pin.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alpha-engine-lib
|
|
3
|
-
Version: 0.34.
|
|
3
|
+
Version: 0.34.1
|
|
4
4
|
Summary: Shared utilities for the Alpha Engine modules: preflight, structured logging with secret-redaction, ArcticDB universe access, NYSE-calendar dates + freshness predicates, decision capture, cost telemetry, RAG, agent output schemas, SSM-backed secrets, Telegram alerts + SNS fan-out, EC2 spot-launch resilience, SSM log-capture chokepoint, and Step-Functions execution-state projection. Full surface documented in README.
|
|
5
5
|
Author: Brian McMahon
|
|
6
6
|
License: Proprietary
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "alpha-engine-lib"
|
|
7
|
-
version = "0.34.
|
|
7
|
+
version = "0.34.1"
|
|
8
8
|
description = "Shared utilities for the Alpha Engine modules: preflight, structured logging with secret-redaction, ArcticDB universe access, NYSE-calendar dates + freshness predicates, decision capture, cost telemetry, RAG, agent output schemas, SSM-backed secrets, Telegram alerts + SNS fan-out, EC2 spot-launch resilience, SSM log-capture chokepoint, and Step-Functions execution-state projection. Full surface documented in README."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
# EC2 still runs Python 3.9 on the always-on micro instance (boto3 drops
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/read.py
RENAMED
|
@@ -191,6 +191,30 @@ def _label_for_arn(state_machine_arn: str) -> str:
|
|
|
191
191
|
return PIPELINE_LABELS.get(sm_name, sm_name or "Unknown SF")
|
|
192
192
|
|
|
193
193
|
|
|
194
|
+
def _region_from_arn(state_machine_arn: str) -> Optional[str]:
|
|
195
|
+
"""Extract the AWS region from a Step Functions ARN.
|
|
196
|
+
|
|
197
|
+
ARN shape: ``arn:aws:states:<region>:<account>:stateMachine:<name>``.
|
|
198
|
+
Returns the region segment, or None if the ARN doesn't parse — in
|
|
199
|
+
which case the boto3 client falls back to its normal region resolution
|
|
200
|
+
(env vars / config / instance metadata). The lib is permissive on
|
|
201
|
+
malformed input here because the downstream boto3 call will fail
|
|
202
|
+
loud with a typed error that surfaces via ``_raise_for_boto_error``.
|
|
203
|
+
|
|
204
|
+
Why this exists: Step Functions is a regional service and boto3
|
|
205
|
+
raises ``NoRegionError`` if no region is discoverable. Streamlit
|
|
206
|
+
systemd environments on EC2 may not have ``AWS_REGION`` set, but the
|
|
207
|
+
ARN ALWAYS carries the region — extracting it eliminates a class of
|
|
208
|
+
"missing region" failures at the lib chokepoint.
|
|
209
|
+
"""
|
|
210
|
+
if not state_machine_arn or not state_machine_arn.startswith("arn:"):
|
|
211
|
+
return None
|
|
212
|
+
parts = state_machine_arn.split(":")
|
|
213
|
+
if len(parts) < 4 or not parts[3]:
|
|
214
|
+
return None
|
|
215
|
+
return parts[3]
|
|
216
|
+
|
|
217
|
+
|
|
194
218
|
def _failure_cause_from(describe_resp: dict) -> str:
|
|
195
219
|
"""Extract + truncate the failure cause from DescribeExecution response.
|
|
196
220
|
|
|
@@ -430,7 +454,7 @@ def read_pipeline_state(
|
|
|
430
454
|
if client is None: # pragma: no cover — production path
|
|
431
455
|
import boto3
|
|
432
456
|
|
|
433
|
-
client = boto3.client("stepfunctions")
|
|
457
|
+
client = boto3.client("stepfunctions", region_name=_region_from_arn(state_machine_arn))
|
|
434
458
|
|
|
435
459
|
label = _label_for_arn(state_machine_arn)
|
|
436
460
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alpha-engine-lib
|
|
3
|
-
Version: 0.34.
|
|
3
|
+
Version: 0.34.1
|
|
4
4
|
Summary: Shared utilities for the Alpha Engine modules: preflight, structured logging with secret-redaction, ArcticDB universe access, NYSE-calendar dates + freshness predicates, decision capture, cost telemetry, RAG, agent output schemas, SSM-backed secrets, Telegram alerts + SNS fan-out, EC2 spot-launch resilience, SSM log-capture chokepoint, and Step-Functions execution-state projection. Full surface documented in README.
|
|
5
5
|
Author: Brian McMahon
|
|
6
6
|
License: Proprietary
|
|
@@ -37,6 +37,7 @@ from alpha_engine_lib.pipeline_status.read import (
|
|
|
37
37
|
_failure_cause_from,
|
|
38
38
|
_materialize_tasks,
|
|
39
39
|
_parse_ts,
|
|
40
|
+
_region_from_arn,
|
|
40
41
|
)
|
|
41
42
|
from alpha_engine_lib.pipeline_status.registry import (
|
|
42
43
|
ArchivePageRef,
|
|
@@ -440,3 +441,24 @@ def test_pretty_label_falls_back_to_arn_suffix_for_unknown_sf():
|
|
|
440
441
|
arn = "arn:aws:states:us-east-1:711398986525:stateMachine:future-pipeline-name"
|
|
441
442
|
run = read_pipeline_state(arn, client=client)
|
|
442
443
|
assert run.pretty_label == "future-pipeline-name"
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
# ── Region extraction ─────────────────────────────────────────────────────
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def test_region_from_arn_extracts_us_east_1():
|
|
450
|
+
assert _region_from_arn(SATURDAY_ARN) == "us-east-1"
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
def test_region_from_arn_extracts_non_us_east_1():
|
|
454
|
+
arn = "arn:aws:states:eu-west-2:123456789012:stateMachine:some-pipeline"
|
|
455
|
+
assert _region_from_arn(arn) == "eu-west-2"
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
def test_region_from_arn_returns_none_for_malformed():
|
|
459
|
+
"""Permissive on bad input — boto3 will raise NoRegionError downstream,
|
|
460
|
+
which surfaces as a typed PipelineStatusError per _raise_for_boto_error."""
|
|
461
|
+
assert _region_from_arn("") is None
|
|
462
|
+
assert _region_from_arn("not-an-arn") is None
|
|
463
|
+
assert _region_from_arn("arn:aws:states") is None
|
|
464
|
+
assert _region_from_arn("arn:aws:states::123:stateMachine:x") is None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/collector_results.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/decision_capture.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/__init__.py
RENAMED
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/pipeline_status/registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/sources/__init__.py
RENAMED
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/sources/protocols.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/trading_calendar.py
RENAMED
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib/transparency_inventory.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/requires.txt
RENAMED
|
File without changes
|
{alpha_engine_lib-0.34.0 → alpha_engine_lib-0.34.1}/src/alpha_engine_lib.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|