Closed Badboy-16 closed 3 years ago
Merging #54 (5d7bfd7) into master (e95d96a) will increase coverage by
0.05%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 95.74% 95.79% +0.05%
==========================================
Files 3 3
Lines 235 238 +3
Branches 67 69 +2
==========================================
+ Hits 225 228 +3
Misses 7 7
Partials 3 3
Impacted Files | Coverage Ξ | |
---|---|---|
xhistogram/xarray.py | 91.52% <100.00%> (+0.45%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update e95d96a...5d7bfd7. Read the comment docs.
Also, it looks as though your additions are failing the pre-commit test. You can run the tests locally to work out the issues by following the instructions here. Let me know if you have any difficulties.
Thanks @dougiesquire I pushed a new commit regarding the above comments after the pre-commit test is successful locally. Please let me know if there are additional issues :)
Great, pre-commit is passing now π. To keep the test coverage high, you could also add a test to xhistogram.tesy.test_xarray.py that checks your input test (sorry, I should have mentioned this sooner). Something like:
def test_input_type_check():
with pytest.raises(TypeError):
# Try pass a numpy array to xhistogram
It's ok. I just added a test in the latest commit. π
Great - all checks passing now, so I'll merge. Thanks for your contribution @Badboy-16!
I had a go to fix #14
In the
histogram()
(xhist()
) function, I added some code to check if the object passed to the function is an instance of xarray.DataArray, and if not, throw aTypeError
.