Skip to content

feat(Inspection): Added the inspection library and tests on a structu… - #1

Merged
BotellaA merged 6 commits into
nextfrom
feat/inspection_lib_start
Jun 29, 2026
Merged

BotellaA merged 6 commits into
nextfrom
feat/inspection_lib_start

Conversation

@MelchiorSchuh

Copy link
Copy Markdown
Member

…ral model

@MelchiorSchuh
MelchiorSchuh requested a review from BotellaA June 29, 2026 12:44
@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 34 concern(s)
  • bindings/python/src/inspection/structural_model_geology.hpp:32:53: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

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

    use of undeclared identifier 'pybind11'

       34 |         pybind11::class_< InspectionIssues< ComponentID > >(
          |         ^
  • bindings/python/src/inspection/structural_model_geology.hpp:34:59: error: [clang-diagnostic-error]

    expected '(' for function-style cast or type construction

       34 |         pybind11::class_< InspectionIssues< ComponentID > >(
          |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  • bindings/python/src/inspection/structural_model_geology.hpp:43:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

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

    'StructuralModelGeologyInspectionResult' does not refer to a value

       43 |         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:45:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

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

    expected expression

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

    expected expression

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

    use of undeclared identifier 'pybind11'

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

    'StructuralModelGeologyInspector' does not refer to a value

       60 |         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:62:19: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

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

    expected expression

       62 |             .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:43:9: error: [clang-diagnostic-error]

    use of undeclared identifier 'pybind11'

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

    'StructuralModelInspector' does not refer to a value

       43 |         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/geology/geology_helpers.hpp:42:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       42 | namespace geode
          | ^~~~~~~~~~~~~~~
       43 | {
          | ~
       44 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal
  • 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/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:85: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

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

    nested namespaces can be concatenated

      101 | namespace geode
          | ^~~~~~~~~~~~~~~
      102 | {
          | ~
      103 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:148:14: warning: [readability-function-cognitive-complexity]

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

      148 |         bool model_geological_components_are_linked_to_geometry(
          |              ^
    /__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_block : model.fault_blocks() )
          |             ^
    /__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_block.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& fault : model.faults() )
          |             ^
    /__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( fault.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& horizon : model.horizons() )
          |             ^
    /__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( horizon.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:172:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      172 |             for( const auto& stratigraphic_unit : model.stratigraphic_units() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:174:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      174 |                 if( model.nb_items( stratigraphic_unit.id() ) == 0 )
          |                 ^
  • src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:183:14: warning: [readability-function-cognitive-complexity]

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

      183 |         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:186:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      186 |             for( const auto& fault_block : model.fault_blocks() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:188:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      188 |                 if( model.nb_items( fault_block.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:196:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      196 |             for( const auto& fault : model.faults() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:198:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      198 |                 if( model.nb_items( fault.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:206:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      206 |             for( const auto& horizon : model.horizons() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:208:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      208 |                 if( model.nb_items( horizon.id() ) == 0 )
          |                 ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:216:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      216 |             for( const auto& stratigraphic_unit : model.stratigraphic_units() )
          |             ^
    /__w/OpenGeode-Inspector_Geosciences/OpenGeode-Inspector_Geosciences/src/geode/inspector_geosciences/inspection/geology/geology_helpers.cpp:218:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      218 |                 if( model.nb_items( stratigraphic_unit.id() ) == 0 )
          |                 ^
  • src/geode/inspector_geosciences/inspection/geology/structural_model_geology.cpp:63:9: warning: [google-explicit-constructor]

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

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

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

      116 |         std::optional< std::string > horizon_invalidity(
          |         ^
          |         [[nodiscard]] 
  • tests/inspection/test-structural-model-inspection.cpp:36:6: warning: [misc-use-internal-linkage]

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

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

    invalid case style for global function 'check_model_A2'

       36 | void check_model_A2()
          |      ^~~~~~~~~~~~~~
          |      check_model_a2
  • tests/inspection/test-structural-model-inspection.cpp:59:6: warning: [misc-use-internal-linkage]

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

       59 | void check_implicit_model()
          |      ^
          | static 

Have any feedback or feature suggestions? Share it here.

@BotellaA
BotellaA merged commit 96147b6 into next Jun 29, 2026
23 checks passed
@BotellaA
BotellaA deleted the feat/inspection_lib_start branch June 29, 2026 18:23
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.0.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants