GeoTess for Python programmers.
PyGeoTess is a Python interface module to the GeoTess gridding and earth model library from Sandia National Laboratories. It provides two interfaces to a subset of the GeoTess library: a direct interface to the GeoTess c++ classes and methods, and a more Pythonic interface.
PyGeoTess requires a C++ compiler and GeoTessCPP >= 2.7.
Pixi handles all dependencies including compilers and GeoTessCPP:
pixi install
pixi run build # Build Cython extensions
pixi run test # Run testsFirst, install GeoTessCPP >= 2.7 from Conda-Forge:
conda install -c conda-forge geotesscppWarning
Using PyGeoTess with GeoTessCPP installed from the main SNL repository does not currently work.
The header files need to be in a geotesscpp directory in the standard system include path,
and libraries in the standard library search path (e.g. $CONDA_PREFIX/lib and $CONDA_PREFIX/include/geotesscpp).
Then install PyGeoTess:
pip install . # Standard install
pip install -e . # Editable install for development- Reorganize package, following outline below. The idea is to have CPP/Python mirrored naming, distinguished only by import statements.
- Add tests, initially mirroring those from GeoTessCPP.
- Clean up API, due to expedient merging of work from contributors.
- Move from setuptools to scikit-build-core for the build-backend.
geotess\
__init__.py
model.py
grid.py
exc.py
libgeotess.so/dylib
lib/
__init__.pyd # makes "cimport geotess.lib as clib" work in Cython. "import geotess.lib as clib; clib.GeoTessModel"
__init__.py # makes GeoTessCPP objects from C++ available to Cython. "import geotess.lib as lib; lib.GeoTessModel"
GeoTessModel.pxd # "cimport geotess.lib as clib; clib.GeoTessModel". makes GeoTessCPP objects from C++ available to Cython.
GeoTessModel.pyx # "import geotess.lib as lib; lib.GeoTessModel". implements Python GeoTess objects using the C++ objects above.
EarthShape.pyd
EarthShape.pyx
...
- Incorporate functionality from GeoTessExplorer/GeoTessBuilder
- Improve docs
