Repository navigation
feat(Python): bind geology checks, CrossSection inspection and result repr - #24
Conversation
- geometrical_components_are_linked_to_geology() also required Corners and Lines (StructuralModel) or Corners (CrossSection) to be in a geological collection, while inspections never report them: a model without any issue was reported as invalid. Check the same components in both. - Empty geological components now "have no geometrical component" instead of "not linked to any geometrical collection". - Remove trailing space in "is not part of any FaultBlock". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README: the Python module is opengeode_inspector_geosciences, there is no examples folder, and the module inspects geology. - Executables: remove the --noXXX options mention, none is defined. - Fix copied Doxygen comments of the inspector classes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… repr - Use InspectionIssuesComponentID and issues_repr from OpenGeode-Inspector: issues() now returns the list of ComponentID. - __str__ and __repr__ on inspection results. - Bind the boolean geology checks of the inspectors. - Bind CrossSectionGeologyInspector, CrossSectionInspector, inspect_cross_section_geology and inspect_cross_section. - Fix and extend the Python test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
francoisbonneau
left a comment
There was a problem hiding this comment.
Two behaviour questions to settle before merging
-
Which geometrical components must belong to a geological component?
geometrical_components_are_linked_to_geology()now checks only Surfaces + Blocks (StructuralModel) and Lines + Surfaces (CrossSection), to match what the inspection reports. Before, it also required Corners and Lines (StructuralModel) or Corners (CrossSection), so a model with 0 reported issues could be declared invalid. Is dropping Corners/Lines the intended behaviour, or should the inspection report them instead (fix in the other direction)? -
Unlinked Block reported twice: a Block not linked to anything appears twice in
components_not_part_of_geology("not linked to any geological collection" and "is not part of any FaultBlock"), so it counts as 2 issues. Keep both messages, or only the FaultBlock one?
Cpp-Linter Report
|
Summary
Gaps found while using the module from Python in a training session. Requires Geode-solutions/OpenGeode-Inspector#215 (same branch name): it provides
InspectionIssuesComponentIDand the installedissues_repr.hpp.Python bindings
InspectionIssuesComponentID.issues()now returns the list ofComponentID(the type is now bound in OpenGeode-Inspector; the local definition is removed).__str__/__repr__onStructuralModel*InspectionResultandCrossSection*InspectionResult.*_geology_is_valid,geometrical_components_are_linked_to_geology,geological_components_are_linked_to_geometry,horizons_are_valid), inherited byStructuralModelInspector/CrossSectionInspector.CrossSectionGeologyInspector,CrossSectionInspector,inspect_cross_section_geology,inspect_cross_section.Fixes
geometrical_components_are_linked_to_geology()also required Corners and Lines (StructuralModel) or Corners (CrossSection) to be in a geological collection, while the inspection never reports them. A model with 0 issues was therefore reported invalid. Both now check the same components (Surfaces + Blocks, resp. Lines + Surfaces). Please confirm Corners/Lines are indeed not meant to be checked; otherwise the fix should go the other way (report them).examplesfolder, subtitle), executables usage (no--noXXXoption exists), copied Doxygen comments.Open question
A Block not linked to anything is reported twice in
components_not_part_of_geology("not linked to any geological collection" and "not part of any FaultBlock"). Left unchanged: keep both, or only the second?Tests
structural_model_geology_is_valid()(failed before the fix).TypeError), and new checks onissues(),str/repr, boolean checks, and a CrossSection built in the test.🤖 Generated with Claude Code