Skip to content

Remove runtime numpy requirement from rendered BMI classes - #90

Merged
mcflugen merged 1 commit into
csdms:masterfrom
mcflugen:add-type-checking-guard-to-template
Oct 20, 2026
Merged

mcflugen merged 1 commit into
csdms:masterfrom
mcflugen:add-type-checking-guard-to-template

Conversation

@mcflugen

Copy link
Copy Markdown
Member

I've added a guard around the numpy imports with TYPE_CHECKING for the implementations created with the CLI bmipy-render. This preserves type annotations while allowing generated classes to load without numpy.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.84%. Comparing base (69d978f) to head (f15a17c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   97.84%   97.84%   -0.01%     
==========================================
  Files          10       10              
  Lines         372      371       -1     
==========================================
- Hits          364      363       -1     
  Misses          8        8              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mcflugen
mcflugen merged commit 6dacc71 into csdms:master Oct 20, 2026
22 checks passed
@mcflugen
mcflugen deleted the add-type-checking-guard-to-template branch October 20, 2026 02:51
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.

2 participants