Ontology-first civil infrastructure damage vocabulary, rule engine, validation tables, and export tooling.
Project description
civil-damage-ontology
civil-damage-ontology is a PyPI-oriented Python package for ontology-side civil infrastructure
damage modeling. It manages a controlled vocabulary, compatibility rules, observability rules,
validated ontology tables, target projection, and hard-negative metadata.
It does:
- ontology vocabulary management
- compatibility and observability validation
- validation table generation
- valid target projection
- hard-negative metadata management
- CSV / Parquet / pandas export
- CLI workflows for non-programmatic use
It does not:
- retrieve or download images
- search external data pools
- auto-label or segment imagery
- train models
- split datasets for ML workflows
The package boundary is intentional: downstream packages consume exported ontology artifacts.
Install
python -m pip install civil-damage-ontology
For local development:
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .[dev]
Quick Example
import civil_damage_ontology as cdo
repo = cdo.load_repository()
validation = cdo.build_validation_table(repo.vocab, repo.rules)
print(cdo.is_valid("bridge", "deck", "reinforced_concrete", "longitudinal_crack"))
print(cdo.explain_validation("bridge", "girder", "steel", "pothole"))
print(validation.summary())
CLI Example
cdo validate
cdo build-validation-table --output validation.csv
cdo build-valid-targets --output valid_targets.parquet
Architecture Summary
src/civil_damage_ontology/defaults: packaged default YAML ontology resourcesmodels: typed pydantic records and repositoriesio: resource loading and export helpersvalidation: repository integrity checks and explanation helpersengine: rule evaluation, projection, querying, and hard-negative managementanalytics: summaries, coverage, and graph exportcli:typercommand entry point
Docs
Versioning
The package follows semantic versioning. The initial release line is 0.x while the schema and
default ontology continue to mature.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file civil_damage_ontology-0.1.0.tar.gz.
File metadata
- Download URL: civil_damage_ontology-0.1.0.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96e69fc6fc595e4ff543fa09a17a1b23564e6a8f1739345d3b54d34a75f7ba52
|
|
| MD5 |
19845462ab990556bea279d7f19b005a
|
|
| BLAKE2b-256 |
92b3a1349333fec6b0c7979c0b166d74eb8efc0a340345bd42561a469c5ece1a
|
File details
Details for the file civil_damage_ontology-0.1.0-py3-none-any.whl.
File metadata
- Download URL: civil_damage_ontology-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61f2260b77e931414c5a7df753709de06c78b9df2873c5ba37a4c68b4e0a87db
|
|
| MD5 |
8cb32d3e8db9dcbac61eeb0c4cec6d43
|
|
| BLAKE2b-256 |
012a428dde1c430dd9eb9efe7a70bd52d0cddbacbefd379adaca11c304fb2d85
|