Commit Graph
183 Commits
Author SHA1 Message Date
Arne Morten Kvarving 6cbeb653da drop old cmake compatibility
we require >= 3.23 now. fix python code to use the target
for the interpreter and reflow code while at it
2026-02-06 12:43:25 +01:00
Arne Morten Kvarving 221c8bad01 find pybind11 in appropriate scope
for now we have to enable the Development.Embed component here to do
sibling builds with opm-common
2026-02-05 12:29:45 +01:00
Arne Morten Kvarving 2c91ac05ad use opm_add_target_options 2026-01-30 14:44:45 +01:00
Arne Morten Kvarving 793937ef58 add use_runpath to targets 2026-01-30 12:12:28 +01:00
Arne Morten Kvarving dec1b90fe9 add use_threads to targets 2026-01-30 09:19:02 +01:00
Arne Morten Kvarving 42742fadc1 add use_only_needed to targets 2026-01-29 15:41:58 +01:00
Arne Morten Kvarving 14e5fb8c50 add additional optimization flags to targets 2026-01-29 13:01:44 +01:00
Arne Morten Kvarving de1729fd0a add fast build flags to targets 2026-01-29 10:42:05 +01:00
Arne Morten Kvarving 64b0590688 adapt to changed use_warnings function 2026-01-29 09:48:29 +01:00
Arne Morten Kvarving 2e9eb19baa add warnings to some targets 2026-01-28 15:41:11 +01:00
Arne Morten Kvarving 43f03706ad python tests: add output-dir parameters
avoid races on the UNRST file when tests run in parallel
2026-01-21 10:28:24 +01:00
Håkon Hægland 044e6a700b Add python_tests target and test fixtures for Python tests
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.
2026-01-05 08:54:17 +01:00
Arne Morten Kvarving 0e911d734b fixed: do not run python mpi tests without mpi 2025-12-03 15:05:41 +01:00
Tor Harald Sandve 288e97dc39 Make a seqential solver for temperature
Use with TEMP
2025-11-21 12:55:26 +01:00
lechevaa bb38a7dcd8 Rename hybrid Newton flag 2025-11-03 12:54:47 +01:00
Atgeirr Flø Rasmussen c13c469d9a Merge pull request #6509 from totto82/refactor_temp_thermal
Add energy module type and use it.
2025-10-28 09:21:42 +01:00
Arne Morten Kvarving 7ddc8bc360 add python 3.14 to packaging 2025-10-27 16:49:06 +01:00
Arne Morten Kvarving ae1c1f2801 bump python 3.13 to 3.13.9 2025-10-27 16:48:10 +01:00
Håkon Hægland 9f7c7a3bd4 Fix bug in sync_versions.sh 2025-10-27 14:11:33 +01:00
Tor Harald Sandve 8e63489f75 Add energy module type and use it.
This also add an no_temp implementation that can be used by the standard blackoil model
to avoid storing temperature in the fluid state.
2025-10-24 16:05:32 +02:00
Kai Bao c8fae0abcc run pre-commit with updated .pre-commit-config.yaml 2025-10-13 21:56:30 +02:00
Arne Morten Kvarving 17e32f1e60 use reportsteps instead of timesteps (deprecation warning) 2025-10-13 11:38:03 +02:00
lechevaa cd3d5c2bbd Remove zero newton iterations assert for all_cases test 2025-10-09 13:03:53 +02:00
lechevaa 095b703005 Remove zero Newton iteration assert 2025-10-09 13:01:48 +02:00
Arne Morten Kvarving 1d757283dc don't use pytest and fix include paths 2025-10-08 15:21:26 +02:00
Arne Morten Kvarving 3c365a428a move hybrid newton test to an integration test directory
this is not a unit test for the python binaries
2025-10-08 14:41:58 +02:00
Arne Morten Kvarving 66b037d9a7 write output to cwd 2025-10-08 14:40:38 +02:00
Arne Morten Kvarving 7b0aeb1a4b (optionally) read path to flow binary from FLOW_BINARY environment variable 2025-10-08 14:40:12 +02:00
Arne Morten Kvarving 6a3c38721f fix import path for kerasify 2025-10-08 14:37:01 +02:00
lechevaa 372be6832c Remove tensorflow dependency of hybrid newton test 2025-10-08 13:45:22 +02:00
lechevaa 6a41fe4060 Remove "|" type for Python < 3.10 compatibility 2025-10-08 11:20:43 +02:00
lechevaa c26ca82c45 Fix hybrid newton python tests imports 2025-10-08 08:44:09 +02:00
David Landa-Marbán 2d327a6d32 Merge pull request #6424 from lechevaa/HybridNewton_flag
Hybrid newton flag
2025-10-06 09:51:37 +02:00
David Landa Marban 1fd280c68d Removing trailing spaces and adding eol at eof 2025-10-02 10:22:55 +02:00
lechevaa 5796d57604 Hybrid Newton Python tests and C++ refactoring 2025-09-29 10:59:55 +02:00
Arne Morten Kvarving 0afc5f352a Merge pull request #6482 from svenn-t/pysinglephase
Python one-phase (water) simulator
2025-09-23 15:24:02 +02:00
Arne Morten Kvarving 5efbb736aa Merge pull request #6492 from hakonhagland/docker_debugging
Improved python docker unit tests debugging
2025-09-23 13:24:12 +02:00
Svenn Tveit 8eaa56885d Use docstring template for OnePhaseSimulator documentation 2025-09-23 13:20:42 +02:00
Svenn Tveit 116e22e58c Safe creation of OnePhaseSimulator object in tests 2025-09-23 13:20:10 +02:00
Svenn Tveit 46559c532f Adressed review comments 2025-09-23 12:54:28 +02:00
Svenn Tveit fc3e1bb73f Tests for OnePhaseSimulator 2025-09-23 12:54:27 +02:00
Svenn Tveit 5153cd6fc0 Add OnePhaseSimulator to custom Python target 2025-09-23 12:52:46 +02:00
Svenn Tveit d0c08c4382 Python wrapper of single phase (water) simulator 2025-09-23 12:52:46 +02:00
Håkon Hægland bd402ee230 Fix auto-detection by not setting PYTHON_VERSIONS when not specified
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
2025-09-23 12:42:48 +02:00
Håkon Hægland 85344a3998 Auto-detect installed Python versions at runtime
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
2025-09-23 11:46:27 +02:00
Håkon Hægland 412773785e Remove references to original behavior 2025-09-23 09:23:58 +02:00
Arne Morten Kvarving fafa4d8a19 Merge pull request #6418 from hakonhagland/docstring-template-refactor
Add support for Python docstring.json template format
2025-09-23 08:36:05 +02:00
Arne Morten Kvarving 7679d64ed1 Merge pull request #6488 from svenn-t/fix_pygaswater_tests
Fix Python gas-water simulator test failures
2025-09-23 08:31:49 +02:00
Håkon Hægland f355be1c65 Add debugging documentation for Docker wheel testing
Adds detailed documentation covering all debugging features implemented
in recent commits:

python/docker/test_wheels/scripts/README.md:
- New "Debugging" section with complete workflow examples
- Python version selection for faster builds (--python-versions)
- Focused test selection for isolation (--test-cases-common/simulators)
- Continue-on-error mode for comprehensive failure analysis
- Docker-specific debugging strategies
- Updated CLI option documentation

python/docker/README.md:
- Added debugging section reference with feature highlights
- Links to detailed debugging documentation
2025-09-23 08:31:34 +02:00
Håkon Hægland ac20e8ed87 Add --stop-on-error option for Docker wheel testing
Adds a new CLI option to control test execution behavior when failures occur:
- Without --stop-on-error (default): Continue running all tests even if some fail
- With --stop-on-error: Stop execution on first test failure (previous behavior)

This enables comprehensive debugging by running both opm-common and omp-simulators
tests in a single run, showing all failures at once rather than stopping at the first one.

Changes:
- Add --stop-on-error flag to run-docker-image command
- Pass STOP_ON_ERROR environment variable to Docker container
- Update entrypoint.py to handle continue-on-error behavior
- Modify test functions to check return codes and continue when appropriate
- Maintain backward compatibility with existing error handling
2025-09-23 08:13:53 +02:00