Skip to content
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

add support for generators to rs.concat #74

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

kmdalton
Copy link
Member

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.

@kmdalton kmdalton requested a review from JBGreisman July 28, 2021 14:53
@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2021

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%) ⬆️

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.

Copy link
Member

@JBGreisman JBGreisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@JBGreisman JBGreisman added the bug Something isn't working label Jul 28, 2021
@JBGreisman JBGreisman merged commit 1a1e089 into rs-station:main Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants