Skip to content

refactor: extract ModelFeatureFactory from GeologicalModel - #308

Open
lachlangrose wants to merge 1 commit into
split/08-extract-feature-relationship-managerfrom
split/09-extract-model-feature-factory
Open

refactor: extract ModelFeatureFactory from GeologicalModel#308
lachlangrose wants to merge 1 commit into
split/08-extract-feature-relationship-managerfrom
split/09-extract-model-feature-factory

Conversation

@lachlangrose

Copy link
Copy Markdown
Member

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.py into 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).

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

1 participant