Repository navigation
Add BmiStub for partial BMI implementations - #84
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #84 +/- ##
==========================================
+ Coverage 96.25% 97.31% +1.05%
==========================================
Files 8 10 +2
Lines 267 372 +105
Branches 11 11
==========================================
+ Hits 257 362 +105
Misses 8 8
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes implement the intended interface with focused tests and no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds BmiStub so users can implement part of the BMI interface without overriding every abstract method.
Changes:
- Adds and publicly exports a concrete stub whose methods raise
NotImplementedError. - Tests instantiation, exception behavior, and signature compatibility.
- Updates docstring checks to accommodate stub methods.
| File | Description |
|---|---|
| tests/stub_test.py | Tests completeness, exceptions, and matching signatures. |
| src/bmipy/_stub.py | Implements the concrete BMI stub. |
| src/bmipy/__init__.py | Exports BmiStub publicly. |
| .pre-commit-config.yaml | Updates source paths and adds stub-specific docstring checks. |
Review effort: Balanced
mcflugen
force-pushed
the
add-bmistub
branch
2 times, most recently
from
October 19, 2026 01:11
382b967 to
00eabe5
Compare
Member
Author
I think so too. Thanks for having a look at this. |
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.
I've added
BmiStubthat implements all of theBmimethods by raisingNotImplementedErrorfor each of them. Users can subclass it to build partial BMI implementations without having to override every abstract method.