rs-station / reciprocalspaceship

Tools for exploring reciprocal space
https://rs-station.github.io/reciprocalspaceship/
MIT License
28 stars 12 forks source link

add support for generators to rs.concat #74

Closed kmdalton closed 3 years ago

kmdalton commented 3 years ago

rs.concat does not support generators whereas pd.concat does. The reason rs does not support them, is that the control flow that checks whether the arguments are isomorphous specifically indexes the first element in the passed sequence. This only works for subscriptable objects. Instead, implementing this control flow using itertools.tee allows us to bypass the requirement that the passed sequence be subscriptable.

codecov-commenter commented 3 years ago

Codecov Report

Merging #74 (d4c29ec) into main (bcda297) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #74   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files          39       39           
  Lines        1475     1477    +2     
=======================================
+ Hits         1459     1461    +2     
  Misses         16       16           
Flag Coverage Δ
unittests 98.91% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
reciprocalspaceship/concat.py 100.00% <100.00%> (ø)

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 bcda297...d4c29ec. Read the comment docs.