geomechpy 0.0.2__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.
Files changed (32) hide show
  1. geomechpy-0.0.2/.github/workflows/ci.yml +21 -0
  2. geomechpy-0.0.2/.github/workflows/publish.yml +32 -0
  3. geomechpy-0.0.2/.gitignore +196 -0
  4. geomechpy-0.0.2/.vscode/extensions.json +7 -0
  5. geomechpy-0.0.2/.vscode/launch.json +18 -0
  6. geomechpy-0.0.2/.vscode/settings.json +41 -0
  7. geomechpy-0.0.2/LICENSE +165 -0
  8. geomechpy-0.0.2/PKG-INFO +34 -0
  9. geomechpy-0.0.2/README.md +18 -0
  10. geomechpy-0.0.2/geomechpy/__init__.py +2 -0
  11. geomechpy-0.0.2/geomechpy/elastic_properties.py +607 -0
  12. geomechpy-0.0.2/geomechpy/near_wellbore_stresses.py +220 -0
  13. geomechpy-0.0.2/geomechpy/overburden_stress.py +100 -0
  14. geomechpy-0.0.2/geomechpy/pore_pressure.py +99 -0
  15. geomechpy-0.0.2/geomechpy/rock_strength.py +130 -0
  16. geomechpy-0.0.2/geomechpy/static_elastic_properties.py +294 -0
  17. geomechpy-0.0.2/geomechpy/stress_calculations.py +192 -0
  18. geomechpy-0.0.2/geomechpy/toolbox.py +71 -0
  19. geomechpy-0.0.2/geomechpy/wellbore_stability.py +132 -0
  20. geomechpy-0.0.2/poetry.lock +173 -0
  21. geomechpy-0.0.2/pyproject.toml +38 -0
  22. geomechpy-0.0.2/requirements.txt +1 -0
  23. geomechpy-0.0.2/tests/__init__.py +0 -0
  24. geomechpy-0.0.2/tests/test_elastic_properties.py +63 -0
  25. geomechpy-0.0.2/tests/test_near_wellbore_stresses.py +351 -0
  26. geomechpy-0.0.2/tests/test_overburden_stress.py +54 -0
  27. geomechpy-0.0.2/tests/test_pore_pressure.py +54 -0
  28. geomechpy-0.0.2/tests/test_rock_strength.py +48 -0
  29. geomechpy-0.0.2/tests/test_static_elastic_properties.py +102 -0
  30. geomechpy-0.0.2/tests/test_stress_calculations.py +105 -0
  31. geomechpy-0.0.2/tests/test_toolbox.py +81 -0
  32. geomechpy-0.0.2/tests/test_wellbore_stability.py +101 -0
