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
Add test_timeseries #1356
Add test_timeseries #1356
Conversation
for more information, see https://pre-commit.ci
Co-authored-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Were you planning on replacing the existing timeseries fixtures with this? Might be a lengthy process but I can give you a hand.
The initial goal of this PR was to create something that xscen could use for tests. It was not my plan to replace existing fixtures, but I/we can do it if it's something that people want/need. |
Well, how about we get the ball rolling here and see how far we get? I'll start with the |
what about just having the |
@aulemahal Just mentioned that as a much nicer approach to me. Let's go with that. I can effect that changes. |
This PR has the @RondeauG of approval |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
test_timeseries
. The function takes in an array and the name of a variable (not indicator) and creates a DataArray or Dataset ready to be used for tests.Does this PR introduce a breaking change?
no
Other information:
I don't really know how pytest and fixtures work, but I tried something...
I put it in xclim.testing.helpers as discussed in the meetingthursday, but it seems like it is not found as a fixture. If I try to use it in-> this is fixed.test_atmos.py
, it fails. If I put it inconftest.py
, then I am able to use it intest_atmos.py
. Should I move it or do something else to make it accessible ?Should I do something like line 14 of test_sdba/conftest.py:
cannon_2015_dist = pytest.fixture(tu.cannon_2015_dist)
?