Skip to content

fix(cohort): #20 follow-ups + clear mypy errors - #22

Merged
timtreis merged 1 commit into
mainfrom
fix/cohort-followups
Oct 18, 2026
Merged

timtreis merged 1 commit into
mainfrom
fix/cohort-followups

Conversation

@timtreis

Copy link
Copy Markdown
Member

Follow-ups listed as non-blocking in #20, plus the four pre-existing mypy errors.

Cohort

  • SpatialDataCohort.__or__ / __sub__ return NotImplemented for non-cohort operands → TypeError instead of AttributeError.
  • Slicing, filter() and where() on a split fold keep .split_manifest (__getitem__ now goes through _derive). A union keeps the manifest only when both operands share the same split; otherwise it is None.
  • Download fallback warning uses stacklevel=3 so it points at the user's cohort.download(...) call.

Typing: mypy src is now clean (_is_null annotation, Catalog.cohort narrowing, MCP facets dict typed dict[str, Any]).

Tests: 289 passed, 4 skipped; new tests cover each fix (all failed before the change).

- `|` / `-` return NotImplemented for non-cohort operands (TypeError, not AttributeError)
- slicing/filter/where of a split fold keep `.split_manifest`; a union keeps it
  only when both sides share the same split
- download fallback warning uses stacklevel=3 so it points at the caller
- mypy: annotate `_is_null`, narrow `want` in `Catalog.cohort`, type MCP facets dict
@timtreis
timtreis merged commit 64fadf0 into main Oct 18, 2026
3 checks passed
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.05%. Comparing base (00991ab) to head (7f701d3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
+ Coverage   92.00%   92.05%   +0.05%     
==========================================
  Files          18       18              
  Lines        1450     1460      +10     
==========================================
+ Hits         1334     1344      +10     
  Misses        116      116              

☔ View full report in Codecov by Harness.
📢 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.

1 participant