refactor: extract ModelFeatureFactory from GeologicalModel - #308
Open
lachlangrose wants to merge 1 commit into
Open
Conversation
Move the seven _build_* feature-construction methods (foliation, fold frame, folded foliation, folded fold frame, intrusion, domain fault, fault) -- collectively ~1000 lines, the largest remaining chunk of GeologicalModel -- into a standalone ModelFeatureFactory. The FeatureBuilderRegistry wiring at the bottom of geological_model.py now dispatches to ModelFeatureFactory.build_* instead of the removed private methods. Public create_and_add_* wrappers are unchanged; their docstring cross-references are updated to point at the new factory location. geological_model.py drops from 2579 to 1505 lines. (cherry picked from commit 068d93b)
This was referenced Aug 14, 2026
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.
Split out of #298 / #299. PR 9 of 9 in the stack — depends on #307.
Last of four sequential extractions, and the largest: moves feature-building logic (including intrusion building, which is why this needs #300's intrusions fix in its ancestry) out of
geological_model.pyinto a new_model_feature_factory.py.This is the tip of the stack. Merged together with #303 (tip of the other line), the full stack reproduces the original combined branch tree exactly (verified: zero diff).