Skip to content

Improve test coverage by adding comprehensive tests for utility functions and helpers#576

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-559
Draft

Improve test coverage by adding comprehensive tests for utility functions and helpers#576
Copilot wants to merge 4 commits intomainfrom
copilot/fix-559

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 22, 2025

Coverage Improvement Plan for easystats/report

Based on the issue comments, the package coverage has improved from 72.25% to 86.10%, but there's still room to push it towards 90%+. I've analyzed the current state and implemented significant coverage improvements.

Plan to increase coverage:

  • Analyze current test coverage and identify low-coverage files
  • Review existing tests to understand current coverage patterns
  • Examine specific functions in low-coverage files

Coverage improvements implemented:

  • Add tests for uncovered branches in utils_grouped_df.R (was 13.56%)

    • Added comprehensive tests for .group_indices(), .groups_drop(), .calculate_groups(), and error handling
    • Tests now cover factor handling, edge cases, and missing column scenarios
  • Improve coverage for format_model.R helper functions (was 46.15%)

    • Added tests for format_model.character() method with all model types
    • Enhanced tests for get_model_type_prefix() helper via format_model calls
    • Added edge case tests for different GLM families and link functions
  • Add tests for uncovered report_table.R methods (was 54.24%)

    • Comprehensive tests for as.report_table() with summary and as_is parameters
    • Tests for c.report_table() concatenation method
    • Enhanced coverage for .report_table_footer() and .report_table_caption() helpers
    • Added edge case tests for different alternative hypothesis formats
  • Enhance report_effectsize.R test coverage (was 68.97%)

    • New dedicated test file for report_effectsize helper functions
    • Complete tests for .text_effectsize() with all interpretation methods
    • Comprehensive tests for .text_standardize() with all standardization methods
    • Tests for as.report_effectsize() and print.report_effectsize()
  • Add enhanced coverage for report_s.R function (was 93.33%)

    • Added comprehensive edge case tests for parameter validation
    • Tests for p-value to s-value conversion and vice versa
    • Enhanced error handling validation for invalid inputs
    • Custom test parameter scenarios
  • Resolve merge conflicts with main branch

Test suite status:

  • All 620 tests pass with no failures
  • No regressions introduced

Fixes #559.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits September 22, 2025 03:09
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Copilot AI changed the title [WIP] [Task]: Increase project coverage Improve test coverage by adding comprehensive tests for utility functions and helpers Sep 22, 2025
Copilot AI requested a review from rempsyc September 22, 2025 03:15
@strengejacke
Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	DESCRIPTION

Co-authored-by: strengejacke <26301769+strengejacke@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 29, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflict in DESCRIPTION (version field: kept 0.6.3.1 from main) and completed the merge in commit 9759a742. All 620 tests pass with no failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Increase project coverage

3 participants