This package is published to PyPI, and can be installed via:
pip install pyetp
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:
python -m venv .venv
source .venv/bin/activate
pip install pip --upgrade
pip install -e .
pip install --group dev
We use ruff as a linter and formatter. To lint run:
ruff check
To run the formatter do:
ruff format
Or if you just want to check what could have been formatted:
ruff format --check
The library is built and tested against RESQML v2.0.1. The spec can be downloaded here.
Under src/pyetp/resqml_objects
you will find Python objects generated from
the RESQML xml spec.
See /examples
for 2D grid usage
tests/test_mesh.py
for Unstructured/structured mesh
We have set up unit tests against a local open-etp-server. To start this server run:
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:
py.test