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

Test improvements today #334

Merged
merged 7 commits into from
May 26, 2023
Merged

Test improvements today #334

merged 7 commits into from
May 26, 2023

Commits on May 11, 2023

  1. TST: Skip long-running notebook tests.

    5 and 17 are culprits.  After the fast FiniteDifference is moved from pysindy
    to derivative, 5 will be faster.
    
    Also gitignore output files from 17.
    Jacob-Stevens-Haas committed May 11, 2023
    Configuration menu
    Copy the full SHA
    64a4f4b View commit details
    Browse the repository at this point in the history
  2. TST: Simplify legacy ensemble test

    We don't need to test legacy ensembling behavior for every optimizer,
    since the ensembling part doesn't depend upon the inner optimizer.  We also
    don't need 10x10 bagging x library_bagging, we just need 2x2 to test
    functionality.
    
    Old test durations:
    4.82s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[StableLinearSR3]
    1.69s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[MIOSR]
    0.36s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[TrappingSR3]
    0.34s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[FROLS]
    0.11s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[SSR]
    0.04s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[ConstrainedSR3]
    0.04s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[SR3]
    0.04s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes[STLSQ]
    
    New test duration:
    0.02s call     test/optimizers/test_optimizers.py::test_legacy_ensemble_odes
    Jacob-Stevens-Haas committed May 11, 2023
    Configuration menu
    Copy the full SHA
    3445cb9 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. TST: Break apart integration test for nan derivatives.

    Also, make test/differentiation/test_differentiation_methods.py just
    test/test_differentiation.py.  Unneccessary nesting.
    
    Previously, test_nan_derivatives asked whether the model fit by SINDy when
    FiniteDifference gave NaN endpointswas close to the model fit without nans.
    This is an integration test that is really asking whether FiniteDifference is
    calculating derivatives in a consistent with drop_endpoints=True and False.
    
    Also, a bit faster but this test was fast to begin with.
    Jacob-Stevens-Haas committed May 12, 2023
    Configuration menu
    Copy the full SHA
    f7f48f1 View commit details
    Browse the repository at this point in the history
  2. TST: Make data-dependent test not depend upon data.

    Previously, test_complexity and test_coefficients just tested that
    - required names are present in SINDy object
    - when fit on some amount of data, less than 10 terms were nonzero
    - These are essentially the same test, since model.complexity is just
      a wrapper around it's optimizer's complexity property
    
    But Lorenz has 7 nonzero terms, and when I changed the data to speed up
    tests, data had a few more nonzeros.
    Jacob-Stevens-Haas committed May 12, 2023
    Configuration menu
    Copy the full SHA
    53a43df View commit details
    Browse the repository at this point in the history
  3. TST: Shorten test data.

    We don't need 500 timepoints; shortening to 50.
    
    Also, data_sindypi_library and data_pde_library had an implicit
    dependence upon data_lorenz; this commit makes that dependence explicit.
    Jacob-Stevens-Haas committed May 12, 2023
    Configuration menu
    Copy the full SHA
    fe9fe6a View commit details
    Browse the repository at this point in the history
  4. TST: Flatten test directory.

    A lot of test files were nested under a directory with just one file.  It's now
    one less click to view test results or files.
    Jacob-Stevens-Haas committed May 12, 2023
    Configuration menu
    Copy the full SHA
    5843574 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c9286d8 View commit details
    Browse the repository at this point in the history