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

[python] Consolidate all _set_coords methods into single _util function #3292

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

nguyenv
Copy link
Member

@nguyenv nguyenv commented Nov 4, 2024

Issue and/or context:

As part of work for #3053.

Changes:

This is clean-up work.

This takes the separate implementations of _set_coords from _dataframe, _sparse_nd_array, _spatial_dataframe, and _soma_array into a single _util._set_coords. _cast_domainish was also moved out of SOMAArrayWrapper and into _util to support casting of domains and NEDs in _set_coord.

Note for reviewers:

I am unsure if _util.py is the appropriate place for this.

@nguyenv nguyenv changed the title [python] Consolidate _set_coords into single function [python] Consolidate all _set_coords methods into single function Nov 4, 2024
@nguyenv nguyenv changed the title [python] Consolidate all _set_coords methods into single function [python] Consolidate all _set_coords methods into single _util function Nov 4, 2024
Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 6 lines in your changes missing coverage. Please review.

Project coverage is 85.40%. Comparing base (a515eb7) to head (f464dfe).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3292      +/-   ##
==========================================
+ Coverage   84.62%   85.40%   +0.78%     
==========================================
  Files          52       52              
  Lines        5633     5517     -116     
==========================================
- Hits         4767     4712      -55     
+ Misses        866      805      -61     
Flag Coverage Δ
python 85.40% <94.73%> (+0.78%) ⬆️

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

Components Coverage Δ
python_api 85.40% <94.73%> (+0.78%) ⬆️
libtiledbsoma ∅ <ø> (∅)

@nguyenv nguyenv requested review from johnkerl and jp-dark November 4, 2024 21:23
Copy link
Member

@johnkerl johnkerl left a comment

Choose a reason for hiding this comment

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

This is beautiful ... thank you!!

apis/python/src/tiledbsoma/_dataframe.py Show resolved Hide resolved
@johnkerl
Copy link
Member

johnkerl commented Nov 4, 2024

I am unsure if _util.py is the appropriate place for this.

@nguyenv I think this is fine :)

@nguyenv nguyenv merged commit 762abda into main Nov 4, 2024
9 checks passed
@nguyenv nguyenv deleted the viviannguyen/consolidate-coord-setting branch November 4, 2024 22:50
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.

2 participants