Skip to content

equinor/resdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9,291 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ResData

Python package for reading and writing the result files from reservoir simulators. The file types covered are the RESTART, INIT, RFT, Summary and GRID files in unified and non-unified, and formatted and unformatted.

ResData officially only supports Linux and macOS. It was initially developed as part of the ert project.

Using

ResData is available on PyPI and can be installed into a Python virtual environment with pip:

pip install resdata

Building

ResData is a Python project with a C++ extension layer. Most of the functionality is implemented in C++ and uses cwrap for binding it to Python.

A C++17-compatible compiler, like GCC 8+ or Clang 11+ is required. Other C++ dependencies are brought in automatically by Conan during CMake compilation.

Building and testing use uv to manage Python dependencies. See installing uv if you don't already have it.

ResData's build dependencies (cmake, ninja, cwrap, etc.) as well as ResData itself are pinned in uv.lock and installed together with uv sync:

git clone https://github.com/equinor/resdata
cd resdata
uv sync --all-groups

Running tests

As this codebase contains both Python and C++ code, there are tests for both Python and C++.

Python tests

These tests use pytest and require that ResData is installed into a Python virtualenv, as described in the Building section.

Run the tests via uv run, which uses the same locked environment:

uv sync --group test

# Run all tests in the tests directory
uv run pytest tests

C++ tests

ResData uses a homegrown testing suite as well as Catch2, 3.x which is compiled via CMake and ran using ctest.

Ensure that cmake and conan version 2 is installed.

#set up conan
conan profile detect
conan install -of build --build=missing . -o build_tests=True
cmake --preset=conan-release -DENABLE_ASAN=ON -DENABLE_UBSAN=ON


# Build project
cmake --build --preset=conan-release -j 8

# Run all tests
ctest --preset conan-release

About

Software for reading and writing the result files from the Eclipse reservoir simulator.

Topics

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
COPYING

Code of conduct

Contributing

Security policy

Stars

127 stars

Watchers

21 watching

Forks

Packages

 
 
 

Contributors