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

Use enum for row index column rather than None #1234

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Use enum for row index column rather than None #1234

merged 1 commit into from
Jun 15, 2023

Conversation

ianthomas23
Copy link
Member

Internally within Datashader we pass around column string names to identify which columns of the source (e.g. DataFrame) need to be passed to the low-level numba functions. Up until now we have used None to represent either no column, which would apply to an any() reduction, or a virtual row index column for reductions like where. The multiple use of None for both is confusing, so this PR introduces a new Enum for RowIndex so that it is easy to identify this being different from None representing no column required.

External API is not changed.

@ianthomas23 ianthomas23 added this to the v0.15.1 milestone Jun 13, 2023
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #1234 (7d05e61) into main (3317542) will decrease coverage by 0.04%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #1234      +/-   ##
==========================================
- Coverage   83.56%   83.52%   -0.04%     
==========================================
  Files          35       35              
  Lines        8773     8777       +4     
==========================================
  Hits         7331     7331              
- Misses       1442     1446       +4     
Impacted Files Coverage Δ
datashader/reductions.py 78.63% <73.33%> (-0.24%) ⬇️
datashader/core.py 88.28% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ianthomas23 ianthomas23 merged commit 9f5b411 into holoviz:main Jun 15, 2023
@ianthomas23 ianthomas23 deleted the row_index_enum branch June 15, 2023 15:11
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.

1 participant