-
Notifications
You must be signed in to change notification settings - Fork 0
feat: new OEO database compliant with version 3 of Temoa #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdded a new top-level manifest entry for Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
manifest.json (1)
46-47: Replace placeholders at merge for traceability.Swap "pending-merge" with the actual merge commit SHA and a meaningful description when merging.
Apply on merge:
- "commit": "pending-merge", - "description": "pending-merge" + "commit": "<merge-commit-sha>", + "description": "OEO database compatible with Temoa v3; initial v1 release (PR #35)."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
manifest.json(1 hunks)
🔇 Additional comments (2)
manifest.json (2)
35-49: New manifest entry looks consistent.Fields match existing schema patterns; versioning, timestamp format, sha256 length, and object key paths look correct for an initial v1.
35-49: Correct manifest integrity check script — quoting errors in the shell snippet prevent it from running. Update the script to validate:
- unique
fileNamevalueslatestVersionequals the lasthistoryentry’sversionv1entries havediffFromPrevious: null- all
sha256fields are 64 characters- every
r2_object_keyends with.sqlite
Co-authored-by: mikeblackhurst <mfb@andrew.cmu.edu>
15c7779 to
a4df421
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
manifest.json (2)
44-44: Confirm downstream tolerance for the new optional field "staging_key".Older entries don’t include this field. If consumers validate against a fixed schema, this could break them. Consider documenting it as optional or stripping it at publish time.
Apply this if you decide to omit it from the committed manifest:
- "staging_key": "staging-uploads/a3b3a8f27bf422a8a15ca2e0ae3b08cc43956c73de0e0a766d754e8a46e032c4.sqlite",
46-47: Replace placeholders; populate a concise description now and commit hash on merge.Keep "commit" as a placeholder only if your release script overwrites it. Recommend filling "description" with a human-readable summary from this PR.
- "commit": "pending-merge", - "description": "pending-merge" + "commit": "pending-merge", + "description": "Temoa v3 OEO DB: lifetimes/cost fixes, ELCP label cleanup, unlim-cap flags, units, and numerical-stability adjustments (PR #35)."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
manifest.json(1 hunks)
🔇 Additional comments (2)
manifest.json (2)
35-49: LGTM: new manifest entry is well-formed and consistent with existing structure.Fields, ISO-8601 UTC timestamp, and r2 key naming look correct. No blocking issues.
35-49: All invariants forUS_9R_8D_v3_stability.sqliteverified
All checks (latestVersion, SHA-256 format, key containment, timestamp format, commit placeholder) passed.
Notes provided by @mikeblackhurst
Summary of changes to address errors and warnings triggered by Temoa v3 codebase
Lifetime fixes
Added missing technology lifetimes
Adjusted lifetimes for a few technologies so they match actual intended retirement dates to preserve network integrity
Reconciled differences between Efficiency and TechInputSplit tables:
Removed orphaned or mismatched technology–region–commodity combinations.
Dropped TechInputSplit rows where the technology did not also exist in Efficiency.
For solar residential water heaters (e.g., R_WH_SOLST_ELC_N), replaced electric inputs (ELC) with corrected labels (ELC_RES).
Fixed a known missing input for C_WH_SOLST_ELC_N by adding it back with a substitute input.
Unlimited capacity (unlim_cap) technologies
For unlimited-capacity technologies, removed unnecessary vintage records (only kept the earliest valid vintage).
Ensured costs are applied to all planning periods (so these technologies don’t lose cost data in later years).
Added missing cost entries for extended lifetimes
Marked additional industrial heat, blending, steel, hydrogen, and transport biofuel technologies as unlimited capacity (unlim_cap =
Cost fixes
Removed CostFixed entries that were clearly zero-cost database errors (e.g., for I_ISF_EAF technologies).
Added missing variable costs for certain technologies
Commodity label cleanup
Standardized all commodities labeled “ELCP_*” (except those with _DC) to simply “ELCP” across Efficiency, TechInputSplit, EmissionActivity, MyopicEfficiency, and Commodity tables.
Summary of changes made for numerical stability
TechInputSplit
Removed extremely small (negligible) input split constraints
Water transport
Increased the demand for tugboats used for inland barge transportation (commodity = TMDHDV_WTT) to be similar to values reported at
https://ndclibrary.sec.usace.army.mil/searchResults?series=Fact%20Cards
Efficiency of tugboat technologies (tech = T_HDV_WTT) changed based upon:.
Kruse CJ, Farzaneh R, Glover B, et al. A modal comparison of domestic freight transportation effects on the general public: 2001–2019. Published online 2021. Accessed September 4, 2025. https://rosap.ntl.bts.gov/view/dot/60644
All references to water passenger transportation were moved because they were negligible (commodity = TMDHDV_WTP)
Soybeans Technologies Consolidation
Soybeans_STEP70, STEP80, and STEP90 merged into a single Soybeans_STEP80 technology
Demand Specific Distributions
Very small demand values (< 1e-4) in DemandSpecificDistribution reallocated to the nearest larger neighbor (based on season and time-of-day order).
Values normalized so that each distribution still sums to exactly 1 per region and demand type.
Units
Miscellaneous
Summary by CodeRabbit