Add OSI file validator and fix validator integration bugs#144
Draft
ManavSharma23 wants to merge 6 commits into
Draft
Add OSI file validator and fix validator integration bugs#144ManavSharma23 wants to merge 6 commits into
ManavSharma23 wants to merge 6 commits into
Conversation
Aditya-Donde
force-pushed
the
test
branch
3 times, most recently
from
June 14, 2026 11:26
b48cfb4 to
f2f2f98
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>
