Skip to content

fix: warn instead of raise in set_stratigraphic_column - #297

Open
manduinca wants to merge 1 commit into
Loop3D:masterfrom
manduinca:fix/set-stratigraphic-column-warn
Open

fix: warn instead of raise in set_stratigraphic_column#297
manduinca wants to merge 1 commit into
Loop3D:masterfrom
manduinca:fix/set-stratigraphic-column-warn

Conversation

@manduinca

Copy link
Copy Markdown
Contributor

Fixes #296

set_stratigraphic_column raised DeprecationWarning unconditionally, which broke GeologicalModel.from_processor (its last step assigns the processor's column dict to the stratigraphic_column setter) and left the dict-to-column conversion code below the raise unreachable. This emits the deprecation warning with warnings.warn instead, so the legacy dict format keeps working while still nudging users to stratigraphic_column.add_units.

Added a regression test in test_data_processor.py building a small synthetic processor and asserting from_processor completes and populates the column. Verified the bundled geological map example path end to end (12 units + unconformity in the column) and the full test suite passes locally (709 passed).

set_stratigraphic_column raised DeprecationWarning unconditionally,
which broke GeologicalModel.from_processor (its last step assigns the
processor's column dict to the stratigraphic_column setter) and left
the dict-to-column conversion code below the raise unreachable. Emit
the deprecation warning with warnings.warn instead so the legacy dict
format keeps working, and add a regression test covering
from_processor.

Fixes Loop3D#296
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.

from_processor crashes: set_stratigraphic_column raises DeprecationWarning unconditionally

1 participant