ImperialCollegeLondon / pyrealm

Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://pyrealm.readthedocs.io/
MIT License
19 stars 8 forks source link

Use a function `eval_poly` for polynomial evaluation #187

Closed tztsai closed 5 months ago

tztsai commented 6 months ago

Description

A function eval_poly is implemented in pyrealm.core.utilities using Horner's method for polynomial evaluation and used to simplify H2O density calculation and specific heat calculation of air.

Fixes #167

Type of change

Key checklist

Further checks

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.47%. Comparing base (858e5e9) to head (c4361ec).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #187 +/- ## =========================================== - Coverage 94.58% 94.47% -0.12% =========================================== Files 28 28 Lines 1514 1483 -31 =========================================== - Hits 1432 1401 -31 Misses 82 82 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

davidorme commented 5 months ago

I fixed the qa failure - somehow a black issue had snuck past pre-commit. The tests are failing but I think the docs failure is a VM fail - it runs on the push but not on the pr event.

davidorme commented 5 months ago

I've pushed an update of the failing test and expanded it a bit to make sure it handles different inputs. Can you make sure you run pytest before pushing commits? Particularly when working on tests, making sure that things run locally before setting off GitHub Actions can save a lot of waiting around!

tztsai commented 5 months ago

I've pushed an update of the failing test and expanded it a bit to make sure it handles different inputs. Can you make sure you run pytest before pushing commits? Particularly when working on tests, making sure that things run locally before setting off GitHub Actions can save a lot of waiting around!

Thanks for the update! I'll make sure the run the tests before pushing.