xarray-contrib / xarray-schema

Schema validation for Xarray objects
https://xarray-schema.readthedocs.io/en/latest/index.html
MIT License
39 stars 8 forks source link

Fix/ignore typing errors and add mypy to ci #38

Closed paiforsyth closed 2 years ago

paiforsyth commented 2 years ago

Thanks for this package! It looks like it could very useful!

I thought I would contribute by adding type checking.

I tried to add a mypy pre-commit hook, but this caused pre-commit CI to fail. I think this may be because the pre-commit CI is not able to install the correct requirements.

codecov[bot] commented 2 years ago

Codecov Report

Merging #38 (c553065) into main (2c56d6a) will increase coverage by 1.99%. The diff coverage is 96.96%.

@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   91.74%   93.73%   +1.99%     
==========================================
  Files           6        6              
  Lines         339      351      +12     
==========================================
+ Hits          311      329      +18     
+ Misses         28       22       -6     
Impacted Files Coverage Δ
xarray_schema/dataarray.py 86.84% <94.44%> (+0.08%) :arrow_up:
xarray_schema/components.py 98.55% <100.00%> (+3.69%) :arrow_up:
xarray_schema/dataset.py 100.00% <100.00%> (+3.44%) :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 2c56d6a...c553065. Read the comment docs.

jhamman commented 2 years ago

closing and reopening to re-trigger codecov

paiforsyth commented 2 years ago

I had to mark tasks.py as ignored by coverage to pass the coverage check

jhamman commented 2 years ago

Thanks @paiforsyth. I'm going to merge this now. Cheers!