Skip to content

fix: RYC metadata and pandas warnings (v5.5 sync residuals)#433

Open
brightyorcerf wants to merge 1 commit intoEAPD-DRB:mainfrom
brightyorcerf:fix/v5.5-post-sync-residuals
Open

fix: RYC metadata and pandas warnings (v5.5 sync residuals)#433
brightyorcerf wants to merge 1 commit intoEAPD-DRB:mainfrom
brightyorcerf:fix/v5.5-post-sync-residuals

Conversation

@brightyorcerf
Copy link
Copy Markdown
Contributor

@brightyorcerf brightyorcerf commented Apr 13, 2026

Linked issue

Existing related work reviewed

Overlap assessment

  • Classification: Follow-up / Stability Fix
  • Overlapping items: MUIO v5.5 Baseline Sync
  • Why this is not duplicate/superseded: This PR addresses specific "residuals" identified during the v5.5 sync that were intentionally left for a targeted patch to maintain a clean upstream baseline.

Why this PR should proceed

It completes the stabilization of the v5.5 migration by fixing UI-breaking metadata gaps and ensuring backend compatibility with modern pandas environments (silencing deprecation noise).

Summary

What changed:

  • Metadata Correction: Updated Variables.json for the RYC group (Energy Balance shadow prices), correcting the unitRule token from EmiUnit to CommUnit.
  • Constant Alignment: Appended RYC to the VAR_COMM_GROUPS array in Const.Class.js to ensure the Results engine initializes the correct view class.
  • Backend Hygiene: Added explicit dtype='object' to empty DataFrame initialization in DataFileClass.py to silence FutureWarning logs during CBC post-processing.

Why:

An audit revealed that RYC display was failing for two reasons:

  • Group Omission: Because RYC was missing from VAR_COMM_GROUPS, the Javascript grouping engine skipped allocating a view class entirely.
  • Token Mismatch: The unitRule for EB_d incorrectly referenced EmiUnit (Emissions). Since shadow prices for Energy Balance are commodity-based, jsonLogic produced undefined when trying to apply the rule.

Result: This fix ensures shadow prices properly reflect the Currency / Commodity marginal cost ratio in the results view.
Stability: Silences persistent type-inference warnings introduced in pandas 2.1+ that cluttered the backend logs.

Validation

  • Tests added/updated (or not applicable)
  • Validation steps documented
  • Evidence attached (logs/screenshots/output as relevant)

Documentation

  • Docs updated in this PR (or not applicable)
  • Any setup/workflow changes reflected in repo docs

Scope check

  • No unrelated refactors
  • Implemented from a feature branch
  • Change is deliverable without upstream OSeMOSYS/MUIO dependency
  • Base repo/branch is EAPD-DRB/MUIOGO:main (not upstream)

Exception rationale

blank

@github-actions github-actions Bot added the needs-intake-fix PR intake structure needs maintainer follow-up label Apr 13, 2026
@brightyorcerf brightyorcerf changed the title Fix v5.5 sync residuals: RYC metadata and pandas warnings fix: RYC metadata and pandas warnings (v5.5 sync residuals) Apr 13, 2026
@brightyorcerf brightyorcerf mentioned this pull request Apr 13, 2026
10 tasks
@brightyorcerf brightyorcerf force-pushed the fix/v5.5-post-sync-residuals branch 2 times, most recently from 1049d11 to 5989678 Compare April 13, 2026 19:43
@brightyorcerf
Copy link
Copy Markdown
Contributor Author

brightyorcerf commented Apr 13, 2026

These are minimal-diff, high-leverage changes intended to bridge the metadata gap without introducing upstream divergence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-intake-fix PR intake structure needs maintainer follow-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Fix v5.5 sync residuals: RYC metadata gap and pandas deprecation warnings

1 participant