-
Notifications
You must be signed in to change notification settings - Fork 19
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
Adding tests to Util #239
Adding tests to Util #239
Conversation
Currently there are some place holder functions in here and I did not generate the requisite images yet, just creating this PR so that my work so far is visible. |
I would love to replace some of the datafiles accessed will simpler dummy data, but because of the lat/lon grids and skewt plots, it seemed easier to access these small datafiles. |
Co-authored-by: Katelyn FitzGerald <7872563+kafitzgerald@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.
Sorry for the individual suggestions before - I meant to include those in the review.
This looks like a great start to me! Obviously, things at could be improved / added, but I think just getting this merged ASAP probably makes sense.
I think my main question/concern is about the imports (see the inline comment).
And then a minor thing - should the tests/test.ipynb be removed? It looks like an empty file that got added by accident.
tests/test_util.py
Outdated
|
||
from geocat.viz.util import truncate_colormap | ||
import geocat.viz.util as gv |
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.
Was there a reason for switching this up? The convention I've typically seen for code being tested is the explicit "from x import y" for all tested functions and classes. Generally at the bottom of the imports section.
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.
I did not realize that, I thought importing every single util function would take up a lot of space, so I imported the module instead. I see how that would make it more clear right away.
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.
🥳
PR Summary
First pass at tests for util.py
Closes #126
PR Checklist
General
closes #XXX
to the PR description where XXX is the number of the issue.docs/release-notes.rst
in a relevant section for the next unreleased release. Possible sections include: Documentation, New Features, Bug Fixes, Internal Changes, Breaking Changes/Deprecatedprecommit
. To set up on your local, runpre-commit install
from the top level of the repository. To manually run pre-commits, usepre-commit run --all-files
and re-add any changed files before committing again and pushing.