Skip to content

Cycle paths bend exactly on the dome (#47), release checklist with conda-forge - #50

Merged
jowr merged 3 commits into
masterfrom
chp/kind-darwin-f7d85u
Nov 12, 2026
Merged

jowr merged 3 commits into
masterfrom
chp/kind-darwin-f7d85u

Conversation

@jowr

@jowr jowr commented Nov 12, 2026

Copy link
Copy Markdown
Member

Fixes #47, and documents the release process including conda-forge.

Why

A state given with "via": "isochoric" was followed by a line that was not an isochore. auto_kind checked p, h, s and T but not rho, so two states of equal density fell through to a polytropic path (linear in log p and s) that cut across the dome.

Looking for the same problem elsewhere: only isobars had their saturation states inserted. Every other path kind rounded the corner where it enters or leaves the dome, for example a steam turbine expanding into the wet region (rankine(), examples/steam_turbine_hs.py).

Changes

  • thermo/cycles/paths.py:
    • each path kind is parametrised by the fraction t along it (_PATH_INPUTS); the old _inner_inputs and _isobar_enthalpies are replaced by this
    • isobars and isotherms get their saturation states exactly, from (p, Q) and (T, Q)
    • isochores, isentropes, isenthalps and polytropic paths get the dome crossing by bisection on the phase (two-phase is 0 <= Q <= 1, CoolProp gives Q = -1 for a single phase). CoolProp cannot flash h or s with Q, and rho with Q works on one side of the dome only, so there is no exact lookup for these
    • an end state that is itself saturated (Q = 0 or 1, say a throttle from saturated liquid) gets no second point
    • cost: under 1 ms per path
  • core/cycle.py: "isochoric" is a path kind, and auto picks it for equal density.
  • Docs: how_to/cycles.md, contributing/architecture.md and the changelog.
  • Release docs (docs/contributing/releasing.md):
    • a checklist for before, during and after a release
    • the existing PyPI steps, under their own heading
    • a conda-forge section: the bot's version pull request on the feedstock after each PyPI release (dependencies are checked by hand), recipe-only fixes, the test suite from the sdist, and the first submission, which is in review in Adding CoolPlot conda-forge/staged-recipes#35603
  • docs/conf.py: MyST tasklist is enabled for the checklist.

Limitation

A path that enters and leaves the dome between two sample points is not seen; a higher steps finds it.

Testing

  • New tests: 7 in tests/test_cycles.py:
  • Results (CoolProp 8.0.0, Python 3.13):
    • tests/test_cycles.py: 46 passed
    • test_engine, test_contracts, test_backend_conformance, test_psychro, test_native_core, test_scene_js: 148 passed, 41 skipped
  • Not run here: the full suite and the docs build (sphinx-build -W with the new tasklist extension).
  • Golden files: not regenerated. The heat pump cycle in cpp/tests/data only meets the dome at exact points (isobars) or at saturated end states, so it should not change. cpp/tests/data/make_data.py currently fails with a NameError (dome_label_cases is called before it is defined); that is separate from this change.

Generated by Claude Code

jowr and others added 3 commits November 12, 2026 09:14
Only an isobar had its saturation states added. An isotherm now gets
them from (T, Q). Isentropes, isenthalps, polytropic paths and isochores
get the state on the dome by bisection on the phase, since CoolProp
cannot flash s, h or rho together with the quality on both sides of the
dome. Equal density is recognised as an isochore; it was drawn as a
polytropic path that cut across the dome. "isochoric" is a path kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bsHH8qQUqPxK3TzHzpc72
The releasing page gets a checklist before, during and after a release,
and a section on conda-forge: the version pull request of the feedstock
after each PyPI release, recipe-only fixes, the test suite there, and the
first submission through staged-recipes, as CoolPlot is not on
conda-forge yet. MyST task lists are enabled for the checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bsHH8qQUqPxK3TzHzpc72
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d34b64b-1c89-416f-8ec5-f108d80fdd3f
Commits

Reviewing files that changed from the base of the PR and between 6ef0186 and 0ac3258.

Files selected for processing: 8

  • CHANGELOG.md
  • docs/conf.py
  • docs/contributing/architecture.md
  • docs/contributing/releasing.md
  • docs/how_to/cycles.md
  • src/coolplot/core/cycle.py
  • src/coolplot/thermo/cycles/paths.py
  • tests/test_cycles.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@jowr
jowr merged commit 1574191 into master Nov 12, 2026
10 checks passed
@jowr
jowr deleted the chp/kind-darwin-f7d85u branch November 12, 2026 12:45
jowr added a commit that referenced this pull request Nov 12, 2026
…in 1.5.2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bsHH8qQUqPxK3TzHzpc72
@jowr jowr mentioned this pull request Nov 12, 2026
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.

The via keyword misses phase boundaries

1 participant