@@ -0,0 +1,21 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.10", "3.11", "3.12"]
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+ - name: Install dependencies
19
+ run: pip install -e ".[dev]"
20
+ - name: Run tests
21
+ run: pytest tests/ -v
@@ -0,0 +1,32 @@
1
+ name: Publish to PyPI
2
+ on:
3
+ push:
4
+ tags: ["v*"]
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - uses: actions/setup-python@v5
11
+ with:
12
+ python-version: "3.11"
13
+ - name: Build distribution
14
+ run: |
15
+ pip install build
16
+ python -m build
17
+ - uses: actions/upload-artifact@v4
18
+ with:
19
+ name: dist
20
+ path: dist/
21
+ publish:
22
+ needs: build
23
+ runs-on: ubuntu-latest
24
+ environment: pypi
25
+ permissions:
26
+ id-token: write
27
+ steps:
28
+ - uses: actions/download-artifact@v4
29
+ with:
30
+ name: dist
31
+ path: dist/
32
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,196 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ .abstra/
172
+
173
+ .vscode/*
174
+ !.vscode/settings.json
175
+ !.vscode/tasks.json
176
+ !.vscode/launch.json
177
+ !.vscode/extensions.json
178
+ !.vscode/*.code-snippets
179
+ !*.code-workspace
180
+
181
+ # Built Visual Studio Code Extensions
182
+ *.vsix
183
+
184
+ # Ruff stuff:
185
+ .ruff_cache/
186
+
187
+ # PyPI configuration file
188
+ .pypirc
189
+
190
+ # Marimo
191
+ marimo/_static/
192
+ marimo/_lsp/
193
+ __marimo__/
194
+
195
+ # Streamlit
196
+ .streamlit/secrets.toml
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "ms-python.black-formatter",
4
+ "ms-python.flake8",
5
+ "ms-python.mypy-type-checker"
6
+ ]
7
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Python Debugger: Current File",
9
+ "type": "debugpy",
10
+ "request": "launch",
11
+ "program": "${file}",
12
+ "console": "integratedTerminal",
13
+ "env": {
14
+ "PYTHONPATH": "${workspaceFolder}"
15
+ },
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "tests"
4
+ ],
5
+ "python.testing.unittestEnabled": false,
6
+ "python.testing.pytestEnabled": true,
7
+ "[python]": {
8
+ "editor.defaultFormatter": "ms-python.black-formatter",
9
+ "editor.formatOnSave": true
10
+ },
11
+ "black-formatter.args": [
12
+ "--line-length",
13
+ "250",
14
+ "--skip-string-normalization",
15
+ "--exclude",
16
+ "(venv|.tox|.eggs|.mypy_cache|.pytest_cache|.cache|.idea|.vscode|.git|build|dist|.gradle|__pycache__)"
17
+ ],
18
+ "flake8.args": [
19
+ "--ignore=D203,E704,E126,W503,E203",
20
+ "--exclude=.git,.vscode,.idea,.pids,.mypy_cache,.venv,__pycache__,docs/source/conf.py,old,build,dist,venv,pypoetry",
21
+ "--max-complexity=12",
22
+ "--max-line-length=250"
23
+ ],
24
+ "mypy-type-checker.args": [
25
+ "--disallow-untyped-defs",
26
+ "--warn-return-any",
27
+ "--check-untyped-defs",
28
+ "--no-implicit-optional",
29
+ "--namespace-packages",
30
+ "--warn-redundant-casts",
31
+ "--disallow-any-generics",
32
+ "--no-implicit-reexport",
33
+ "--ignore-missing-imports",
34
+ "--explicit-package-bases",
35
+ "--exclude",
36
+ "(venv|.tox|.eggs|.mypy_cache|.pytest_cache|.cache|.idea|.vscode|.git|build|dist|.gradle|__pycache__)"
37
+ ],
38
+ "python-envs.defaultEnvManager": "ms-python.python:venv",
39
+ "python-envs.defaultPackageManager": "ms-python.python:pip",
40
+ "python-envs.pythonProjects": []
41
+ }
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.5
2
+ Name: geomechpy
3
+ Version: 0.0.2
4
+ Summary: The geomechpy Python library aims to provide a comprehensive set of functions to build a Geomechanics workflow
5
+ Author: Florian Karpfinger
6
+ Author-email: Alex Kutuev <kutuev93@yandex.ru>
7
+ License-Expression: LGPL-3.0-only
8
+ License-File: LICENSE
9
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
10
+ Requires-Python: >=3.10
11
+ Requires-Dist: numpy>=1.23
12
+ Provides-Extra: dev
13
+ Requires-Dist: bump-my-version; extra == 'dev'
14
+ Requires-Dist: pytest>=8.4; extra == 'dev'
15
+ Description-Content-Type: text/markdown
16
+
17
+ [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
18
+
19
+ # GeomechPy
20
+
21
+ The geomechpy Python library aims to provide a comprehensive set of functions to build a Geomechanics workflow.
22
+ This version covers velocity/slowness to dynamic property conversion and conversion of elastic properties into different notations.
23
+ In future releases functionalities for: pore pressure, overburden stress, horizontal stress, static elastic properties, rock strength properties and wellbore stability will be included.
24
+
25
+ ## Installation
26
+ To be added here
27
+
28
+ ## Usage
29
+ To be added here
30
+
31
+ ## License
32
+
33
+ This project is licensed under the terms of the **GNU Lesser General Public License v3.0**.
34
+ See the [LICENSE](./LICENSE) file for details.
@@ -0,0 +1,18 @@
1
+ [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
2
+
3
+ # GeomechPy
4
+
5
+ The geomechpy Python library aims to provide a comprehensive set of functions to build a Geomechanics workflow.
6
+ This version covers velocity/slowness to dynamic property conversion and conversion of elastic properties into different notations.
7
+ In future releases functionalities for: pore pressure, overburden stress, horizontal stress, static elastic properties, rock strength properties and wellbore stability will be included.
8
+
9
+ ## Installation
10
+ To be added here
11
+
12
+ ## Usage
13
+ To be added here
14
+
15
+ ## License
16
+
17
+ This project is licensed under the terms of the **GNU Lesser General Public License v3.0**.
18
+ See the [LICENSE](./LICENSE) file for details.
@@ -0,0 +1,2 @@
1
+ """GeomechPy - The geomechpy Python library aims to provide a comprehensive set of functions to build a Geomechanics workflow"""
2
+ __version__ = "0.0.2"