dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.42k stars 310 forks source link

Even faster tests :smoking: #393

Closed Jacob-Stevens-Haas closed 1 year ago

Jacob-Stevens-Haas commented 1 year ago

Took the :microscope: to the slowest tests of StableLinearSR3 and TrappingSR3. Since test parameterization affected only the creation of CVXPY functions, I refactored that part out to speed up tests.

This drops test time from around 45 sec to ~30~ 14 sec

Closes #320

@akaptano, if you get a chance to review, that would be great, since this mostly affects your code. Edit: @znicolaou, I made all the changes to Weak/PDE library tests here too.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02% :warning:

Comparison is base (ec8b34c) 93.76% compared to head (652c219) 93.74%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #393 +/- ## ========================================== - Coverage 93.76% 93.74% -0.02% ========================================== Files 37 37 Lines 3590 3583 -7 ========================================== - Hits 3366 3359 -7 Misses 224 224 ``` | [Files Changed](https://app.codecov.io/gh/dynamicslab/pysindy/pull/393?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab) | Coverage Δ | | |---|---|---| | [pysindy/optimizers/stable\_linear\_sr3.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/393?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9vcHRpbWl6ZXJzL3N0YWJsZV9saW5lYXJfc3IzLnB5) | `85.40% <100.00%> (-0.93%)` | :arrow_down: | | [pysindy/optimizers/trapping\_sr3.py](https://app.codecov.io/gh/dynamicslab/pysindy/pull/393?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab#diff-cHlzaW5keS9vcHRpbWl6ZXJzL3RyYXBwaW5nX3NyMy5weQ==) | `89.80% <100.00%> (-0.16%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/dynamicslab/pysindy/pull/393/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dynamicslab)

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