SunSpecOrangeButton / pyoblib

Orange Button Python Library
Apache License 2.0
14 stars 19 forks source link

Combine is_unit and is_unit2 #98

Closed cwhanse closed 5 years ago

cwhanse commented 5 years ago

Proposed behavior of combined is_unit is to return True if the input string corresponds to an id, unit_id or unit_name in the taxonomy. Changes are not propagated into data_model.set. @jonoxia

Closes #89

codecov-io commented 5 years ago

Codecov Report

Merging #98 into master will increase coverage by 0.09%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   86.78%   86.87%   +0.09%     
==========================================
  Files          23       23              
  Lines        2232     2255      +23     
==========================================
+ Hits         1937     1959      +22     
- Misses        295      296       +1
Impacted Files Coverage Δ
oblib/taxonomy_units.py 95.6% <100%> (+0.66%) :arrow_up:
oblib/data_model.py 78.55% <100%> (-0.15%) :arrow_down:
oblib/tests/test_taxonomy_units.py 100% <100%> (ø) :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 30e0c01...02ef46b. Read the comment docs.

cwhanse commented 5 years ago

This PR is ready for review. I was not able to factor out data_model._is_valid_unit so I'm opening a new issue for that.