Skip to content

Commit db95441

Browse files
refactor: Create geos-geomechanics package (#66)
* Move geomechanics processes to dedicated package * Update dependencies * Move tests to geomechanics package * Update build process * Correction to build process * Update documentation * Build typo and missing files * Doc automodule typo * Add module path to sys path for PV plugins * Typo in module import * Fix import path and move line to top of file * linting * Fix doc * Consistency with other packages pyproject.toml
1 parent 610898b commit db95441

27 files changed

+1824
-1920
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
# Add python modules to be documented
1919
python_root = '..'
20-
python_modules = ( 'geos-ats', 'geos-mesh', 'geos-posp', 'geos-timehistory', 'geos-utils', 'geos-xml-tools',
21-
'hdf5-wrapper', 'pygeos-tools' )
20+
python_modules = ( 'geos-ats', 'geos-mesh', 'geos-posp', 'geos-timehistory', 'geos-utils', 'geos-xml-tools', 'hdf5-wrapper',
21+
'pygeos-tools', 'geos-geomechanics' )
2222
for m in python_modules:
2323
sys.path.insert( 0, os.path.abspath( os.path.join( python_root, m, 'src' ) ) )
2424

docs/geos-geomechanics.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
GEOS Post-Processing tools
2+
=============================
3+
4+
.. toctree::
5+
:maxdepth: 5
6+
:caption: Contents:
7+
8+
./geos_geomechanics_docs/home.rst
9+
10+
./geos_geomechanics_docs/modules.rst
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
GEOS Geomechanics Tools
2+
=========================
3+
4+
This package contains geomechanics functions and data models.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Geomechanics models
2+
======================
3+
This
4+
5+
geos.geomechanics.model.MohrCircle module
6+
------------------------------------------
7+
8+
.. automodule:: geos.geomechanics.model.MohrCircle
9+
:members:
10+
:undoc-members:
11+
:show-inheritance:
12+
13+
geos.geomechanics.model.MohrCoulomb module
14+
-------------------------------------------
15+
16+
.. automodule:: geos.geomechanics.model.MohrCoulomb
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
GEOS geomechanics tools
2+
=========================
3+
4+
.. toctree::
5+
:maxdepth: 5
6+
7+
model
8+
9+
processing
10+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Processing
2+
============
3+
The processing part of `geos-geomechanics` package contains functions tools to compute geomechanical properties.
4+
5+
geos.geomechanics.processing.geomechanicsCalculatorFunctions module
6+
---------------------------------------------------------------------
7+
8+
.. automodule:: geos.geomechanics.processing.geomechanicsCalculatorFunctions
9+
:members:
10+
:undoc-members:
11+
:show-inheritance:

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ Packages
8484

8585
geos-posp
8686

87+
geos-geomechanics
88+
8789
geos-timehistory
8890

8991
geos-utils

geos-geomechanics/pyproject.toml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[build-system]
2+
requires = ["setuptools>=61.2"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools]
6+
include-package-data = true
7+
8+
[tool.setuptools.packages.find]
9+
where = ["src"]
10+
include = ["geos_geomechanics*"]
11+
exclude = ['tests*']
12+
13+
[project]
14+
name = "geos-geomechanics"
15+
version = "0.1.0"
16+
description = "Geomechanics models and processing tools"
17+
authors = [{name = "GEOS contributors" }]
18+
maintainers = [{name = "Martin Lemay", email = "[email protected]"}]
19+
license = {text = "Apache-2.0"}
20+
classifiers = [
21+
"Development Status :: 4 - Beta",
22+
"Programming Language :: Python"
23+
]
24+
dynamic = ["dependencies"]
25+
requires-python = ">= 3.10"
26+
27+
[project.optional-dependencies]
28+
build = [
29+
"build ~= 1.2"
30+
]
31+
dev = [
32+
"yapf",
33+
"mypy",
34+
]
35+
test = [
36+
"pytest",
37+
]
38+
39+
[project.scripts]
40+
41+
42+
[tool.pytest.ini_options]
43+
addopts = "--import-mode=importlib"
44+
console_output_style = "count"
45+
pythonpath = ["src"]
46+
python_classes = "Test"
47+
python_files = "test*.py"
48+
python_functions = "test*"
49+
testpaths = ["tests"]
50+
norecursedirs = "bin"
51+
filterwarnings = []
52+
53+
54+
[tool.coverage.run]
55+
branch = true
56+
source = ["src/geos"]

geos-geomechanics/setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from pathlib import Path
2+
from setuptools import setup
3+
4+
# This is where you add any fancy path resolution to the local lib:
5+
geos_utils_path: str = ( Path( __file__ ).parent.parent / "geos-utils" ).as_uri()
6+
7+
setup( install_requires=[
8+
"vtk >= 9.3",
9+
"numpy >= 1.26",
10+
"pandas >= 2.2",
11+
"typing_extensions >= 4.12",
12+
f"geos-utils @ {geos_utils_path}",
13+
] )

geos-geomechanics/src/geos/geomechanics/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)