Thank you for considering a contribution. PyHydroGeophysX is designed to be extensible, and community contributions are welcome in four main areas.
git clone https://github.com/geohang/PyHydroGeophysX.git
cd PyHydroGeophysX
pip install -e ".[dev,docs]"
pytestPlease run pytest and flake8 PyHydroGeophysX/ before submitting a PR.
Subclass the base resistivity or velocity model in
PyHydroGeophysX/petrophysics/resistivity_models.py or
PyHydroGeophysX/petrophysics/velocity_models.py. Implement the
forward(water_content, porosity, ...) method and register the class name
in the module's __all__ list.
Follow the pattern in PyHydroGeophysX/model_output/modflow_output.py and
parflow_output.py. Create a new module under model_output/ exposing
classes that load saturation, water content, and porosity into NumPy
arrays with shape (time, z, y, x) for 3D or (time, z, x) for 2D.
Add a module under PyHydroGeophysX/forward/ following the interface of
ert_forward.py and srt_forward.py: a class exposing create_synthetic_data
and response methods. Where possible, wrap an established library
(PyGIMLi, SimPEG) rather than re-implementing physics.
Mirror the structure of PyHydroGeophysX/inversion/ert_inversion.py:
a class with run() returning a dict with model, response, and
misfit keys.
- Fork the repository and create a feature branch:
git checkout -b feature/your-feature-name - Add tests under
tests/that cover the new functionality. - Run the full test suite:
pytest --cov=PyHydroGeophysX. - Update the relevant example notebook in
examples/if the feature is user-facing. - Update
README.mdand the Sphinx docs indocs/as appropriate. - Open a pull request against
main. CI must pass on Linux, macOS, and Windows before review.
Please use the GitHub issue tracker with a minimal reproducible example,
your operating system, and the output of pip freeze | grep -Ei 'pygimli|simpeg|numpy|scipy'.
We follow a standard academic-open-source code of conduct: be respectful, assume good faith, and keep discussion technical.