Derive the cost-coefficient ratio to the system base ourselves - #166
Merged
Merged
Conversation
InfrastructureSystems 2a2494ec moved the unit-system base arithmetic out of convert_cost_coefficient, which now takes a bare x-axis ratio, so every cost path failed on the IS4 head with a MethodError. _system_base_ratio derives the ratio the way IS used to (SU 1, CU sb/db, NU sb) and the four per-system-unit helpers pass it through; a unit test pins the three ratios for each helper.
Coverage.jl caps HTTP at 1.x and the OpenAPI.jl 1.x packages need HTTP 2.x, so the test environment has not resolved since the IS4 pin moved, on CI and locally. CI collects coverage through julia-processcoverage and never loaded the package; the local lcov script now runs from scripts/coverage, its own environment.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
rodrigomha
requested review from
jd-lara and
luke-kiernan
and removed request for
jd-lara
September 14, 2026 20:50
jd-lara
approved these changes
Sep 14, 2026
jd-lara
approved these changes
Sep 14, 2026
rodrigomha
added a commit
that referenced
this pull request
Sep 14, 2026
Brings IOM #166: cost conversions derive their ratio to the system base (IS 2a2494ec changed convert_cost_coefficient), and the coverage tooling leaves the test environment.
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.
InfrastructureSystems 2a2494ec (IS4, 2026-09-01) moved the unit-system base arithmetic out of
convert_cost_coefficient: it now takes a bare x-axis ratio, and the package that owns the base powers derives it. IOM still called the removed five-argument form, so every cost path on the IS4 head failed withMethodError: no method matching convert_cost_coefficient(::Float64, ::NaturalUnit, ::SystemBaseUnit, ...)(64 of the errors in PowerOperationsModels #300's CI, andmain's own red CI)._system_base_ratio(unit_system, system_base_power, device_base_power)derives the ratio to the system base the way IS used to (SU 1, CUsb / db, NUsb), and the four helpers incomponent_utils.jlpass it through.test_cost_unit_conversion.jlpins the three ratios for the proportional, quadratic, point-curve and step-curve helpers.The test environment also could not resolve, on CI and locally: Coverage.jl caps HTTP at 1.x while the OpenAPI.jl 1.x packages need 2.x, which is what has kept
main's CI red since the IS4 pin moved. CI collects coverage throughjulia-processcoverageand never loaded the package, so Coverage and CoverageTools leavetest/Project.toml; the local lcov script runs fromscripts/coverage, its own environment.The
analyzecheck (the performance comparison) instantiatesmain's test environment before this branch's, so it keeps failing on the same Coverage conflict until this merges. Locally, on the IS4 head: 1,453 tests pass plus Aqua. PowerOperationsModels #301 pins this branch until it merges.🤖 Generated with Claude Code