-
Notifications
You must be signed in to change notification settings - Fork 40
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
create test_weights.py #254
Comments
I like the weights function as it easily integrates in loops over dims or pytest parametrize. My PR tested weights for some commits https://github.com/xarray-contrib/xskillscore/pull/231/files |
I don’t understand Matthews post that we should more verbose functions here. I rather like the idea that weights is abstracted away here as the weights depend on dims. I see much code duplication in the new suggestion which will be harder to maintain. +1 for a weights testing file refactoring. |
Can be closed? |
I need to finish the other (non scikit-learn metrics) |
I need to add scipy stats then can close |
Taken from #221 (comment) (thanks @dougiesquire)
This needs to be addressed before #221.
In our testing suite we have a function https://github.com/xarray-contrib/xskillscore/blob/master/xskillscore/tests/test_deterministic.py#L72
Is there a way this could be moved upstream to conftest.py?
While verbose we could create fixtures for these (5) e.g.
https://matthewrocklin.com/blog/work/2019/06/23/avoid-indirection
Also i'm not sure if we are testing the weight implementation anywhere. As we found out in #248
test_determinstic.py
mostly tests the ufunc part. There are some separate test files for functionality e.g.test_skipna_functionality
. We should create one for weights.The text was updated successfully, but these errors were encountered: