-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Increasing Test coverage #59
Conversation
Hello @jeffreypaul15! Thanks for updating this PR.
Comment last updated at 2021-04-10 00:58:11 UTC |
@nabobalis Are these tests fine or should I have to manually store the lists and then check for Also, the following methods return enhanced SunPy maps, would figure tests be required for them? sunkit-image/sunkit_image/radial.py Line 107 in bd40d86
sunkit-image/sunkit_image/radial.py Line 361 in bd40d86
sunkit-image/sunkit_image/radial.py Line 209 in bd40d86
|
The tests look fine, I assume the ipython notebook was just for your use? Figure tests or normal unit test would be ok. The figure-tests is broken due to a deprecation warning, probably best to ignore it for now in setup.cfg |
Oh yeah, sorry about the notebook I'll remove it |
@nabobalis methods from Also, should I go through with the figure tests? I mean, I have tested them with unit tests so I don't really think they're required. |
py37-oldestdeps [linux] is failing and I'm a bit confused as to why. |
def test_get_radial_intensity_summary(): | ||
# TODO: Write some tests. | ||
pass |
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.
What about this one?
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.
Oh yeah, I forgot about this. I'll add this.
Well a package difference means the test output is different. |
Yeah the output is different for both of the tests, is there a way I can get a different output for the different versions? |
Run the oldest-deps build locally or install the package versions that have changed in the oldest-deps build. |
I've checked for the version of change in |
It would be better to understand what is causing the change and then decide if we need to change the minimum package version. |
Probably worth adding a changelog considering how many tests are here. |
I suppose, I shall dig a little deeper and try to find out.
Would trivial do? |
Works for me. |
After looking around, I've found that skimage's Ideally # version < 0.18.0, produces buggy output
poly = [(0, 0), (0, 1), (0, 2), (1, 2), (2, 2), (2, 0)]
mask = measure.grid_points_in_poly((3,3), poly)
print(mask)
[[ True True False]
[ True True False]
[False False False]]
# version >= 0.18.0
poly = [(0, 0), (0, 1), (0, 2), (1, 2), (2, 2), (2, 0)]
mask = measure.grid_points_in_poly((3,3), poly)
print(mask)
array([[ True, True, True],
[ True, True, True],
[ True, True, True]]) In the above example the points [(0,2), (1,2), (2,0), (2,1), (2,2)] all lie on the edge of the polygon but based on previous versions of This was buggy before and didn't return the right boolean array but it seemed to have been fixed in 0.18. |
Thanks for looking in to it. Change the version in setup.cfg and bump the version in tox.ini for the oldest deps. |
Will do. |
I think this will want a seperate changelog as well. |
(Core Tests py38 [linux]) seems to be failing, is it because of the change in setup or tox.ini files? |
Looks like some internet issues. |
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
@nabobalis I suppose all the tests are fine? |
Yeah the tests are fine. |
Would we want to add |
Up to you. |
I'll add them here itself. |
This should cover all the required tests for now. If all the tests pass, would this be good to merge? |
Thanks for the PR @jeffreypaul15 |
Description
Fixes #33
Tests have yet to be added.