Skip to content

Cleanup Tier 2.3-2.7: magic strings/values to constants#104

Merged
jirhiker merged 1 commit into
chore/cleanup-tier1from
chore/cleanup-tier2
Jun 30, 2026
Merged

Cleanup Tier 2.3-2.7: magic strings/values to constants#104
jirhiker merged 1 commit into
chore/cleanup-tier1from
chore/cleanup-tier2

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Executes the rest of Tier 2 from docs/cleanup-todo.md. Stacked on #103 (base chore/cleanup-tier1). Merge order: #101#102#103 → this.

  • 2.3config.py parameter == "ph"PH constant.
  • 2.4 — record-type string compares ("analytes"/"waterlevels") → ANALYTES/WATERLEVELS constants in transformer.py + record.py; added ANALYTES = "analytes" to constants.py.
  • 2.5api/app.py bucket "die_cache" (×3) + queue "die-queue" → module constants _CACHE_BUCKET / _TASK_QUEUE.
  • 2.7definitions.py default cron "0 6 * * *" + timezone "America/Denver"_DEFAULT_CRON / _SCHEDULE_TIMEZONE.

2.6 deferred (router_parameters from PARAMETER_SOURCE_MAP): would force the lean API service to import all of backend.config (every connector + shapely) just for a display list, and changes the endpoint's response shape (dtw/tds codes → param keys). Needs a lightweight parameter registry or frontend coordination. Documented in the TODO.

No behavior change. Full suite 311 passed; dg check defs clean; py_compile over the API file clean.

🤖 Generated with Claude Code

- 2.3: config.py `parameter == "ph"` → `PH` constant.
- 2.4: record_type string compares (`"analytes"`/`"waterlevels"`) →
  `ANALYTES`/`WATERLEVELS` constants in transformer.py + record.py; added
  `ANALYTES = "analytes"` to constants.py.
- 2.5: api/app.py bucket `"die_cache"` (×3) and queue `"die-queue"` → module
  constants `_CACHE_BUCKET` / `_TASK_QUEUE`.
- 2.7: definitions.py default cron `"0 6 * * *"` and timezone `"America/Denver"`
  → `_DEFAULT_CRON` / `_SCHEDULE_TIMEZONE` constants.

2.6 (router_parameters from PARAMETER_SOURCE_MAP) deferred: it would force the
lean API service to import all of backend.config (every connector + shapely)
for a display list, and changes the endpoint's response shape. Documented in
docs/cleanup-todo.md.

No behavior change. Full suite (311) + dg check defs clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
die-orchestration View in Cloud Jun 30, 2026 at 12:59 AM (UTC)

@jirhiker jirhiker merged commit a2229df into chore/cleanup-tier1 Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant