Conversation
…e levels_ to layers_ Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
…e levels_ to layers_ Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
levels_ to layers_
There was a problem hiding this comment.
Pull request overview
This PR applies two post-merge cleanup fixes from the review of PR #136, which refactored "level" terminology to "layer" throughout the codebase. The changes correct a header guard mismatch and an inconsistent member variable name that were missed in the original refactoring.
- Fixed header guard macro in
data_cell_index.hppto match the actual filename - Renamed
levels_member variable tolayers_inframework_graphto align with its typestd::stack<layer_sentry>
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
phlex/model/data_cell_index.hpp |
Corrects header guard from PHLEX_MODEL_DATA_CELL_ID_HPP to PHLEX_MODEL_DATA_CELL_INDEX_HPP (lines 1, 2, 65) to match filename convention |
phlex/core/framework_graph.hpp |
Renames member variable levels_ to layers_ (line 149) to match its type std::stack<layer_sentry> |
phlex/core/framework_graph.cpp |
Updates all references to levels_ → layers_ (lines 160, 161, 164, 170, 171) in accept() and drain() methods |
.gitignore |
Adds standard CMake build artifacts: CMakeCache.txt, CMakeFiles/, _deps/, and _codeql_detected_source_root |
knoepfel
left a comment
There was a problem hiding this comment.
Looks good @greenc-FNAL. Sorry about the communication issue wrt. #136.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #160 +/- ##
=======================================
Coverage 81.18% 81.18%
=======================================
Files 116 116
Lines 2046 2046
Branches 328 328
=======================================
Hits 1661 1661
Misses 250 250
Partials 135 135
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Applies two patches from post-merge review of #136 (level→layer terminology refactoring).
Changes
data_cell_index.hppguard macro fromPHLEX_MODEL_DATA_CELL_ID_HPP→PHLEX_MODEL_DATA_CELL_INDEX_HPPto match filenamelevels_→layers_inframework_graphto match its typestd::stack<layer_sentry>Remaining items from #136 analysis (not in scope)
data_cell_indexvsdata_layer_hierarchy)data_cell_index.hpp+fwd.hpp)product_query::to_layer()takes non-const ref whileto_nameuses const refOriginal prompt
This section details on the original issue you should resolve
<issue_title>Late review/suggestions for #136</issue_title>
<issue_description>I was still trying to produce a readable composite review (Copilot/me) of #136 when it was approved and merged.
Below, please find Copilot's analysis of #136 followed by two patches it generated to address some of its findings:
Thanks — I analyzed the full diff you attached (
git diff -w --minimal upstream/main). Below I list the terminology/naming changes I found, grouped by concept, and then I call out anomalies >(misspellings, inconsistent terminology, likely-missed edits, and a few places that could cause build/semantic surprises). At the end I note recommended fixes and next steps I can take if you want.What I did
Summary (global mapping of old → new)
level_id→data_cell_indexlevel_id.hpp/level_id.cppdeleteddata_cell_index.hpp/data_cell_index.cppaddedlevel_id::hash_type→data_cell_index::hash_typelevel_id_ptr→data_cell_index_ptrlevel_id::base_ptr()→data_cell_index::base_ptr()level_id::level_name()→data_cell_index::layer_name()level_id::level_hash()→data_cell_index::layer_hash()make_child(...)usenew_layer_nameargument namelevel_counter→data_cell_counterlevel_counter.hpp/.cppdeleteddata_cell_counter.hpp/.cppaddedflush_countsusesdata_cell_index::hash_type(waslevel_id::hash_type)level_hierarchy→data_layer_hierarchylevel_hierarchy.hpp/.cpprenamed →data_layer_hierarchy.hpp/.cpplevel_entry→layer_entrylevels_map →layers_map (inside hierarchy files)"level" (as a concept) → "layer" (as user-facing term in many places)
product_query.family→product_query.layerproduct_query.operator()(std::string family)→operator()(std::string layer)product_matcher.level_path→product_matcher.layer_pathproduct_matcher-level_pathencode / error messages changed to mention “layer”level-related APIs in
product_storeand coreproduct_store::level_name()→product_store::layer_name()product_store::parent(level_name)→parent(layer_name)product_storeconstructors now usenew_layer_nameparameter namesproduct_store::id()now returnsdata_cell_index_ptr(instead oflevel_id_ptr)Naming in concurrency/graph primitives
level_sentry→layer_sentry(class)std::stack<layer_sentry>), but see anomaly re: member variable name belowMany tests and examples updated to use the new types/terms:
level_counting.cpp→data_cell_counting.cpp,level_id.cpp→data_cell_index.cppCMake
model/CMakeLists.txt: removedlevel_*files and addeddata_cell_counter.cpp,data_layer_hierarchy.cpp,data_cell_index.cppFiles renamed or added / removed (high-level)
Removed:
phlex/model/level_id.hpp(deleted)phlex/model/level_id.cpp(deleted)phlex/model/level_counter.hpp/.cpp(deleted)phlex/model/level_hierarchy.hpp/.cpp(renamed)Added:
phlex/model/data_cell_index.hpp/.cppphlex/model/data_cell_counter.hpp/.cppphlex/model/data_layer_hierarchy.hpp/.cpp(rename oflevel_hierarchy.*)Many source files updated to include the new headers and to use the new types/names.
All concrete symbol renames (representative list)
level_id->data_cell_index(class)level_id_ptr->data_cell_index_ptrlevel_hash->layer_hashlevel_name->layer_namelevel_counter->data_cell_counterlevel_hierarchy->data_layer_hierarchylevel_entry->layer_entrylevels_(in hierarchy) ->layers_(map in hierarchy implementation)level_sentry->layer_sentryproduct_query.family->product_query.layerproduct_query.operator()(std::string family)->operator()(std::string layer)product_matcher.level_path->product_matcher.layer_pathproduct_store::level_name()->product_store::layer_name()message_sender(level_hierarchy&)->message_sender(data_layer_hierarchy&)✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.