A Python package for Data Interchange for Geotechnical and Geoenvironmental Specialists (DIGGS).
- Licensed under the Apache License 2.0
- Documentation: https://xinp-hub.github.io/pydiggs
- GitHub: https://github.com/xinp-hub/pydiggs
- PyPI: https://pypi.org/project/pydiggs
* Xin Peng (<xin_peng@outlook.com>)
* Asitha Senanayake (<asitha.senanayake@utexas.edu>)
- Validate DIGGS instance files against:
- DIGGS XSD Schema (version 2.6 by default)
- Standard XML Dictionary (v0.1/properties.xml by default)
- Schematron rules for business logic validation
- Flexible validation output:
- Write validation errors to log files
- Print validation errors directly to console
- Command-line interface (CLI) for easy integration
Not a Python user? Looking for leveraging the power of pyDIGGS in a modern web application? Check out:
Install pydiggs:
pip install pydiggs
Basic usage with Python:
from pydiggs import validator
# Create a validator instance
validation = validator("path/to/your/diggs_file.xml")
# Schema validation (using default DIGGS Schema v2.6)
validation.schema_check()
# Dictionary validation (using default DIGGS Dictionary)
validation.dictionary_check()
# Schematron validation (requires schematron file)
validation = validator("path/to/your/diggs_file.xml", schematron_path="path/to/schematron.sch")
validation.schematron_check()
Basic usage with CLI:
# Schema validation
pydiggs schema_check "path/to/your/diggs_file.xml"
# Dictionary validation
pydiggs dictionary_check "path/to/your/diggs_file.xml"
# Schematron validation
pydiggs schematron_check "path/to/your/diggs_file.xml" --schematron_path "path/to/schematron.sch"
For more detailed information and advanced usage, please see the documentation.