From ff896685d2a3ee523a5df9717c341b36bac26ae5 Mon Sep 17 00:00:00 2001 From: Deeman Date: Sat, 21 Feb 2026 21:59:08 +0100 Subject: [PATCH] Add extract_ice_all command to run all three ICE extractors in sequence Co-Authored-By: Claude Sonnet 4.6 --- extract/ice_stocks/pyproject.toml | 1 + extract/ice_stocks/src/ice_stocks/execute.py | 7 +++++++ src/materia/pipelines.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/extract/ice_stocks/pyproject.toml b/extract/ice_stocks/pyproject.toml index 564116e..c894cee 100644 --- a/extract/ice_stocks/pyproject.toml +++ b/extract/ice_stocks/pyproject.toml @@ -12,6 +12,7 @@ dependencies = [ extract_ice = "ice_stocks.execute:extract_ice_stocks" extract_ice_aging = "ice_stocks.execute:extract_ice_aging" extract_ice_historical = "ice_stocks.execute:extract_ice_historical" +extract_ice_all = "ice_stocks.execute:extract_ice_all" [build-system] requires = ["hatchling"] diff --git a/extract/ice_stocks/src/ice_stocks/execute.py b/extract/ice_stocks/src/ice_stocks/execute.py index 63c3764..70e3fee 100644 --- a/extract/ice_stocks/src/ice_stocks/execute.py +++ b/extract/ice_stocks/src/ice_stocks/execute.py @@ -429,5 +429,12 @@ def extract_ice_historical() -> None: _write_landing_file(canonical_csv, HISTORICAL_DEST_SUBDIR, today) +def extract_ice_all() -> None: + """Run all three ICE extractors: daily stocks, aging report, historical by port.""" + extract_ice_stocks() + extract_ice_aging() + extract_ice_historical() + + if __name__ == "__main__": extract_ice_stocks() diff --git a/src/materia/pipelines.py b/src/materia/pipelines.py index 932d1a2..943ec1c 100644 --- a/src/materia/pipelines.py +++ b/src/materia/pipelines.py @@ -36,6 +36,10 @@ PIPELINES = { "command": ["uv", "run", "--package", "ice_stocks", "extract_ice_historical"], "timeout_seconds": 600, }, + "extract_ice_all": { + "command": ["uv", "run", "--package", "ice_stocks", "extract_ice_all"], + "timeout_seconds": 1800, + }, "transform": { "command": ["uv", "run", "--package", "sqlmesh_materia", "sqlmesh", "-p", "transform/sqlmesh_materia", "plan", "prod", "--no-prompts", "--auto-apply"], "timeout_seconds": 3600,