Metadata-Version: 2.4
Name: resdata
Version: 6.2.6
Summary: Package for reading and writing the fortran result files from reservoir simulators
Home-page: https://github.com/equinor/resdata
Author: Equinor ASA
Author-email: fg_sib-scout@equinor.com
License: GPL-3.0
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Other Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: COPYING
Requires-Dist: cwrap
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: natsort
Requires-Dist: resfo-utilities>=0.4.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: requires-dist
Dynamic: summary

# 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_](http://github.com/Equinor/ert) project.

## Using
[ResData is available on PyPI](https://pypi.org/project/resdata/) and can be installed into a [Python virtual environment](https://docs.python.org/3/library/venv.html#creating-virtual-environments) with `pip`:

```sh
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](https://github.com/equinor/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](https://conan.io) during [CMake](https://cmake.org) compilation.

In a [Python virtual environment](https://docs.python.org/3/library/venv.html#creating-virtual-environments), run:
```sh
# Fetch directly from GitHub
pip install git+https://github.com/equinor/resdata

# If git-cloned, install local directory in editable mode
pip install --editable .
```

## 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](https://pytest.org) and require that ResData is installed into a Python virtualenv in `--editable` mode, as described in the [Building](#Building) section.

Ensure that pytest is installed and do the following to 
```sh
# Install pytest
pip install pytest

# Run all tests in the python/tests directory
pytest python/tests
```

### C++ tests
ResData uses a homegrown testing suite as well as [Catch2, 2.x](https://github.com/catchorg/Catch2) which is compiled via CMake and ran using `ctest`.

Ensure that `cmake` and `conan` version 2 is installed.

```sh
#set up conan
conan profile detect
conan install -of build --build=missing .
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
```
