mirror of
https://github.com/Sea-Haven-Industries/apm-wo-analysis.git
synced 2026-09-30 19:23:16 +00:00
Stand up the Phase 0 CDK scaffold for the daily APM work-order analysis pipeline: two-stack CDK app (pipeline + grafana), classifier and slack-post Lambda packages, dashboards-as-code, the local drop-folder uploader, and a classifier smoke-test placeholder. Wire CI/CD to the org reusable workflows: ci.yaml -> ci-python-sam (ruff + cdk synth) and deploy.yaml -> cd-cdk (OIDC, cdk deploy --all). Pin aws-cdk-lib==2.253.1; Lambdas target Python 3.12 / arm64. Rewrite .gitignore to the org Python-CDK standard so the source-of- truth files (CLAUDE.md, docs/, .claude/agents) are tracked while build artifacts (.venv, cdk.out, caches) stay ignored. Domain logic, stack resources, and dashboards are stubbed and filled in across Phases 1-5 (docs/BUILD.md). cdk synth is green for both stacks; ruff check/format pass.
24 lines
891 B
Python
24 lines
891 B
Python
"""Smoke test for the two-axis classifier.
|
|
|
|
The full smoke test — run ``classify()`` over the sample export
|
|
(~/Downloads/_documents/Sheet1-1.xlsx) and assert "Other" <= ~10% with known
|
|
fixtures landing in the right buckets — is added in Phase 2 (docs/BUILD.md) and
|
|
owned by the classifier-engineer agent. This placeholder keeps the test layout
|
|
in place and guards the classification constants.
|
|
"""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(
|
|
0, str(Path(__file__).resolve().parent.parent / "lambdas" / "classifier")
|
|
)
|
|
|
|
import classify # noqa: E402
|
|
|
|
|
|
def test_classification_constants_well_formed():
|
|
assert "3rd Escalation" in classify.ESCALATION_CATEGORIES
|
|
assert classify.HOLD_TO_CATEGORY["SCHEDULING"] == "Awaiting Scheduling"
|
|
# Every escalation category is also action-needed.
|
|
assert classify.ESCALATION_CATEGORIES <= classify.ACTION_NEEDED_CATEGORIES
|