pyDIGGS¶
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
Features¶
- Validate DIGGS instance files against:
- DIGGS XSD Schema (version 2.6 by default)
- Standard XML Dictionary for "DIGGS Measurement Properties" definitions (v0.1/properties.xml) by default, accessed from here at the time of package release
- 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
Web Application¶
Not a Python user? Looking for leveraging the power of pyDIGGS in a modern web application? Check out:
Quick Start¶
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.