Metadata-Version: 2.4
Name: pyetp
Version: 0.0.48
Summary: Interface with OSDU RDDMS using ETP protocol
Author-email: Adam Cheng <52572642+adamchengtkc@users.noreply.github.com>
License-Expression: Apache-2.0
Project-URL: homepage, https://github.com/equinor/pyetp
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: numpy>=1.26.0
Requires-Dist: websockets>=15.0
Requires-Dist: lxml>=4.9.4
Requires-Dist: pydantic>=1.10
Requires-Dist: async-timeout>=5.0
Requires-Dist: xtgeo>=4.0.0
Requires-Dist: xsdata>=25.4
Requires-Dist: etpproto>=1.0.7
Dynamic: license-file

![Build Status](https://github.com/equinor/pyetp/actions/workflows/ci.yml/badge.svg?branch=main)
![codecov](https://codecov.io/gh/equinor/pyetp/graph/badge.svg?token=S2XDDKKI8U)
![Python](https://img.shields.io/pypi/pyversions/pyetp)
[![PyPI version](https://badge.fury.io/py/pyetp.svg)](https://badge.fury.io/py/pyetp)
![License](https://img.shields.io/github/license/equinor/pyetp)

Pyetp is a library implementing an ETP v1.2 client with utilities and support
for working with RESQML v2.0.1 models.

> The following Energistics (c) products were used in the creation of this work:
> Energistics Transfer Protocol (ETP) v1.2 and RESQML v2.0.1

# Installing the library
This package is published to PyPI, and can be installed via:
```bash
pip install pyetp
```
The library is tested against Python versions 3.10, 3.11, 3.12 and 3.13.

## Local development
Locally we suggest setting up a virtual environment, and installing the latest
version of pip. Then install the library in editable mode along with the
`dev`-dependency group. That is:
```bash
python -m venv .venv
source .venv/bin/activate
pip install pip --upgrade
pip install -e .
pip install --group dev
```


## Linting and formatting
We use ruff as a linter and formatter. To lint run:
```bash
ruff check
```
To run the formatter do:
```bash
ruff format
```
Or if you just want to check what could have been formatted:
```bash
ruff format --check
```


# RESQML versions
The library is built and tested against RESQML v2.0.1. The spec can be
downloaded
[here](https://publications.opengroup.org/standards/energistics-standards/v231a).

# Generated Python objects from RESQML spec
Under `src/pyetp/resqml_objects` you will find Python objects generated from
the RESQML xml spec.

# Documentation
See `/examples` for 2D grid usage

`tests/test_mesh.py` for Unstructured/structured mesh

# Running the unit tests
We have set up unit tests against a local open-etp-server. To start this server
run:
```bash
docker compose -f tests/compose.yml up [--detach]
```
If you want to re-use the same terminal window you should use the
`--detach`-option, otherwise start a new terminal. We use `pytest` for testing,
which can be run via:
```bash
py.test
```

# This library is under active development and subject to breaking changes
