Skip to content

Add OSI file validator and fix validator integration bugs#144

Draft
ManavSharma23 wants to merge 6 commits into
Aditya-Donde:testfrom
ManavSharma23:saveinputs-fixes
Draft

Add OSI file validator and fix validator integration bugs#144
ManavSharma23 wants to merge 6 commits into
Aditya-Donde:testfrom
ManavSharma23:saveinputs-fixes

Conversation

@ManavSharma23

Copy link
Copy Markdown

This PR adds a comprehensive validator tool and test suite for OSI (YAML configuration) files, resolving several integration bugs identified when validating against the core PlateGirderBridge input validator constraints.

Key Changes

Added OSI File Validator & Test Suite (src/osdagbridge/desktop/ui/utils/test_Osi.py):
Implemented a CLI tool (validate_osi_file_cli) to parse and generate validation reports (Overall Status, Completeness Score, and Suggested Corrections).
Added unit tests verifying data correctness, completeness, structural integrity, and custom constraints.
Fixed Validator Integration Issues:
Project Location nested check: Removed KEY_PROJECT_LOCATION from required leaf keys since it is parsed as a nested dictionary and is never present as a leaf.
Nullable Skew Angle support: Treated geometry.skew_angle: null as a valid configuration (normalizing it to 0.0 to represent a straight, non-skewed bridge) instead of throwing a validation error.
Wearing Course unit conversion: Prevented false out-of-range warnings for wearing course density and thickness by converting OSI units (kN/m³ and mm) into the core validator's expected units (t/m³ and meters) before validation.

How to Run Tests
Using the osdagbridge-env Conda environment:
PYTHONPATH=src conda run -n osdagbridge-env pytest src/osdagbridge/desktop/ui/utils/test_Osi.py -v

How to Run the CLI Validator:

PYTHONPATH=src conda run -n osdagbridge-env python src/osdagbridge/desktop/ui/utils/test_Osi.py <path_to_osi_file>
Screenshot 2026-06-11 at 5 55 27 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants