Skip to content

Add preceding point and iterable filters#382

Draft
Tom Holland (tomjholland) wants to merge 4 commits into
mainfrom
add-preceding-point-and-iterable-filters
Draft

Add preceding point and iterable filters#382
Tom Holland (tomjholland) wants to merge 4 commits into
mainfrom
add-preceding-point-and-iterable-filters

Conversation

@tomjholland

Copy link
Copy Markdown
Collaborator

No description provided.

…ring

- Introduce _Filter class encapsulating group-filtering logic for a
  single column and optional row condition, with singular() and
  plural() methods for one-shot and iterative use respectively
- Add include_preceding_point flag to include the row immediately
  before each contiguous block of selected rows
- Replace _filter_numerical with composable mask primitives:
  _RankExprs, _span_mask, _point_mask, _combined_mask, and
  _nonbounded_slice_mask for full slice semantics (negative indices,
  open-ended bounds, step > 1)
- Add _group_start_expr to correctly compute dense ranks under an
  arbitrary row condition without materialising an intermediate frame
- plural() uses a zero-collect static path for bounded index types;
  falls back to a single collect for open-ended slices and None
- Expand test suite to cover all new index forms and filter types
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented May 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.86130% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.89%. Comparing base (3e7a099) to head (a5841be).

Files with missing lines Patch % Lines
pyprobe/filters.py 99.53% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #382      +/-   ##
==========================================
+ Coverage   95.42%   95.89%   +0.47%     
==========================================
  Files          58       58              
  Lines        5003     5535     +532     
==========================================
+ Hits         4774     5308     +534     
+ Misses        229      227       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Allow retrieval of preceding row

2 participants