Skip to content

Offline-safe Calibration and IMF SDMX 3.0 refresh#2

Open
SeaCelo wants to merge 5 commits intomainfrom
feature/port-ogzaf-106-111
Open

Offline-safe Calibration and IMF SDMX 3.0 refresh#2
SeaCelo wants to merge 5 commits intomainfrom
feature/port-ogzaf-106-111

Conversation

@SeaCelo
Copy link
Copy Markdown
Owner

@SeaCelo SeaCelo commented Apr 15, 2026

Make calibration offline-safe and refresh the IMF GFS data source.

Calibration (calibrate.py)

  • API updates are off by default
  • Each data source fails independently with a warning instead of crashing the whole calibration
  • Offline mode returns sensible defaults for the single-sector case

IMF GFS (macro_params.py)

  • Moves to the current SDMX 3.0 endpoint
  • Ethiopia uses the budgetary central government sector; other countries default to general government
  • Falls back to the last complete year if the target year is missing
  • Optional argument to save the raw pull to CSV

SAM loading (input_output.py)

  • Returns None on failure; downstream helpers raise a clear error if SAM is unavailable

Documentation (docs/book/content/calibration/macro.md)

  • Adds the GFS formulas for alpha_T and alpha_G and explains the sector choice for Ethiopia

Tests: new test_calibrate.py and test_input_output.py; test_macro_params.py rewritten with mocked HTTP.

@SeaCelo SeaCelo marked this pull request as draft April 16, 2026 03:02
@SeaCelo SeaCelo marked this pull request as ready for review April 19, 2026 02:46
@SeaCelo
Copy link
Copy Markdown
Owner Author

SeaCelo commented Apr 19, 2026

This mirrors the ZAF changes. Ready for review
@jdebacker @rickecon

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