Skip to main content

Ontology-first civil infrastructure damage vocabulary, rule engine, validation tables, and export tooling.

Project description

civil-damage-ontology

PyPI Python License

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 resources
  • models: typed pydantic records and repositories
  • io: resource loading and export helpers
  • validation: repository integrity checks and explanation helpers
  • engine: rule evaluation, projection, querying, and hard-negative management
  • analytics: summaries, coverage, and graph export
  • cli: typer command 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

civil_damage_ontology-0.1.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

civil_damage_ontology-0.1.0-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

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

Hashes for civil_damage_ontology-0.1.0.tar.gz
Algorithm Hash digest
SHA256 96e69fc6fc595e4ff543fa09a17a1b23564e6a8f1739345d3b54d34a75f7ba52
MD5 19845462ab990556bea279d7f19b005a
BLAKE2b-256 92b3a1349333fec6b0c7979c0b166d74eb8efc0a340345bd42561a469c5ece1a

See more details on using hashes here.

File details

Details for the file civil_damage_ontology-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for civil_damage_ontology-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61f2260b77e931414c5a7df753709de06c78b9df2873c5ba37a4c68b4e0a87db
MD5 8cb32d3e8db9dcbac61eeb0c4cec6d43
BLAKE2b-256 012a428dde1c430dd9eb9efe7a70bd52d0cddbacbefd379adaca11c304fb2d85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page