Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor updates to T Model functions and testing #303

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

davidorme
Copy link
Collaborator

@davidorme davidorme commented Sep 28, 2024

This PR is to:

  • Adds a T Model function to reverse calculate DBH from stem height.
  • Moves the R T model data into tests/unit/demography/conftest.py so it can be shared and splits it into a dataframe of expected values and a new Flora object created from the PFT definitions.
  • Updates the unit testing for the T Model functions to use these new structures.

Fixes #302 (issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@davidorme davidorme linked an issue Sep 28, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.71%. Comparing base (1f315ba) to head (e431d04).
Report is 154 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #303      +/-   ##
===========================================
+ Coverage    95.29%   95.71%   +0.42%     
===========================================
  Files           28       34       +6     
  Lines         1720     2336     +616     
===========================================
+ Hits          1639     2236     +597     
- Misses          81      100      +19     
Flag Coverage Δ
95.71% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@davidorme davidorme changed the title Overhaul of T Model unit testing Minor updates to T Model functions and testing Sep 28, 2024
@j-emberton j-emberton self-requested a review September 29, 2024 12:52
@davidorme davidorme merged commit 4e5f296 into develop Sep 29, 2024
12 checks passed
@davidorme davidorme deleted the 302-t-model-testing-updates branch September 29, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Minor T Model updates
3 participants