Add CoolProp 8 compatibility, drop coolprop<8 dev constraint - #152
Merged
Conversation
CoolProp 8 raises ValueError (was RuntimeError in v7) for unknown fluids in get_REFPROPname, so catch both in fluids.get_name. The reworked cubic EOS saturation routines in v8 also introduce ~1e-10 roundoff in the PR/SRK pressure roundtrip, so test_eos and test_eos_config now compare p with assert_allclose instead of exact equality. With ccp compatible with both major versions, remove the constraint-dependencies = ["coolprop<8"] dev/CI pin from [tool.uv].
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.
Summary
Makes ccp compatible with CoolProp 8.0.0 and removes the temporary
coolprop<8dev/CI resolution constraint added in #151.ccp/config/fluids.py: CoolProp 8 raisesValueError(v7 raisedRuntimeError) fromget_REFPROPnamefor unknown fluids —get_namenow catches both and keeps raising ccp's ownValueErrorwith theccp.fluid_listhint.ccp/tests/test_state.py: CoolProp 8's reworked cubic-EOS saturation routines introduce ~1e-10 roundoff in the PR/SRK pressure roundtrip (100000.00000000015 Pa instead of exactly 100000), sotest_eos/test_eos_configcompare pressure withassert_allcloseinstead of==, matching the existing HEOS blocks.pyproject.toml: removedconstraint-dependencies = ["coolprop<8"]from[tool.uv]. This was a dev/CI-only pin and never affected published metadata; with ccp now compatible with both major versions, fresh resolution is free to pick 8.x.CoolProp 8 wheels are Python 3.12+ (abi3); since the dependency is unpinned and
requires-python >=3.9, older Pythons keep resolving to 7.x automatically.Testing
Full test suite against a fresh resolution with CoolProp 8.0.0 (REFPROP available): 159 passed, 0 failed (
uv run pytest ccp/tests -n 4 --dist loadfile, 8:45). Fast tier also clean apart from the 9 pre-existing module-doctest failures tracked separately.