Add test coverage for show() k parameter#459
Merged
Conversation
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>
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_show_k_2test that callsshow(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 returnedkparameter codepath inshow()that was previously only tested for the error case (k > n)kcontrols per-series row count, not a global row limitTest plan
test_show_k_2across all DBR environmentstest_show*tests remain greenCloses #326
🤖 Generated with Claude Code