Skip to content

Add CoolProp 8 compatibility, drop coolprop<8 dev constraint - #152

Merged
raphaeltimbo merged 1 commit into
petrobras:mainfrom
raphaeltimbo:coolprop8-compat
Jul 21, 2026
Merged

Add CoolProp 8 compatibility, drop coolprop<8 dev constraint#152
raphaeltimbo merged 1 commit into
petrobras:mainfrom
raphaeltimbo:coolprop8-compat

Conversation

@raphaeltimbo

Copy link
Copy Markdown
Collaborator

Summary

Makes ccp compatible with CoolProp 8.0.0 and removes the temporary coolprop<8 dev/CI resolution constraint added in #151.

  • ccp/config/fluids.py: CoolProp 8 raises ValueError (v7 raised RuntimeError) from get_REFPROPname for unknown fluids — get_name now catches both and keeps raising ccp's own ValueError with the ccp.fluid_list hint.
  • 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), so test_eos/test_eos_config compare pressure with assert_allclose instead of ==, matching the existing HEOS blocks.
  • pyproject.toml: removed constraint-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.

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].
@raphaeltimbo
raphaeltimbo merged commit 7538d60 into petrobras:main Jul 21, 2026
2 checks passed
@raphaeltimbo raphaeltimbo mentioned this pull request Jul 23, 2026
raphaeltimbo added a commit that referenced this pull request Jul 23, 2026
Bump version to 0.4.0 and add release notes to the docs covering
the changes merged since v0.3.32 (PRs #136-#152).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant