rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
274 stars 39 forks source link

allow selecting dimensions with predicates #618

Closed rafaqz closed 7 months ago

rafaqz commented 7 months ago

@meggart I couldn't resist its so little code

One question is should we put the function first so do blocks work, leave it last where the query normally goes in DD, or have both?

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5e68bd9) 86.67% compared to head (9123b83) 86.71%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #618 +/- ## ========================================== + Coverage 86.67% 86.71% +0.04% ========================================== Files 43 43 Lines 3617 3621 +4 ========================================== + Hits 3135 3140 +5 + Misses 482 481 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

meggart commented 7 months ago

Good question about changing the signature. I personally would probably leave the query in the end, to not create confusion. Would it be possible dispatch-wise to extend the signature to query::Callable instead of Function only? No big deal if it does not work for now and then I tend to build custom callable structs, especially for selector things.