Add BMI (Basic Model Interface) integration#168
Merged
taddyb merged 4 commits intoDeepGroundwater:masterfrom Mar 18, 2026
Merged
Add BMI (Basic Model Interface) integration#168taddyb merged 4 commits intoDeepGroundwater:masterfrom
taddyb merged 4 commits intoDeepGroundwater:masterfrom
Conversation
The TestColdStart tests use a MagicMock mapper, which caused compute_hotstart_discharge to pass a mock crow_indices to triangular_sparse_solve. len(MagicMock()) - 1 == -1, producing a negative scipy sparse matrix shape. Patch the hotstart function in the two cold-start tests since they only verify the _cold_started flag, not the hotstart computation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
src/ddr/bmi/ddr_bmi.py) for the DDR differentiable routing model, enabling interoperability with CSDMS and other earth-system modeling frameworkssrc/ddr/bmi/config.py) and exposes the interface via the public API (src/ddr/__init__.py)tests/bmi/test_ddr_bmi.py, 833 lines) covering initialization, variable getters/setters, time stepping, and grid methodsTest plan
uv run pytest tests/bmi/— all unit tests passuv run pytest— full test suite remains greeninitialize → update → finalizewith a sample config🤖 Generated with Claude Code