5780 Commits

Author SHA1 Message Date
Ian Bell
a3c7430265 Add checks for melting line with PT inputs (#2648) 2025-11-10 18:00:56 -05:00
Matthis Thorade
e03848f1ab Revert "remove bountysource from readme (#2645)"
This reverts commit 3b3b5f92c4.
2025-11-10 10:53:41 +01:00
Matthis Thorade
3b3b5f92c4 remove bountysource from readme (#2645)
because the service went bankrupt and does not exist anymore
2025-11-09 10:29:43 -05:00
Ian Bell
bd8d5712c0 better test pypi cleanup info 2025-11-01 17:48:16 -04:00
Ian Bell
648f724f17 version bump 2025-11-01 17:46:36 -04:00
Ian Bell
98b3523d5d Bump version to get py 3.14 wheels v7.2.0 2025-11-01 09:26:31 -04:00
Jeff Henning
471bf493be Bump IF97 version (#2636) 2025-10-14 05:15:07 -04:00
Ian Bell
d5761cb150 Use ninja for the examples (#2635)
* Use ninja for the examples

Should help a little bit with doc building

* FIx some templates

* Fix template deduction error in count_x_for_y_many functions

The count_x_for_y_many and count_x_for_y_manyC functions were using
a single template parameter for both input (double) and output (size_t)
arrays, causing template deduction failures in Cython bindings.

Changed to use separate template parameters YContainer and CountContainer
to properly support different types for input y values and output counts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix types in PXD header too

* Docs should get ninja too

* Changes from clang-format

* Fix git diff argument order in clang-format script

The script was comparing PR_BRANCH to TARGET_BRANCH, which shows changes from the PR branch to the target (what's in target that's NOT in PR). For PR validation, we need the opposite: changes from target to PR (what's in PR that's NOT in target).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Cython template deduction errors in solve_for_x_manyC and count_x_for_y_manyC

Add explicit template parameters [double, size_t] to both function calls
to resolve template type deduction errors when compiling with Cython.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix wheel building by removing return from void Cython template calls

The functions solve_for_x_manyC and count_x_for_y_manyC return void in C++.
When Cython sees a return statement with a void function call containing
template arguments with commas (e.g., [double, size_t]), it wraps the call
in the __Pyx_void_to_None macro. This macro is a simple preprocessor macro
that cannot handle the commas in template arguments, treating them as macro
argument separators instead.

The fix is to remove the return statements, making these simple void function
calls. This prevents the __Pyx_void_to_None wrapping and allows the wheel to
build successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 09:28:57 -04:00
Ian Bell
1b5ac379b5 Fix tuple types (#2634) 2025-10-11 18:40:29 -04:00
Ian Bell
8bd350f900 Fix header gen on windows (#2633)
* Fix header gen on windows

* Add missing dependencies for constants generation

The generate_constants_target was defined but nothing depended on it,
so CMake never invoked the constants generation script on Windows.

Changes:
- CoolProp_module now depends on generate_constants_target (not just
  generate_headers_target)
- CoolProp.pyx Cythonization now depends on constants_header.pxd and
  generate_constants_target (since CoolProp.pyx imports constants_header)

This ensures the constants generation script runs before building,
creating the required files:
- constants_header.pxd
- _constants.pyx
- constants.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-11 18:37:06 -04:00
Ian Bell
54f085ebd0 Python is not optional 2025-10-11 17:42:19 -04:00
Ian Bell
54c4e95188 More work on incremental builds 2025-10-11 16:32:58 -04:00
Ian Bell
c7b7c9ad6c Add dev dependencies 2025-10-11 15:28:12 -04:00
Ian Bell
9ad0d7df2f Add better docs about dev installs 2025-10-11 15:27:57 -04:00
Ian Bell
db49d9e0dd Dynamically get version with regex 2025-10-11 14:06:55 -04:00
Ian Bell
70d03056e0 Modernize Python build system to use scikit-build-core (#2632)
* Modernize Python build system to use scikit-build-core

This commit replaces the old setuptools-based build system with a modern
scikit-build-core + CMake build system for the Python bindings.

Key changes:
- Replace setup.py with pyproject.toml using scikit-build-core backend
- Create new CMakeLists.txt for Cython module compilation
- Add FindCython.cmake helper module
- Update README from .rst to .md format
- Enable incremental builds with proper CMake dependency tracking
- Support Python 3.8-3.14 with proper Cython directives

Benefits:
- Incremental builds work correctly (only rebuild changed files)
- Modern PEP 517/518 compliant build system
- Build artifacts cached in build/{wheel_tag} directories
- Better integration with pip and modern Python tooling
- No more need for custom _py_backend build hooks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add build-time file generation and ignore generated files

This commit adds the missing build-time steps from setup.py:
- Header generation from JSON files (generate_headers.py)
- Cython constants module generation (generate_constants_module.py)
- Copying headers, fmtlib, and BibTeX file to package directory

Also updates .gitignore to ignore:
- wrappers/Python/CoolProp/include/ (generated during build)
- wrappers/Python/CoolProp/CoolPropBibTeXLibrary.bib (copied during build)

Includes test script to verify wheel contents match between old and new build approaches.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Set CMAKE_POSITION_INDEPENDENT_CODE for shared library build

Enable -fPIC flag for all targets to ensure proper shared library compilation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove deprecated buildbot configuration

The buildbot system is deprecated and no longer in use.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update extract_version.py to use .version file instead of setup.py

With the migration to scikit-build-core, version information is now stored
in the .version file and read by pyproject.toml. Updated the script to:

- Rename replace_setup_py() to replace_version_file()
- Update .version file instead of modifying setup.py
- Change --replace-setup-py flag to --replace-version

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update build scripts and documentation for scikit-build-core

Changes:
- Updated documentation to show modern pip-based installation
- Updated manylinux build script to use pip wheel instead of setup.py
- Updated conda metadata generator to use pip install
- Removed deprecated PyPI preparation script (replaced by `python -m build --sdist`)

All build infrastructure now uses the new scikit-build-core build system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update manylinux Docker script for scikit-build-core

Removed SETUP_PY_ARGS since cmake options are no longer passed via
setup.py arguments. The new build system uses CMake directly via
scikit-build-core. Also fixed typo and updated install_root path.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove deprecated _py_backend custom build backend

The _py_backend was a custom setuptools build backend wrapper used
with the old setup.py build system. It's no longer needed with
scikit-build-core.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add uv package manager documentation

Added section on using uv (Astral's fast Python package manager) to
install and work with CoolProp. Includes examples for:
- Installing in current environment
- Creating new projects with CoolProp
- Running scripts with automatic environment management
- Development installations from source

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix sdist packaging and update scikit-build-core config

Changes:
- Updated pyproject.toml to use newer scikit-build-core config syntax
  - cmake.minimum-version → cmake.version
  - cmake.verbose → build.verbose
- Added sdist.include to ensure .version file is in source distributions
- Added .version to MANIFEST.in for completeness

This fixes the issue where building a wheel from an sdist would fail
due to missing .version file. Now sdist → wheel builds work correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Rename setup.py to deprecated_setup.py

The old setuptools-based build system has been fully replaced with
scikit-build-core. Renaming setup.py to deprecated_setup.py to:
- Clearly indicate it's no longer the primary build method
- Keep it available for reference and backward compatibility
- Prevent accidental use of the old build system

Users should now use: pip install .

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update GitHub Actions workflows for new build system

Changes:
- Replace --replace-setup-py with --replace-version flag
- Update sdist build to use 'python -m build --sdist' instead of deprecated prepare_pypi.py
- Workflows now work with scikit-build-core build system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix cibuildwheel to build from repository root

With scikit-build-core, the pyproject.toml is at the repository root,
not in wrappers/Python/. Updated cibuildwheel configuration:
- Changed package-dir from ./wrappers/Python/ to .
- Removed redundant CIBW_BEFORE_BUILD (dependencies are in pyproject.toml)
- Build dependencies are now automatically installed by pip from pyproject.toml

This fixes the "Multiple top-level packages discovered" error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Set macOS deployment target to 11.0 in pyproject.toml

Configure MACOSX_DEPLOYMENT_TARGET=11.0 (Big Sur) in cibuildwheel config.
This matches the setting in GitHub Actions and ensures wheels are built
with consistent compatibility for macOS 11.0 and later.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove old pyproject.toml from wrappers/Python

This file was used by the old setuptools build system. With
scikit-build-core, the main pyproject.toml at the repository root
is now used for all Python packaging configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove redundant PyPy skip selector from cibuildwheel

The 'pp*' skip selector was causing a warning because PyPy isn't enabled
in the build matrix anyway. Since we explicitly specify only CPython
versions in the build directive (cp38-*, cp39-*, etc.), the pp* skip is
unnecessary.

Fixes warning: "Invalid skip selector: 'pp*'. This selector matches a
group that wasn't enabled."

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update fmtlib from 11.1.3 to 12.0.0

Updated the fmtlib submodule to the latest stable release (12.0.0).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove pdsim

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-11 13:07:10 -04:00
Ian Bell
238ca71e48 Python 3.14 support? (#2630)
* Python 3.14 support?

* Don't need explicit skip for pypy

* Explicit 3.14

* wrong python for pip?

* Another pyproject.toml to fix deps?
2025-10-10 08:59:01 -04:00
Ian Bell
b22a9449de RST->MD (#2631) 2025-10-09 22:12:52 -04:00
Omar Zaki
64f0bbdf52 Add Windows Instructions and example for Fluent Wrapper (#2624)
* Add Windows Instructions and example

I added how to use the wrapper for Windows through the shared library. There might be a better way using the static library, but I believe this method works for 99% of use cases.

* Update Windows setup instructions in Fluent README

Clarified and expanded the step-by-step instructions for setting up CoolProp with Fluent on Windows. Added details about launching Fluent, using absolute paths, and using '//' in paths. Improved clarity and fixed minor typos.

* Update Windows instructions in Fluent wrapper README

Added clarification about limitations of using the shared library method and recommended using a static library for more robust results. Minor formatting and wording improvements were also made to the step-by-step instructions.
2025-10-06 20:34:53 -04:00
Ian Bell
9eb3eb8db1 Run clang-format with claude code and fix VS warnings (#2629)
* Run clang-format with claude code and fix VS warnings

* More clang-format

* And the tests too

* Cleanup from clang-tidy

* More constness and modernization

* Cleanup and modernization
2025-10-05 11:02:51 -04:00
Ian Bell
eac9028460 Bump version to dev 2025-10-04 16:10:46 -04:00
Ian Bell
eb9885e912 Add fallback method for density solver for bad EOS (#2627) 2025-10-04 16:04:15 -04:00
Ian Bell
896e85d129 Add Ideal gas methods (#2626)
* Add ability to get at the ideal-gas properties directly

Also through the python interface

* And python interface files

* Fixes the missing reference to ideal gas notebook
2025-10-04 16:00:30 -04:00
Ian Bell
9adc24b60d try to get Inno into the image (#2628)
Dropped in Windows server 2025 image; see https://github.com/actions/runner-images/issues/12464
2025-10-04 15:59:27 -04:00
Josh Kelley
1b5096de6c Improvements to mixture pair management (#2579)
* Improvements to mixture pair management

Add C++ function declarations for functions that are exposed to Python but not C++.

Update apply_simple_mixing_rule to not break default rules.  This has caused confusion and bugs in the past; see, e.g., https://github.com/CoolProp/CoolProp/issues/1874, https://github.com/CoolProp/CoolProp/issues/2082.

* Delete no longer applicable docs

See #1875
2025-10-04 12:34:21 -04:00
Ian Bell
21c4a18f13 Use EOS directly when setting reference state, no full update 2025-10-04 12:23:55 -04:00
Ian Bell
2641f85f9b Faster alpha0 (#2625)
* Optimize the calling speed of IdealHelmholtzPlanckEinsteinGeneralized::all

Something like 2x faster; exp is the remainder

* Add function to get all alpha0 derivatives at once (they are all calculated every time anyhow)

* Add note about the weird naming

* Add profiling snippet

* Also implement properly for mixtures

* And also move to unchecked update function
2025-10-04 09:05:26 -04:00
Ian Bell
ad59959223 Revert "Refactor CMakeLists.txt into modular structure"
This reverts commit 3c1e83465b.
2025-10-01 21:05:39 -04:00
Ian Bell
3c1e83465b Refactor CMakeLists.txt into modular structure
Restructure the monolithic 2,235-line CMakeLists.txt into a clean,
modular architecture for better maintainability and clarity.

Changes:
- Main CMakeLists.txt reduced from 2,235 to 71 lines (96.8% reduction)
- Extract build options to cmake/Options.cmake (73 lines)
- Extract compiler configuration to cmake/Compiler.cmake (115 lines)
- Extract version info to cmake/Version.cmake (20 lines)
- Extract source discovery to cmake/Sources.cmake (88 lines)
- Extract dependencies to cmake/Dependencies.cmake (76 lines)
- Extract core library builds to cmake/CoreLibrary.cmake (348 lines)
- Extract all language wrappers to cmake/Wrappers.cmake (1,198 lines)
- Extract testing config to cmake/Testing.cmake (176 lines)
- Add wrapper utilities to cmake/wrappers/Common.cmake (40 lines)

Benefits:
- Clear separation of concerns
- Easier to maintain and modify individual components
- Better readability with organized structure
- Reduced merge conflicts for collaborative development
- Main CMakeLists.txt now serves as clear table of contents

Tested: CMake configuration runs successfully with no warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 21:02:21 -04:00
Ian Bell
2a1c5d7231 Update changelog v7.1.0bis 2025-09-20 13:01:50 -04:00
Ian Bell
a29eac7ff4 v7.1.0 v7.1.0 2025-09-20 12:56:54 -04:00
Ian Bell
2bf621c082 And tqdm (#2619) 2025-09-20 12:49:09 -04:00
Ian Bell
8310d0ec69 Fork based on whether pure 2025-09-14 11:59:19 -04:00
Ian Bell
92480146b7 Fix bug with DP inputs when singlephase liquid 2025-09-14 11:58:34 -04:00
Ian Bell
7a5f3efedd Try to fix crashes after refactor 2025-09-14 10:49:41 -04:00
Ian Bell
f8ac47af6b Unset some variables if inputs are single-phase and p is provided 2025-09-13 15:51:31 -04:00
Ian Bell
945fd6c334 Use the SA first if available for p-phase determination 2025-09-13 15:01:09 -04:00
Ian Bell
d1669ca239 Add link to TOMS algo 2025-09-13 14:50:20 -04:00
Ian Bell
4c76815933 In a few places use X_critical
See #2602
2025-09-13 14:50:06 -04:00
Ian Bell
326aff4aaf Silence warnings about unused timing variables 2025-09-13 14:48:37 -04:00
Ian Bell
0f5f29e87e lazy load SA in debug mode 2025-09-13 14:47:42 -04:00
Jon Finerty
c4140f5973 Disables profiling by default with flag to enable. (#2613)
Fixes issue #2612 by turning off cython profiling in build unless
explicitly set via an environment flag
2025-09-12 21:15:39 -04:00
Ian Bell
b538711fe6 Improvements in the critical region for subcritical pressures for P+{H,S,U} (#2609)
* Make improvements in the critical region for subcritical pressures for P+{H,S,U}

See #2594

* Fix starting temperature for 2D Newton

* Switch to TOMS748 instead of Brent; resort the steps

* Enable TOMS748 properly

* boost fixes
2025-09-10 18:45:19 -04:00
Ian Bell
a2faf1b00c Update test for #2608 2025-09-06 13:50:00 -04:00
Ian Bell
bba8597f16 Add test for #2608 2025-09-06 13:16:46 -04:00
Ian Bell
ae8886ac1e Add test for #2582 2025-09-06 08:30:23 -04:00
Ian Bell
10ef4922d1 Always recalculate the critical point to be consistent with the use (… (#2601)
* Always recalculate the critical point to be consistent with the use (or not) of superancillaries. The _crit struct is loaded from file but not necessarily in agreement

* Don't recalculate phase - why does this make things work again?
2025-09-05 20:19:37 -04:00
Ian Bell
58b3dcdebb Fix git revision handling in docs workflow (#2604)
1. Fetch full git history during checkout for accurate revision info
2. Set up git config earlier in the process
3. Call generate_headers.py explicitly to ensure gitrevision.h is generated
4. Remove duplicate git config
2025-09-05 20:00:45 -04:00
Ian Bell
faa22648c8 Update JS demo for ES6 modularized CoolProp 2025-09-04 20:42:04 -04:00
Ian Bell
1c07b9b426 A more robust fix for #2587 (#2603) 2025-08-23 18:06:29 -04:00