pyetp 0.0.38__tar.gz → 0.0.43__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyetp-0.0.43/CONTRIBUTING.md +123 -0
- pyetp-0.0.43/MANIFEST.in +1 -0
- pyetp-0.0.43/PKG-INFO +88 -0
- pyetp-0.0.43/README.md +68 -0
- pyetp-0.0.43/SECURITY.md +17 -0
- pyetp-0.0.43/pyproject.toml +57 -0
- pyetp-0.0.43/setup.cfg +4 -0
- pyetp-0.0.43/src/pyetp/__init__.py +12 -0
- pyetp-0.0.43/src/pyetp/_version.py +34 -0
- pyetp-0.0.43/src/pyetp/client.py +1054 -0
- pyetp-0.0.43/src/pyetp/config.py +28 -0
- pyetp-0.0.38/pyetp/resqml_objects/__init__.py → pyetp-0.0.43/src/pyetp/resqml_objects.py +82 -72
- {pyetp-0.0.38 → pyetp-0.0.43/src}/pyetp/types.py +130 -93
- {pyetp-0.0.38 → pyetp-0.0.43/src}/pyetp/uri.py +28 -16
- pyetp-0.0.43/src/pyetp/utils_arrays.py +260 -0
- pyetp-0.0.43/src/pyetp/utils_xml.py +183 -0
- pyetp-0.0.43/src/pyetp.egg-info/PKG-INFO +88 -0
- pyetp-0.0.43/src/pyetp.egg-info/SOURCES.txt +27 -0
- pyetp-0.0.43/src/pyetp.egg-info/dependency_links.txt +1 -0
- pyetp-0.0.43/src/pyetp.egg-info/requires.txt +8 -0
- pyetp-0.0.43/src/pyetp.egg-info/top_level.txt +2 -0
- pyetp-0.0.43/src/resqml_objects/__init__.py +7 -0
- pyetp-0.0.43/src/resqml_objects/epc_readers.py +114 -0
- pyetp-0.0.43/src/resqml_objects/parsers.py +12 -0
- pyetp-0.0.43/src/resqml_objects/serializers.py +10 -0
- pyetp-0.0.43/src/resqml_objects/v201/__init__.py +1847 -0
- {pyetp-0.0.38/pyetp/resqml_objects → pyetp-0.0.43/src/resqml_objects/v201}/generated.py +2244 -2185
- pyetp-0.0.43/src/resqml_objects/v201/utils.py +46 -0
- pyetp-0.0.38/PKG-INFO +0 -56
- pyetp-0.0.38/README.md +0 -27
- pyetp-0.0.38/pyetp/__init__.py +0 -4
- pyetp-0.0.38/pyetp/client.py +0 -1113
- pyetp-0.0.38/pyetp/config.py +0 -29
- pyetp-0.0.38/pyetp/utils.py +0 -15
- pyetp-0.0.38/pyetp/utils_arrays.py +0 -134
- pyetp-0.0.38/pyetp/utils_xml.py +0 -817
- pyetp-0.0.38/pyproject.toml +0 -42
- {pyetp-0.0.38 → pyetp-0.0.43}/LICENSE.md +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated! Every
|
|
4
|
+
little bit helps, and credit will always be given.
|
|
5
|
+
|
|
6
|
+
You can contribute in many ways:
|
|
7
|
+
|
|
8
|
+
## Types of Contributions
|
|
9
|
+
|
|
10
|
+
### Report Bugs
|
|
11
|
+
|
|
12
|
+
Report bugs at https://github.com/equinor/pyetp/issues.
|
|
13
|
+
|
|
14
|
+
If you are reporting a bug, please include:
|
|
15
|
+
|
|
16
|
+
* Your operating system name and version.
|
|
17
|
+
* pyetp version
|
|
18
|
+
* Detailed steps to reproduce the bug.
|
|
19
|
+
|
|
20
|
+
### Fix Bugs
|
|
21
|
+
|
|
22
|
+
Look through the Git issues for bugs. Anything tagged with "bug"
|
|
23
|
+
and "help wanted" is open to whoever wants to implement it.
|
|
24
|
+
|
|
25
|
+
### Implement Features
|
|
26
|
+
|
|
27
|
+
Look through the Git issues for features. Anything tagged with "enhancement"
|
|
28
|
+
and "help wanted" is open to whoever wants to implement it.
|
|
29
|
+
|
|
30
|
+
### Write Documentation
|
|
31
|
+
|
|
32
|
+
We could always use more documentation, whether as part of the
|
|
33
|
+
official docs, in docstrings, or even on the web in blog posts,
|
|
34
|
+
articles, and such.
|
|
35
|
+
|
|
36
|
+
### Submit Feedback
|
|
37
|
+
|
|
38
|
+
The best way to send feedback is to file an issue
|
|
39
|
+
at https://github.com/equinor/pyetp/issues.
|
|
40
|
+
|
|
41
|
+
If you are proposing a feature:
|
|
42
|
+
|
|
43
|
+
* Explain in detail how it would work.
|
|
44
|
+
* Keep the scope as narrow as possible, to make it easier to implement.
|
|
45
|
+
|
|
46
|
+
## Get Started!
|
|
47
|
+
|
|
48
|
+
Ready to contribute? Here's how to set up ``pyetp`` for local development.
|
|
49
|
+
|
|
50
|
+
1. Fork the ``pyetp`` repo on Github equinor to your personal user
|
|
51
|
+
2. Clone your fork locally
|
|
52
|
+
3. Start the development container. [Info](https://containers.dev/)
|
|
53
|
+
4. Create a branch for local development:
|
|
54
|
+
5. Make your changes locally.
|
|
55
|
+
|
|
56
|
+
6. When you're done making changes, check that your changes pass flake8 and the tests
|
|
57
|
+
```
|
|
58
|
+
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=docs
|
|
59
|
+
poetry run pytest --cov-report=term-missing --cov=pyetp tests/ | tee pytest-coverage.txt
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
7. Commit your changes and push your branch
|
|
63
|
+
8. Submit a pull request.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Writing commit messages
|
|
67
|
+
|
|
68
|
+
Commit messages should be clear and follow a few basic rules. Example:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
ENH: add functionality X to numpy.<submodule>.
|
|
72
|
+
```
|
|
73
|
+
The first line of the commit message starts with a capitalized acronym
|
|
74
|
+
(options listed below) indicating what type of commit this is. Then a blank
|
|
75
|
+
line, then more text if needed. Lines shouldn't be longer than 72
|
|
76
|
+
characters. If the commit is related to a ticket, indicate that with
|
|
77
|
+
``"See #3456", "Cf. #3344, "See ticket 3456", "Closes #3456"`` or similar.
|
|
78
|
+
|
|
79
|
+
Read Chris Beams hints on commit messages <https://chris.beams.io/posts/git-commit/>.
|
|
80
|
+
|
|
81
|
+
Describing the motivation for a change, the nature of a bug for bug fixes or
|
|
82
|
+
some details on what an enhancement does are also good to include in a commit message.
|
|
83
|
+
Messages should be understandable without looking at the code changes.
|
|
84
|
+
A commit message like FIX: fix another one is an example of what not to do;
|
|
85
|
+
the reader has to go look for context elsewhere.
|
|
86
|
+
|
|
87
|
+
Standard acronyms to start the commit message with are:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
API: an (incompatible) API change (will be rare)
|
|
91
|
+
PERF: performance or bench-marking
|
|
92
|
+
BLD: change related to building
|
|
93
|
+
BUG: bug fix
|
|
94
|
+
FIX: fixes wrt to technical issues, e.g. wrong requirements.txt
|
|
95
|
+
DEP: deprecate something, or remove a deprecated object
|
|
96
|
+
DOC: documentation, addition, updates
|
|
97
|
+
ENH: enhancement, new functionality
|
|
98
|
+
CLN: code cleanup, maintenance commit (refactoring, typos, PEP, etc.)
|
|
99
|
+
REV: revert an earlier commit
|
|
100
|
+
TST: addition or modification of tests
|
|
101
|
+
REL: related to release
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Type hints
|
|
105
|
+
|
|
106
|
+
[PEP 484](https://peps.python.org/pep-0484/)
|
|
107
|
+
|
|
108
|
+
## Docstrings
|
|
109
|
+
|
|
110
|
+
[Numpy](https://numpydoc.readthedocs.io/en/latest/format.html)
|
|
111
|
+
|
|
112
|
+
## Style guidelines
|
|
113
|
+
|
|
114
|
+
[PEP 8](https://peps.python.org/pep-0008/)
|
|
115
|
+
|
|
116
|
+
## Pull Request Guidelines
|
|
117
|
+
|
|
118
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
119
|
+
|
|
120
|
+
1. The pull request should include tests.
|
|
121
|
+
2. If the pull request adds functionality, the docstrings and/or docs should be updated.
|
|
122
|
+
|
|
123
|
+
|
pyetp-0.0.43/MANIFEST.in
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exclude data/* tests/* examples/* .devcontainer/* .github/workflows/* .gitattributes .gitignore
|
pyetp-0.0.43/PKG-INFO
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyetp
|
|
3
|
+
Version: 0.0.43
|
|
4
|
+
Summary: Interface with OSDU RDDMS using ETP protocol
|
|
5
|
+
Author-email: Adam Cheng <52572642+adamchengtkc@users.noreply.github.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: homepage, https://github.com/equinor/pyetp
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE.md
|
|
11
|
+
Requires-Dist: numpy>=1.26.3
|
|
12
|
+
Requires-Dist: websockets>=12.0
|
|
13
|
+
Requires-Dist: lxml>=4.9.4
|
|
14
|
+
Requires-Dist: pydantic>=1.10
|
|
15
|
+
Requires-Dist: async-timeout>=5.0
|
|
16
|
+
Requires-Dist: xtgeo>=4.0.0
|
|
17
|
+
Requires-Dist: xsdata>=24.3.1
|
|
18
|
+
Requires-Dist: etpproto>=1.0.7
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+

|
|
23
|
+

|
|
24
|
+
[](https://badge.fury.io/py/pyetp)
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
# Installing the library
|
|
28
|
+
This package is published to PyPI, and can be installed via:
|
|
29
|
+
```bash
|
|
30
|
+
pip install pyetp
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Local development
|
|
34
|
+
Locally we suggest setting up a virtual environment, and installing the latest
|
|
35
|
+
version of pip. Then install the library in editable mode along with the
|
|
36
|
+
`dev`-dependency group. That is:
|
|
37
|
+
```bash
|
|
38
|
+
python -m venv .venv
|
|
39
|
+
source .venv/bin/activate
|
|
40
|
+
pip install pip --upgrade
|
|
41
|
+
pip install -e .
|
|
42
|
+
pip install --group dev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Linting and formatting
|
|
47
|
+
We use ruff as a linter and formatter. To lint run:
|
|
48
|
+
```bash
|
|
49
|
+
ruff check
|
|
50
|
+
```
|
|
51
|
+
To run the formatter do:
|
|
52
|
+
```bash
|
|
53
|
+
ruff format
|
|
54
|
+
```
|
|
55
|
+
Or if you just want to check what could have been formatted:
|
|
56
|
+
```bash
|
|
57
|
+
ruff format --check
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# RESQML versions
|
|
62
|
+
The library is built and tested against RESQML v2.0.1. The spec can be
|
|
63
|
+
downloaded
|
|
64
|
+
[here](https://publications.opengroup.org/standards/energistics-standards/v231a).
|
|
65
|
+
|
|
66
|
+
# Generated Python objects from RESQML spec
|
|
67
|
+
Under `src/pyetp/resqml_objects` you will find Python objects generated from
|
|
68
|
+
the RESQML xml spec.
|
|
69
|
+
|
|
70
|
+
# Documentation
|
|
71
|
+
See `/examples` for 2D grid usage
|
|
72
|
+
|
|
73
|
+
`tests/test_mesh.py` for Unstructured/structured mesh
|
|
74
|
+
|
|
75
|
+
# Running the unit tests
|
|
76
|
+
We have set up unit tests against a local open-etp-server. To start this server
|
|
77
|
+
run:
|
|
78
|
+
```bash
|
|
79
|
+
docker compose -f tests/compose.yml up [--detach]
|
|
80
|
+
```
|
|
81
|
+
If you want to re-use the same terminal window you should use the
|
|
82
|
+
`--detach`-option, otherwise start a new terminal. We use `pytest` for testing,
|
|
83
|
+
which can be run via:
|
|
84
|
+
```bash
|
|
85
|
+
py.test
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
# This library is under active development and subject to breaking changes
|
pyetp-0.0.43/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+
[](https://badge.fury.io/py/pyetp)
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
# Installing the library
|
|
8
|
+
This package is published to PyPI, and can be installed via:
|
|
9
|
+
```bash
|
|
10
|
+
pip install pyetp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Local development
|
|
14
|
+
Locally we suggest setting up a virtual environment, and installing the latest
|
|
15
|
+
version of pip. Then install the library in editable mode along with the
|
|
16
|
+
`dev`-dependency group. That is:
|
|
17
|
+
```bash
|
|
18
|
+
python -m venv .venv
|
|
19
|
+
source .venv/bin/activate
|
|
20
|
+
pip install pip --upgrade
|
|
21
|
+
pip install -e .
|
|
22
|
+
pip install --group dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Linting and formatting
|
|
27
|
+
We use ruff as a linter and formatter. To lint run:
|
|
28
|
+
```bash
|
|
29
|
+
ruff check
|
|
30
|
+
```
|
|
31
|
+
To run the formatter do:
|
|
32
|
+
```bash
|
|
33
|
+
ruff format
|
|
34
|
+
```
|
|
35
|
+
Or if you just want to check what could have been formatted:
|
|
36
|
+
```bash
|
|
37
|
+
ruff format --check
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# RESQML versions
|
|
42
|
+
The library is built and tested against RESQML v2.0.1. The spec can be
|
|
43
|
+
downloaded
|
|
44
|
+
[here](https://publications.opengroup.org/standards/energistics-standards/v231a).
|
|
45
|
+
|
|
46
|
+
# Generated Python objects from RESQML spec
|
|
47
|
+
Under `src/pyetp/resqml_objects` you will find Python objects generated from
|
|
48
|
+
the RESQML xml spec.
|
|
49
|
+
|
|
50
|
+
# Documentation
|
|
51
|
+
See `/examples` for 2D grid usage
|
|
52
|
+
|
|
53
|
+
`tests/test_mesh.py` for Unstructured/structured mesh
|
|
54
|
+
|
|
55
|
+
# Running the unit tests
|
|
56
|
+
We have set up unit tests against a local open-etp-server. To start this server
|
|
57
|
+
run:
|
|
58
|
+
```bash
|
|
59
|
+
docker compose -f tests/compose.yml up [--detach]
|
|
60
|
+
```
|
|
61
|
+
If you want to re-use the same terminal window you should use the
|
|
62
|
+
`--detach`-option, otherwise start a new terminal. We use `pytest` for testing,
|
|
63
|
+
which can be run via:
|
|
64
|
+
```bash
|
|
65
|
+
py.test
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
# This library is under active development and subject to breaking changes
|
pyetp-0.0.43/SECURITY.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
If you discover a security vulnerability in this project, please follow these steps to responsibly disclose it:
|
|
2
|
+
|
|
3
|
+
1. **Do not** create a public GitHub issue for the vulnerability.
|
|
4
|
+
|
|
5
|
+
2. Follow our guideline for Responsible Disclosure Policy at https://www.equinor.com/about-us/csirt to report the issue
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
The following information will help us triage your report more quickly:
|
|
9
|
+
|
|
10
|
+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
11
|
+
- Full paths of source file(s) related to the manifestation of the issue
|
|
12
|
+
- The location of the affected source code (tag/branch/commit or direct URL)
|
|
13
|
+
- Any special configuration required to reproduce the issue
|
|
14
|
+
- Step-by-step instructions to reproduce the issue
|
|
15
|
+
- Proof-of-concept or exploit code (if possible)
|
|
16
|
+
- Impact of the issue, including how an attacker might exploit the issue
|
|
17
|
+
- We prefer all communications to be in English.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 80", "setuptools_scm[simple] >= 8"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyetp"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Interface with OSDU RDDMS using ETP protocol"
|
|
9
|
+
authors = [
|
|
10
|
+
{name = "Adam Cheng", email = "52572642+adamchengtkc@users.noreply.github.com"}
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
license = "Apache-2.0"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"numpy >= 1.26.3",
|
|
19
|
+
"websockets >= 12.0",
|
|
20
|
+
"lxml >=4.9.4",
|
|
21
|
+
"pydantic >= 1.10",
|
|
22
|
+
"async-timeout >= 5.0",
|
|
23
|
+
"xtgeo >= 4.0.0",
|
|
24
|
+
"xsdata >= 24.3.1",
|
|
25
|
+
"etpproto >= 1.0.7",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
homepage = "https://github.com/equinor/pyetp"
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest >= 7.4.4",
|
|
34
|
+
"pytest-asyncio >= 0.23.4",
|
|
35
|
+
"fakeredis >= 2.21.0",
|
|
36
|
+
"pytest-cov >= 4.1.0",
|
|
37
|
+
"ipykernel >= 6.29.5",
|
|
38
|
+
"ruff>=0.13.2",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[tool.pytest.ini_options]
|
|
42
|
+
addopts = "-ra -v --color=yes"
|
|
43
|
+
testpaths = ["tests"]
|
|
44
|
+
|
|
45
|
+
[tool.setuptools_scm]
|
|
46
|
+
version_file = "src/pyetp/_version.py"
|
|
47
|
+
|
|
48
|
+
[tool.ruff.lint]
|
|
49
|
+
extend-select = [
|
|
50
|
+
"I", # isort
|
|
51
|
+
]
|
|
52
|
+
ignore = [
|
|
53
|
+
"E741", # Ignore ambigious variable name
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[tool.ruff]
|
|
57
|
+
exclude = ["*.ipynb", "venv", ".venv", "src/pyetp/types.py"]
|
pyetp-0.0.43/setup.cfg
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
TYPE_CHECKING = False
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from typing import Tuple
|
|
16
|
+
from typing import Union
|
|
17
|
+
|
|
18
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
20
|
+
else:
|
|
21
|
+
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
23
|
+
|
|
24
|
+
version: str
|
|
25
|
+
__version__: str
|
|
26
|
+
__version_tuple__: VERSION_TUPLE
|
|
27
|
+
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
30
|
+
|
|
31
|
+
__version__ = version = '0.0.43'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 0, 43)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = 'g71591c6fb'
|