- Use its own fluidstate and Evaluation class to avoid having to add an extra derivative to the main equations
- Sotre the scaling factor to avoid calling the parameter all the time
Add CMake infrastructure to simplify building and running Python tests:
- Add `python_tests` target: builds only Python modules and test files
Usage: `ninja python_tests`
- Add test fixtures: running `ctest -R python_basic` now automatically
builds the required Python modules first via FIXTURES_REQUIRED
This allows one to quickly iterate on Python tests without building
unrelated C++ test binaries.
The auto-detection wasn't working because the
CLI was always setting PYTHON_VERSIONS environment variable to all supported
versions when --python-versions was not provided.
Changes:
- click_helpers.py: Return None instead of all versions when option not provided
- helpers.py: Only set PYTHON_VERSIONS env var when explicitly specified
- main.py: Update type hints to allow None for python_versions parameter
Now the flow works correctly:
1. No --python-versions CLI option -> python_versions = None
2. None passed to Docker -> no PYTHON_VERSIONS env var set
3. Container auto-detects installed versions using pyenv
4. Tests run only on detected versions
When no --python-versions is specified at
runtime, auto-detect which Python versions are actually installed in the
container instead of defaulting to all versions from python_versions.json.
This resolves the issue where:
1. Building with --python-versions=3.12 installs only Python 3.12
2. Running without --python-versions would try to test all versions from JSON
3. Tests would fail for non-installed versions (3.8, 3.9, 3.10, 3.11, 3.13)
Now the runtime logic:
1. Uses `pyenv versions --bare` to detect installed versions
2. Maps full versions (3.12.9) to short versions (3.12)
3. Uses detected versions as default for testing
4. Falls back to JSON versions if detection fails
Example behavior:
- Build: --python-versions=3.12 (installs only 3.12.9)
- Runtime: auto-detects 3.12, tests only that version
- Explicit: --python-versions=3.11,3.12 still works as before