Skip to content

feat(Python): bind geology checks, CrossSection inspection and result repr - #24

Merged
BenPinet merged 5 commits into
nextfrom
feat/geology-python-bindings
Nov 4, 2026
Merged

BenPinet merged 5 commits into
nextfrom
feat/geology-python-bindings

Conversation

@francoisbonneau

Copy link
Copy Markdown
Member

Summary

Gaps found while using the module from Python in a training session. Requires Geode-solutions/OpenGeode-Inspector#215 (same branch name): it provides InspectionIssuesComponentID and the installed issues_repr.hpp.

Python bindings

  • InspectionIssuesComponentID.issues() now returns the list of ComponentID (the type is now bound in OpenGeode-Inspector; the local definition is removed).
  • __str__ / __repr__ on StructuralModel*InspectionResult and CrossSection*InspectionResult.
  • Boolean checks bound on the geology inspectors (*_geology_is_valid, geometrical_components_are_linked_to_geology, geological_components_are_linked_to_geometry, horizons_are_valid), inherited by StructuralModelInspector / CrossSectionInspector.
  • New CrossSectionGeologyInspector, CrossSectionInspector, inspect_cross_section_geology, inspect_cross_section.

Fixes

  • Validity checks vs. reports: 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).
  • Messages: empty geological components "have no geometrical component" (instead of "not linked to any geometrical collection"); trailing space removed in "is not part of any FaultBlock".
  • README (module name, non-existent examples folder, subtitle), executables usage (no --noXXX option 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

  • C++: the fixed implicit model must be structural_model_geology_is_valid() (failed before the fix).
  • Python: test messages fixed (str + int concatenation raised TypeError), and new checks on issues(), str/repr, boolean checks, and a CrossSection built in the test.
  • 2/2 locally.

🤖 Generated with Claude Code

francoisbonneau and others added 3 commits November 2, 2026 17:12
- 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 francoisbonneau left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two behaviour questions to settle before merging

  1. 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)?

  2. 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?

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 69 concern(s)
  • bindings/python/src/inspection/cross_section_geology.hpp:30:50: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       30 |     void define_cross_section_geology_inspector( pybind11::module& module )
          |                                                  ^
  • bindings/python/src/inspection/cross_section_geology.hpp:32:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       32 |         pybind11::class_< CrossSectionGeologyInspectionResult >(
          |         ^
  • bindings/python/src/inspection/cross_section_geology.hpp:32:27: error: [clang-diagnostic-error]

    'CrossSectionGeologyInspectionResult' does not refer to a value

       32 |         pybind11::class_< CrossSectionGeologyInspectionResult >(
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/geology/cross_section_geology.hpp:42:56: note: declared here
       42 |         opengeode_inspector_geosciences_inspection_api CrossSectionGeologyInspectionResult
          |                                                        ^
  • bindings/python/src/inspection/cross_section_geology.hpp:34:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       34 |             .def( pybind11::init<>() )
          |                   ^
  • bindings/python/src/inspection/cross_section_geology.hpp:34:34: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                  ^
  • bindings/python/src/inspection/cross_section_geology.hpp:34:36: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                    ^
  • bindings/python/src/inspection/cross_section_geology.hpp:47:18: error: [clang-diagnostic-error]

    use of undeclared identifier 'issues_repr'

       47 |                 &issues_repr< CrossSectionGeologyInspectionResult > )
          |                  ^~~~~~~~~~~
  • bindings/python/src/inspection/cross_section_geology.hpp:51:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       51 |         pybind11::class_< CrossSectionGeologyInspector >(
          |         ^
  • bindings/python/src/inspection/cross_section_geology.hpp:51:27: error: [clang-diagnostic-error]

    'CrossSectionGeologyInspector' does not refer to a value

       51 |         pybind11::class_< CrossSectionGeologyInspector >(
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/geology/cross_section_geology.hpp:65:56: note: declared here
       65 |         opengeode_inspector_geosciences_inspection_api CrossSectionGeologyInspector
          |                                                        ^
  • bindings/python/src/inspection/cross_section_geology.hpp:53:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       53 |             .def( pybind11::init< const CrossSection& >() )
          |                   ^
  • bindings/python/src/inspection/cross_section_geology.hpp:53:35: error: [clang-diagnostic-error]

    expected expression

       53 |             .def( pybind11::init< const CrossSection& >() )
          |                                   ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:30:42: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       30 |     void define_cross_section_inspector( pybind11::module& module )
          |                                          ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:32:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       32 |         pybind11::class_< CrossSectionInspectionResult >(
          |         ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:32:27: error: [clang-diagnostic-error]

    'CrossSectionInspectionResult' does not refer to a value

       32 |         pybind11::class_< CrossSectionInspectionResult >(
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/cross_section_inspection.hpp:39:56: note: declared here
       39 |         opengeode_inspector_geosciences_inspection_api CrossSectionInspectionResult
          |                                                        ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:34:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       34 |             .def( pybind11::init<>() )
          |                   ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:34:34: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                  ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:34:36: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                    ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:40:32: error: [clang-diagnostic-error]

    use of undeclared identifier 'issues_repr'

       40 |             .def( "__repr__", &issues_repr< CrossSectionInspectionResult > )
          |                                ^~~~~~~~~~~
  • bindings/python/src/inspection/cross_section_inspection.hpp:44:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       44 |         pybind11::class_< CrossSectionInspector, SectionInspector,
          |         ^
  • bindings/python/src/inspection/cross_section_inspection.hpp:44:27: error: [clang-diagnostic-error]

    'CrossSectionInspector' does not refer to a value

       44 |         pybind11::class_< CrossSectionInspector, SectionInspector,
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/cross_section_inspection.hpp:54:58: note: declared here
       54 |     class opengeode_inspector_geosciences_inspection_api CrossSectionInspector
          |                                                          ^
  • bindings/python/src/inspection/structural_model_geology.hpp:30:53: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       30 |     void define_structural_model_geology_inspector( pybind11::module& module )
          |                                                     ^
  • bindings/python/src/inspection/structural_model_geology.hpp:32:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       32 |         pybind11::class_< StructuralModelGeologyInspectionResult >(
          |         ^
  • bindings/python/src/inspection/structural_model_geology.hpp:32:27: error: [clang-diagnostic-error]

    'StructuralModelGeologyInspectionResult' does not refer to a value

       32 |         pybind11::class_< StructuralModelGeologyInspectionResult >(
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/geology/structural_model_geology.hpp:42:56: note: declared here
       42 |         opengeode_inspector_geosciences_inspection_api StructuralModelGeologyInspectionResult
          |                                                        ^
  • bindings/python/src/inspection/structural_model_geology.hpp:34:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       34 |             .def( pybind11::init<>() )
          |                   ^
  • bindings/python/src/inspection/structural_model_geology.hpp:34:34: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                  ^
  • bindings/python/src/inspection/structural_model_geology.hpp:34:36: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                    ^
  • bindings/python/src/inspection/structural_model_geology.hpp:48:18: error: [clang-diagnostic-error]

    use of undeclared identifier 'issues_repr'

       48 |                 &issues_repr< StructuralModelGeologyInspectionResult > )
          |                  ^~~~~~~~~~~
  • bindings/python/src/inspection/structural_model_geology.hpp:52:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       52 |         pybind11::class_< StructuralModelGeologyInspector >(
          |         ^
  • bindings/python/src/inspection/structural_model_geology.hpp:52:27: error: [clang-diagnostic-error]

    'StructuralModelGeologyInspector' does not refer to a value

       52 |         pybind11::class_< StructuralModelGeologyInspector >(
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/geology/structural_model_geology.hpp:65:56: note: declared here
       65 |         opengeode_inspector_geosciences_inspection_api StructuralModelGeologyInspector
          |                                                        ^
  • bindings/python/src/inspection/structural_model_geology.hpp:54:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       54 |             .def( pybind11::init< const StructuralModel& >() )
          |                   ^
  • bindings/python/src/inspection/structural_model_geology.hpp:54:35: error: [clang-diagnostic-error]

    expected expression

       54 |             .def( pybind11::init< const StructuralModel& >() )
          |                                   ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:30:45: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       30 |     void define_structural_model_inspector( pybind11::module& module )
          |                                             ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:32:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       32 |         pybind11::class_< StructuralModelInspectionResult >(
          |         ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:32:27: error: [clang-diagnostic-error]

    'StructuralModelInspectionResult' does not refer to a value

       32 |         pybind11::class_< StructuralModelInspectionResult >(
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/structural_model_inspection.hpp:39:56: note: declared here
       39 |         opengeode_inspector_geosciences_inspection_api StructuralModelInspectionResult
          |                                                        ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:34:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       34 |             .def( pybind11::init<>() )
          |                   ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:34:34: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                  ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:34:36: error: [clang-diagnostic-error]

    expected expression

       34 |             .def( pybind11::init<>() )
          |                                    ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:41:32: error: [clang-diagnostic-error]

    use of undeclared identifier 'issues_repr'

       41 |             .def( "__repr__", &issues_repr< StructuralModelInspectionResult > )
          |                                ^~~~~~~~~~~
  • bindings/python/src/inspection/structural_model_inspection.hpp:45:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

       45 |         pybind11::class_< StructuralModelInspector, BRepInspector,
          |         ^
  • bindings/python/src/inspection/structural_model_inspection.hpp:45:27: error: [clang-diagnostic-error]

    'StructuralModelInspector' does not refer to a value

       45 |         pybind11::class_< StructuralModelInspector, BRepInspector,
          |                           ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/structural_model_inspection.hpp:55:9: note: declared here
       55 |         StructuralModelInspector : public AddInspectors< StructuralModel,
          |         ^
  • include/geode/inspector_geosciences/inspection/cross_section_inspection.hpp:34:1: warning: [llvm-namespace-comment]

    namespace 'geode' not terminated with a closing comment

       34 | }
          | ^
          |   // namespace geode
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/cross_section_inspection.hpp:31:11: note: namespace 'geode' starts here
       31 | namespace geode
          |           ^
  • include/geode/inspector_geosciences/inspection/cross_section_inspection.hpp:54:58: warning: [cppcoreguidelines-special-member-functions]

    class 'CrossSectionInspector' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator

       54 |     class opengeode_inspector_geosciences_inspection_api CrossSectionInspector
          |                                                          ^
  • include/geode/inspector_geosciences/inspection/geology/cross_section_geology.hpp:65:56: warning: [cppcoreguidelines-special-member-functions]

    class 'CrossSectionGeologyInspector' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator

       65 |         opengeode_inspector_geosciences_inspection_api CrossSectionGeologyInspector
          |                                                        ^
  • include/geode/inspector_geosciences/inspection/geology/structural_model_geology.hpp:65:56: warning: [cppcoreguidelines-special-member-functions]

    class 'StructuralModelGeologyInspector' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator

       65 |         opengeode_inspector_geosciences_inspection_api StructuralModelGeologyInspector
          |                                                        ^
  • include/geode/inspector_geosciences/inspection/structural_model_inspection.hpp:34:1: warning: [llvm-namespace-comment]

    namespace 'geode' not terminated with a closing comment

       34 | }
          | ^
          |   // namespace geode
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/include/geode/inspector_geosciences/inspection/structural_model_inspection.hpp:31:11: note: namespace 'geode' starts here
       31 | namespace geode
          |           ^
  • include/geode/inspector_geosciences/inspection/structural_model_inspection.hpp:55:9: warning: [cppcoreguidelines-special-member-functions]

    class 'StructuralModelInspector' defines a copy constructor and a copy assignment operator but does not define a destructor, a move constructor or a move assignment operator

       55 |         StructuralModelInspector : public AddInspectors< StructuralModel,
          |         ^
  • src/bin/geode-inspector-cross-section.cpp:41:6: warning: [misc-use-internal-linkage]

    function 'inspect_cross_section' can be made static or moved into an anonymous namespace to enforce internal linkage

       41 | void inspect_cross_section( const geode::CrossSection& cross_section )
          |      ^
          | static 
  • src/bin/geode-inspector-cross-section.cpp:55:13: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       55 |             argv[0], " --input my_cross_section.og_xsctn\n",
          |             ^
  • src/bin/geode-inspector-implicit-cross-section.cpp:41:6: warning: [misc-use-internal-linkage]

    function 'inspect_implicit_cross_section' can be made static or moved into an anonymous namespace to enforce internal linkage

       41 | void inspect_implicit_cross_section(
          |      ^
          | static 
  • src/bin/geode-inspector-implicit-cross-section.cpp:56:32: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       56 |             "Sample usage:\n", argv[0], " --input my_cross_section.og_ixsctn\n",
          |                                ^
  • src/bin/geode-inspector-implicit-structural-model.cpp:41:6: warning: [misc-use-internal-linkage]

    function 'inspect_implicit_structural_model' can be made static or moved into an anonymous namespace to enforce internal linkage

       41 | void inspect_implicit_structural_model(
          |      ^
          | static 
  • src/bin/geode-inspector-implicit-structural-model.cpp:55:32: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       55 |             "Sample usage:\n", argv[0],
          |                                ^
  • src/bin/geode-inspector-structural-model.cpp:41:6: warning: [misc-use-internal-linkage]

    function 'inspect_model' can be made static or moved into an anonymous namespace to enforce internal linkage

       41 | void inspect_model( const geode::StructuralModel& model )
          |      ^
          | static 
  • src/bin/geode-inspector-structural-model.cpp:54:36: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       54 |                 "Sample usage:\n", argv[0],
          |                                    ^
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:60:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       60 |         Impl( const CrossSection& model ) : model_( model ) {}
          |         ^
          |         explicit 
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:132:9: warning: [modernize-use-nodiscard]

    function 'horizon_invalidity' should be marked [[nodiscard]]

      132 |         std::optional< std::string > horizon_invalidity(
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/cross_section_geology.cpp:165:9: warning: [modernize-use-nodiscard]

    function 'surface_is_in_a_fault_block' should be marked [[nodiscard]]

      165 |         bool surface_is_in_a_fault_block( const Surface2D& surface ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:61:44: warning: [performance-unnecessary-value-param]

    the parameter 'component_range' is copied for each invocation but only used as a const reference; consider making it a const reference

       61 |         const Model& model, ComponentRange component_range )
          |                                            ^
          |                             const         &
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:76:24: warning: [performance-unnecessary-value-param]

    the parameter 'component_range' is copied for each invocation but only used as a const reference; consider making it a const reference

       76 |         ComponentRange component_range )
          |                        ^
          |         const         &
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:92:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       92 | namespace geode
          | ^~~~~~~~~~~~~~~
       93 | {
          | ~
       94 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:141:14: warning: [readability-function-cognitive-complexity]

    function 'model_geological_components_are_linked_to_geometry' has cognitive complexity of 12 (threshold 10)

      141 |         bool model_geological_components_are_linked_to_geometry(
          |              ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:144:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      144 |             for( const auto& fault_block : model.fault_blocks() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:146:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      146 |                 if( model.nb_items( fault_block.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:151:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      151 |             for( const auto& fault : model.faults() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:153:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      153 |                 if( model.nb_items( fault.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:158:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      158 |             for( const auto& horizon : model.horizons() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:160:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      160 |                 if( model.nb_items( horizon.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:165:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      165 |             for( const auto& stratigraphic_unit : model.stratigraphic_units() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:167:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      167 |                 if( model.nb_items( stratigraphic_unit.id() ) == 0 )
          |                 ^
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:176:14: warning: [readability-function-cognitive-complexity]

    function 'add_model_geological_components_not_linked_to_geometry' has cognitive complexity of 12 (threshold 10)

      176 |         void add_model_geological_components_not_linked_to_geometry(
          |              ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:179:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      179 |             for( const auto& fault_block : model.fault_blocks() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:181:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      181 |                 if( model.nb_items( fault_block.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:189:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      189 |             for( const auto& fault : model.faults() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:191:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      191 |                 if( model.nb_items( fault.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:199:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      199 |             for( const auto& horizon : model.horizons() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:201:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      201 |                 if( model.nb_items( horizon.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:209:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      209 |             for( const auto& stratigraphic_unit : model.stratigraphic_units() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:211:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      211 |                 if( model.nb_items( stratigraphic_unit.id() ) == 0 )
          |                 ^
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:61:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       61 |         Impl( const StructuralModel& model ) : model_( model ) {}
          |         ^
          |         explicit 
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:133:9: warning: [modernize-use-nodiscard]

    function 'horizon_invalidity' should be marked [[nodiscard]]

      133 |         std::optional< std::string > horizon_invalidity(
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:166:9: warning: [modernize-use-nodiscard]

    function 'block_is_in_a_fault_block' should be marked [[nodiscard]]

      166 |         bool block_is_in_a_fault_block( const Block3D& block ) const
          |         ^
          |         [[nodiscard]] 
  • tests/inspection/test-structural-model-inspection.cpp:40:6: warning: [misc-use-internal-linkage]

    function 'check_model_A2' can be made static or moved into an anonymous namespace to enforce internal linkage

       40 | void check_model_A2()
          |      ^
          | static 
  • tests/inspection/test-structural-model-inspection.cpp:40:6: warning: [readability-identifier-naming]

    invalid case style for global function 'check_model_A2'

       40 | void check_model_A2()
          |      ^~~~~~~~~~~~~~
          |      check_model_a2
  • tests/inspection/test-structural-model-inspection.cpp:51:54: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

       51 |     const geode::index_t expected_nb_geology_issues{ model.nb_blocks() * 2
          |                                                      ^~~~~~~~~~~~~~~~~~~~~
          |                                                      (                    )
  • tests/inspection/test-structural-model-inspection.cpp:64:6: warning: [misc-use-internal-linkage]

    function 'check_implicit_model' can be made static or moved into an anonymous namespace to enforce internal linkage

       64 | void check_implicit_model()
          |      ^
          | static 

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

@BenPinet
BenPinet merged commit eed6cea into next Nov 4, 2026
25 checks passed
@BenPinet
BenPinet deleted the feat/geology-python-bindings branch November 4, 2026 13:21
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.

4 participants