Skip to content

Add unit tests for ResultsTable construction and shape#50

Merged
jc-macdonald merged 1 commit intomainfrom
test/issue-4-results-table
Apr 9, 2026
Merged

Add unit tests for ResultsTable construction and shape#50
jc-macdonald merged 1 commit intomainfrom
test/issue-4-results-table

Conversation

@jc-macdonald
Copy link
Copy Markdown
Contributor

Summary

Unit tests for ResultsTable construction, shape validation, and edge cases.

Closes #4

Changes

  • Scores shape: (n_trials, n_observables) matches configs and observable_names
  • Annotations shape: (n_trials, n_annotations) matches configs and annotation_names
  • Annotations default: None when omitted, annotation_names defaults to []
  • Metadata default: empty list when omitted
  • Metadata alignment: len(metadata) == len(configs)
  • Single trial: all arrays work with 1 config
  • Empty results: 0 configs with (0, k) score array
  • Observable names order: preserved as given

Stats

  • 8 new tests (43 total)
  • Coverage: 64.60% → 67.30%
  • just ci passes (format, lint, mypy strict, coverage)

Test scores shape matches (n_trials, n_observables), annotations shape
and default-None, metadata alignment and default-empty, single-trial
and empty-results edge cases, and observable name ordering.

Closes #4
@jc-macdonald jc-macdonald merged commit f9c19b2 into main Apr 9, 2026
3 checks passed
@jc-macdonald jc-macdonald deleted the test/issue-4-results-table branch April 9, 2026 19:38
@jc-macdonald jc-macdonald added test Test coverage improvement protocols protocols.py module labels Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protocols protocols.py module test Test coverage improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit tests for ResultsTable construction and shape validation

1 participant