Commit Graph
141 Commits
Author SHA1 Message Date
Kristian Bendiksen 752d4efc42 Update error handling in Rimc* classes. 2025-05-12 17:31:48 +02:00
Kristian Bendiksen 135695fcb5 #5556 Refactor python error handling. 2025-05-12 17:31:48 +02:00
Kristian Bendiksen 82206e6ae5 Janitor: fix test name. 2025-05-07 12:07:31 +02:00
Kristian Bendiksen e5dc280ce0 Add python api for creating corner point grid. 2025-05-07 12:07:31 +02:00
Kristian Bendiksen b136616f37 Add clang-format config for proto files. 2025-04-14 08:41:35 +02:00
Kristian Bendiksen dd2fdad5dd #12342 Python: Add api for creating polygon
Fixes #12342.
2025-04-10 17:58:59 +02:00
Magne Sjaastad ae8446073b Refactors selection handling for improved code clarity
Modernize the interface to selection system. Create and return data instead of populating incoming parameters.
2025-04-09 07:21:54 +02:00
Magne Sjaastad 6b332269b4 Add scripting to fishbones (#12286)
* Improve python code generation tests
* Add setValveLocations
* Move code into RimFishbonesDefines
* Add scripting to fishbones
* Add scripting methods for fishbones
* Add example and test
2025-03-25 08:31:08 +01:00
Magne Sjaastad cf2ae4ffb8 Python: Add support for manipulation of camera position
* Remove debug output in the views function
* Add scripting support for Mat4d
* Add scripting support to camera
* Separate updates for background color and font size
2025-02-17 18:27:16 +01:00
magnesj e8d10c4dfa Python code linting changes detected by black 2025-01-30 08:33:17 +01:00
Magne Sjaastad ca0179d118 Remove obsolete CMake statements
When using modern CMake and Qt6 we can remove obsolete source_group() and QT_MOC_HEADERS
2025-01-28 07:01:42 +01:00
Magne Sjaastad d17ecc4345 Update vcpkg to 2024.02.14
* Update vcpkg to 2024.02.14 Release

A blank install of vcpkg did not work anymore due to changes in upstream repos. Had to update vcpkg.exe to latest to ensure download of libraries works as expected.

Had to update baseline to 2024.02.14 to be able to compile on VS 17.12. A bug related to naming of boost was fixed in boost 1.84

https://github.com/microsoft/vcpkg/issues/38980

* Bump to a more recent vcpkg due to a build error in arrow

https://github.com/apache/arrow/issues/42027

* Avoid fmt 11 due to a bug for MSVC

https://github.com/gabime/spdlog/issues/3251#issue-2648376977

* Remove obsolete GRPC config in top-level CMake
* Avoid pinning of Protobuf
2025-01-19 16:16:09 +01:00
Magne Sjaastad ecd006decb Update examples for 2024.12.2 2025-01-13 10:54:00 +01:00
Magne Sjaastad da69c1f049 Python: Enforce checking on script name to make sure conversion between camelCase and snake_case works correctly
* #12044 Python: Add Non-Darcy properties available in Python

* #12049 Python: Add checking for multiple consecutive upper case letters
The scripting keyword is transformed to snake_case for use in Python. When data in Python is sent back to ResInsight, the opposite operation happens. This concept works well for most variants of keywords, but there are some corner cases that is not working.

Add compile time checking to make sure that the scripting keywords are formatted correctly.

Fix keyword that has been formatted the wrong way and has never worked.

* Avoid running test if ResInsight executable path is not defined in env
* Make sure dash is allowed in enumeration text string
2025-01-10 18:25:46 +01:00
Magne Sjaastad 6fea38e95b Reset RIPS_DIST_VERSION to 1 2024-12-16 09:29:52 +01:00
Magne Sjaastad ddefd39fc2 Python: Make more well completion parameters available
Add access to all MSW parameters in Python : "msw_settings = well_path.msw_settings()"
Make all parameters of the well completion object available in Python.
2024-11-25 09:38:23 +01:00
jonjenssen da683bed9e Move Rig well related things to subfolder and update include statements 2024-10-31 15:08:59 +01:00
jonjenssen 88118ee4e1 Privatize grid cell array 2024-10-29 18:17:31 +01:00
Magne Sjaastad 383c7e071d Merge in latest changes from main (#11782)
Merge main into dev after release of 2024.9.1
Includes changes to build related to conflicting Python requirements

ortools is used in the Komodo environment. This environment is not compatible with libprotoc 27 and newer. Use pinning to limit version of libprotoc<27.

Add dependency on typing_extensions
2024-10-16 09:27:09 +02:00
212f5bf5ae Add support for Qt6 and disable Qt5
Required changes to use Qt6 and disable support for Qt5. There are still some adjustments related to Qt6 to be done, but these changes are not required to make Qt6 compile on relevant systems.

* Build system changes Qt6
* Override enterEvent
* Update QKeySequence
* QtChart changes
* Use QScreen to instepct dotsPerInch
* Add app->quit()
* Required updates for code related to QString
* Use RiaQDateTimeTools
* Required changes related to regular expressions
* Support compile on Qt  < 6.5
When version < 6.5 is found, qt_generate_deploy_app_script() is disabled. Compilation of ResInsight will work, but the install target will be incomplete.
* Octave: add missing header.
* Qt Advanced Docking: force Qt6 where both Qt5 and Qt6 is available.

---------

Co-authored-by: magnesj <1793152+magnesj@users.noreply.github.com>
Co-authored-by: Kristian Bendiksen <kristian.bendiksen@gmail.com>
2024-09-30 11:21:17 +02:00
Kristian Bendiksen 69d947309a Ubuntu 24.04 support: modernize pip install, and silence gcc 13 warnings. 2024-09-27 14:42:53 +02:00
Håvard Berland 6b4e7fbdc9 Solve Python SyntaxWarning when running tests
Using is in this way has been triggering a SyntaxWarning since Python 3.8
2024-09-13 13:47:26 +02:00
Kristian Bendiksen 93f856cc53 Python: increase launch timeout. 2024-09-05 09:06:21 +02:00
Magne Sjaastad b730a077f1 #11626 Python: By default, use port number assigned by GRPC
Using ResInsight in a server environment when many multiple versions of ResInsight is launched, can cause the port assignment to fail. Change the default value for launch_port from -1 to 0, as this will improve the logic used to assign a port to a new ResInsight session.

Using 0 will ask GRPC to find an available port to be used.
2024-08-21 09:29:18 +02:00
Samiha Hoque 4a2339661c fix: GrpcInterface/Python/dev-requirements.txt to reduce vulnerabilities
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-SETUPTOOLS-7448482
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2024-08-12 14:00:17 +02:00
Magne Sjaastad 51ff9579aa Merge remote-tracking branch 'origin/main' into dev 2024-06-05 14:45:47 +02:00
Magne Sjaastad 84a07eed2b #11463 Look for resinsight_executable in JSON
Search for resinsight_executable in JSON-file located at ./share/rips/rips_config.json
2024-06-05 14:33:07 +02:00
Magne Sjaastad 1e07b239d1 Simplify configuration and use of vcpkg
* Simplify configuration and use of vcpkg
* Use 22.04
* Set and use BUILD_TYPE = Release
* Use -DVCPKG_BUILD_TYPE=release
2024-05-31 08:56:29 +02:00
Magne Sjaastad 98144078c8 Rename to resdata
* Rename to resdata
* Remove development feature for storing grid import type in project file
* Clean up comments
2024-04-22 19:56:10 +02:00
Kristian Bendiksen b5666c333a Refactor connection between cases and views.
Eclipse grid views and contour maps are not longer a child of the case.
The views are not separate collections (one for grid and one for contour maps)
on root level.
2024-04-15 16:10:43 +02:00
Magne Sjaastad bfda6519db Cleanup includes
Use new tools in Visual Studio to help cleaning up includes and remove redundant includes.
2024-03-07 19:45:43 +01:00
Magne Sjaastad e94ac51568 Optionally install python modules defined in dev-requirements.txt 2024-02-15 09:47:20 +01:00
Magne Sjaastad e83b2e92f3 Add and use clang-tidy for GrpcInterface 2024-01-29 15:00:55 +01:00
Magne Sjaastadandmagnesj 9738e69f8d Add delete of object from Python
* Move several methods to protected
* Add delete() to Python rips objects
* Move functions to RiaGrpcHelper

Co-authored-by: magnesj <magnesj@users.noreply.github.com>
2024-01-29 08:46:45 +01:00
magnesj c6234483e6 Python code linting changes detected by black 2024-01-26 08:58:27 +01:00
Magne Sjaastad 14faf607f4 Improve error message for ResInsight exe and rips version mismatch 2024-01-18 08:54:56 +01:00
Magne Sjaastad e67f09a4ff Add completions settings to example 2023-12-16 17:40:11 +01:00
Magne Sjaastad a78f8f8982 Use enum instead of string 2023-11-17 09:53:30 +01:00
Kristian Bendiksen db77ea5762 Perforation Interval: make properties scriptable from Python. 2023-10-09 08:35:42 +02:00
Kristian Bendiksen 1899184a41 Janitor: Remove deprecated method. 2023-09-11 17:39:38 +02:00
Kristian Bendiksen 1edac5762d #10568 StimPlan Template: Add python api for appending Pressure Table Items 2023-09-07 09:18:41 +02:00
Kristian Bendiksen 4b12f82583 Python: require python version >= 3.8. 2023-08-23 09:47:44 +02:00
Kristian Bendiksen 7aabe8c4a8 Python: add type hinting to python code.
Types are checked using mypy.

Fixes #10394.
2023-08-23 09:47:44 +02:00
github-actions[bot]andmagnesj e4d5871072 Python code linting changes detected by black (#10455)
Co-authored-by: magnesj <magnesj@users.noreply.github.com>
2023-07-11 09:22:14 +02:00
Magne Sjaastad f20a83c710 Add create_statistics_case
Remove original implementation not working in gridcasegroup.py
Add create_statistics_case object method
2023-07-11 09:22:14 +02:00
Magne Sjaastad f72fcdd868 Use descendants() 2023-07-11 09:22:14 +02:00
Magne Sjaastad ad4930db79 Add script used to compute statistics on generated data in Python 2023-07-06 12:58:22 +02:00
Magne Sjaastad 8f83d25c9d Publish Python package to pypi when a commit is tagged
* Publish to pypi from main workflow
* Remove pinning
* Include version info for proto tool in RiaVersionInfo.py
2023-06-29 14:07:04 +02:00
Magne Sjaastad 36811e7f94 Prepare for release RC_04
* Add example for import_case for ROFF
* Add field and object keywords
2023-06-12 15:52:20 +02:00
Magne Sjaastad f4dd1d363d Add prefix to cmake options
Add missing RESINSIGHT_ prefix to cmake options
GHA: Fix warnings
2023-05-19 15:03:04 +02:00