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

Set object table index for from_dask_dataframe #231

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Conversation

wilsonbb
Copy link
Collaborator

@wilsonbb wilsonbb commented Sep 14, 2023

In the loader method from_dask_dataframe, we were mistakenly not updating the object table's index in the case where the object table is supplied as an argument rather than generated from the source table.

Unit tests are updated based on the identifying issue #230 validating the case where the object table isn't generated and that analysis functions can be called on the generated ensemble.

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (897a5cf) 92.57% compared to head (15cdf60) 92.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #231   +/-   ##
=======================================
  Coverage   92.57%   92.57%           
=======================================
  Files          22       22           
  Lines        1132     1132           
=======================================
  Hits         1048     1048           
  Misses         84       84           
Files Changed Coverage Δ
src/tape/ensemble.py 89.46% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wilsonbb wilsonbb linked an issue Sep 14, 2023 that may be closed by this pull request
@wilsonbb wilsonbb marked this pull request as ready for review September 14, 2023 20:00
@wilsonbb wilsonbb requested review from hombit and dougbrn September 14, 2023 20:00
Copy link
Contributor

@hombit hombit left a comment

Choose a reason for hiding this comment

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

Looks great! The only minor issue is a warning in the case of pre-existing index

dask/dataframe/core.py:5251: UserWarning: New index has same name as existing, this is a no-op.
  warnings.warn(

Copy link
Collaborator

@dougbrn dougbrn 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!

@wilsonbb
Copy link
Collaborator Author

Looks great! The only minor issue is a warning in the case of pre-existing index

dask/dataframe/core.py:5251: UserWarning: New index has same name as existing, this is a no-op.
  warnings.warn(

Considering this some more, I've decided to open an issue to clarify documentation or provide a parameter to allow users to force the indices to be overridden: #232

However I will go ahead and submit this PR as is while I think about the interface a bit more.

Thanks for the reviews!

@wilsonbb wilsonbb closed this Sep 14, 2023
@wilsonbb wilsonbb reopened this Sep 14, 2023
@wilsonbb wilsonbb merged commit 9688d12 into main Sep 14, 2023
16 checks passed
@dougbrn dougbrn deleted the fix_object_index branch April 4, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensemble.from_dask_dataframe set the index wrongly
3 participants