Require ogcore 0.16.3, regenerate the baseline demographics, and guard against drift#7
Open
marcelolafleur wants to merge 4 commits into
Open
Require ogcore 0.16.3, regenerate the baseline demographics, and guard against drift#7marcelolafleur wants to merge 4 commits into
marcelolafleur wants to merge 4 commits into
Conversation
This was referenced Jul 10, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
=======================================
Coverage ? 86.81%
=======================================
Files ? 16
Lines ? 743
Branches ? 0
=======================================
Hits ? 645
Misses ? 98
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ogcore 0.16.3 changed how the pre-time-path population is handled (PSLmodels/OG-Core#1073): the demographic transition arrays shift by one period, and three new period-0 seeds (
g_n_preTP,imm_rates_preTP,rho_preTP) feed the aggregation of investment, wealth, and bequests. A baseline baked under older ogcore is silently inconsistent under 0.16.3 — in OG-BRA the baseline time path converged but failed the resource-constraint check (max error 0.024). Same fix as OG-PHL#67, OG-ZAF#134, OG-IDN#52, and OG-ETH#63.Three changes:
ogcore>=0.16.3and Python 3.12+ (ogcore 0.16.2 dropped 3.11; on 3.11 dependency resolution silently falls back to ogcore 0.16.1). The CI matrix now tests 3.12 and 3.13 — it was not testing 3.13 before.tests/test_consistency.py) so this class of breakage fails in CI instead of at solve time: the packaged baseline must carry every demographic seed the installed ogcore defines (this test fails on the pre-fix baseline with a "regenerate demographics" message), and a feature canary plus wheel-RECORD check catch a stale or locally built ogcore masquerading under a release version number. The sister repos don't have these yet; happy to port them over if useful.Also fixes the stale README runtime note (a full baseline + reform run takes about 15–20 minutes, not "35 minutes to two hours").
Tested:
pytest -m 'not local'passes (26 tests) on 3.12/3.13; the baseline and CIT-reform example solves.cc @rickecon @jdebacker