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 suite improvements #1684

Open
VeckoTheGecko opened this issue Sep 3, 2024 · 1 comment
Open

Test suite improvements #1684

VeckoTheGecko opened this issue Sep 3, 2024 · 1 comment

Comments

@VeckoTheGecko
Copy link
Contributor

Currently the test suite takes 15+ minutes to run (windows is much more, closer to 30 mins). It would be good to reduce this, as well as bring other improvements to the test suite. I think code duplication, and "non-testing" (e.g., data setup) related code in the test suite is a pressing concern and makes it difficult to work with the test-suite.

We have 1112 tests, while xarray has 17354, yet xarray's test suite is 6 minutes. I think we can definitely improve here. From the top of my head (in order of what I think is most-> least pressing):

  • Defining a set of standard fieldsets (and other parcels related data objects) to do testing on by making them into fixtures in a conftest.py file so its scoped across the test suite
    • We have the test_data folder with datasets. I think these are only used for integration tests, with a lot of unit tests generating fieldset/grids within the tests themselves
  • Defining params appropriately to avoid unnecessary test duplication
  • Scoping fixtures appropriately (reducing set up/tear down of fixtures that are used a lot). I think this is less of an issue.

I think it would be worth investigating any additional measures xarray does to help with performance.

@VeckoTheGecko
Copy link
Contributor Author

Another improvement: When the test suite is run locally it saves a bunch of zarr and netcdf files all over the working directory. Although these are gitignored, it still clutters the workspace. Perhaps worth adjusting this so that it doesn't save output when its run via pytest (look at an env variable maybe?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready
Development

No branches or pull requests

1 participant