holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.3k stars 365 forks source link

Reduction append functions return index not boolean #1180

Closed ianthomas23 closed 1 year ago

ianthomas23 commented 1 year ago

Recently the various Reduction._append functions were changed to return a boolean to indicate if they have performed any modification to their agg. This was to support the new where reductions that need to know if their selector reduction has modified anything so that they can propagate this to their own agg containing e.g. row index. Boolean was fine for that, but with the plan to introduce new 3D aggs such as max_n then a boolean is not sufficient as it needs to be the index of change in the final dimension.

This PR just changes the return from a boolean to an integer index, to confirm that it does not break anything in CI. True is changed to 0, meaning index of 0 in the 3rd agg dimension, and False to -1 meaning no change has occurred.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1180 (4d6e06c) into main (d8167b4) will not change coverage. The diff coverage is 67.69%.

@@           Coverage Diff           @@
##             main    #1180   +/-   ##
=======================================
  Coverage   85.38%   85.38%           
=======================================
  Files          35       35           
  Lines        8011     8011           
=======================================
  Hits         6840     6840           
  Misses       1171     1171           
Impacted Files Coverage Δ
datashader/reductions.py 85.99% <67.18%> (ø)
datashader/compiler.py 95.62% <100.00%> (ø)

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

ianthomas23 commented 1 year ago

Merging as this passes CI (except for the usual codecov not dealing with CUDA code) and I need it to build on top of.