Skip to content

feat(pragmastat): add compare1 and compare2 options#3591

Merged
jqnatividad merged 3 commits intomasterfrom
pragmastat-compare1-compare2
Mar 8, 2026
Merged

feat(pragmastat): add compare1 and compare2 options#3591
jqnatividad merged 3 commits intomasterfrom
pragmastat-compare1-compare2

Conversation

@jqnatividad
Copy link
Collaborator

No description provided.

jqnatividad and others added 2 commits March 8, 2026 14:34
…ysis

Leverage pragmastat v12.0.0's compare module to test one-sample (center/spread)
and two-sample (shift/ratio/disparity) estimates against user-defined thresholds,
producing a verdict of less/greater/inconclusive per metric.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…clusivity tests

Extract fallback closures in compute_compare1 and compute_compare2 to eliminate
repeated struct construction across error/empty paths. Add test cases for
--compare1 + --compare2 and --compare2 + --twosample mutual exclusivity.

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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new confirmatory-analysis modes to qsv pragmastat to compare one-sample or two-sample estimates against user-specified thresholds, including updated CLI help text and an expanded test suite.

Changes:

  • Introduces --compare1 (center/spread) and --compare2 (shift/ratio/disparity) CLI options with threshold parsing and CSV outputs.
  • Implements compare1/compare2 computation + writers alongside existing one-sample/two-sample paths.
  • Adds comprehensive integration tests covering basic behavior, selection, non-numeric inputs, error cases, and mutual exclusivity.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/cmd/pragmastat.rs Adds CLI flags, mutual-exclusion validation, threshold parsing, and compare1/compare2 compute + output paths.
tests/test_pragmastat.rs Adds end-to-end tests for the new compare1/compare2 modes and their error handling.

Trim metric/value after colon split, reject NaN/Inf thresholds,
and add many-pairs warning to compare2 matching twosample behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jqnatividad jqnatividad merged commit 865aeb4 into master Mar 8, 2026
15 checks passed
@jqnatividad jqnatividad deleted the pragmastat-compare1-compare2 branch March 8, 2026 18:59
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.

2 participants