Skip to content

Add test coverage for show() k parameter#459

Merged
tnixon merged 4 commits intomasterfrom
fix/show-k-test-coverage
Mar 3, 2026
Merged

Add test coverage for show() k parameter#459
tnixon merged 4 commits intomasterfrom
fix/show-k-test-coverage

Conversation

@R7L208
Copy link
Collaborator

@R7L208 R7L208 commented Mar 3, 2026

Summary

  • Adds test_show_k_2 test that calls show(n=20, k=2) on a TSDF with 4 rows per series (S1 and S2), verifying that only the 2 most recent rows per series are returned
  • Exercises the k parameter codepath in show() that was previously only tested for the error case (k > n)
  • Directly validates the behavior reported in tsdf.show() or display(tsdf) only displays the first 5 rows #326 — that k controls per-series row count, not a global row limit

Test plan

  • CI passes test_show_k_2 across all DBR environments
  • Existing test_show* tests remain green

Closes #326

🤖 Generated with Claude Code

Adds test_show_k_2 which calls show(n=20, k=2) on a TSDF with 4 rows
per series, verifying that only the 2 most recent rows per series are
returned. This exercises the k parameter path that was previously only
tested for the error case (k > n).

Closes #326

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The lint-and-check CI job fails because virtualenv 21.0.0 removed the
propose_interpreters API that hatch 1.14.2 relies on. Hatch 1.16.5
(pypa/hatch#2196) fixes this by switching to the python-discovery package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@R7L208 R7L208 requested review from tnixon March 3, 2026 01:15
R7L208 and others added 2 commits March 2, 2026 18:24
Hatch 1.16.5 requires Python >=3.10, breaking CI for DBR 11.3/12.2
(Python 3.9). Revert to hatch 1.14.2 and pin virtualenv<21 to avoid
the removed API in virtualenv 21.0.0 (matching PR #454).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test was failing in CI because the test_show_k_2 entry was missing
from tsdf_tests.json. Add the init data reference matching other
test_show_* tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.54%. Comparing base (8eb6da1) to head (db8e281).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #459   +/-   ##
=======================================
  Coverage   88.54%   88.54%           
=======================================
  Files           7        7           
  Lines        1039     1039           
  Branches      197      197           
=======================================
  Hits          920      920           
  Misses         75       75           
  Partials       44       44           

☔ 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.

Copy link
Collaborator

@tnixon tnixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see this test!

@tnixon tnixon merged commit 2738617 into master Mar 3, 2026
9 checks passed
@tnixon tnixon deleted the fix/show-k-test-coverage branch March 3, 2026 18:37
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.

tsdf.show() or display(tsdf) only displays the first 5 rows

2 participants