curveresearch / curvesim

Simulates Curve Finance pools
MIT License
156 stars 32 forks source link

Use non-deprecated option with days #235

Closed chanhosuh closed 1 year ago

chanhosuh commented 1 year ago

Description

Numpy no longer allows the "Y" unit in its timedelta constructor, e.g. timedelta64(1, 'Y'), due to a "year" being an ambiguous number of nanoseconds.

We fix this by using timedelta64(365, 'D'), which does not materially impact our annualization calculation.

Fixes #233.

Hygiene checklist

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

github-actions[bot] commented 1 year ago

Coverage report

The coverage rate went from 74.93% to 74.93% :arrow_down: The branch rate is 61%.

100% of new lines are covered.

Diff Coverage details (click to unfold) ### curvesim/metrics/metrics.py `100%` of new lines are covered (`83.76%` of the complete file).