-
Notifications
You must be signed in to change notification settings - Fork 124
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
consequently use get_testfile #822
consequently use get_testfile #822
Conversation
I think the method |
renaming the test datasets is a very good idea! However - I'd prefer to do it in another PR. This one doesn't touch the names, only the way to get to the data. And it gets rid of the superfluous The main reason for not delaying this is the version check, that allows to update test datasets in the data api without having to touch the code too. |
@@ -41,7 +41,7 @@ | |||
""" | |||
Directory for writing (and subsequent reading) of temporary files created during tests. | |||
""" | |||
HAZ_TEST_MAT :Path = Path(hazard_test.__file__).parent.joinpath('data', 'atl_prob_no_name.mat') | |||
HAZ_TEST_MAT :Path = get_test_file('atl_prob_no_name', file_format='matlab') |
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.
Any reason to sometimes use the HAZ_TEST_MAT :Path =
style and sometimes HAZ_TEST_MAT =
?
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.
No reason, except that no type annotation has been changed in this PR.
Can we also add a note in the developers guide to refer to this way of getting test data? Then over time it will harmonize. |
I've added the note in the Developer Guide PR: a8c6716 |
Excellent! |
Please feel free to merge after updating the changelog. |
Changes proposed in this PR:
climada.test.get_testfile
function where applicablePR Author Checklist
develop
)PR Reviewer Checklist