Skip to content

58 fixing metric coerce - #59

Open
shajoezhu wants to merge 3 commits into
mainfrom
58_fixing_metric_coerce
Open

shajoezhu wants to merge 3 commits into
mainfrom
58_fixing_metric_coerce

Conversation

@shajoezhu

@shajoezhu shajoezhu commented Sep 11, 2026 •

Copy link
Copy Markdown

close #58

@shajoezhu
shajoezhu requested a review from dgkf September 11, 2026 05:38
@codecov-commenter

codecov-commenter commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.27%. Comparing base (c4d4e59) to head (d1ec704).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   31.31%   39.27%   +7.95%     
==========================================
  Files          36       36              
  Lines        1587     1604      +17     
==========================================
+ Hits          497      630     +133     
+ Misses       1090      974     -116     

☔ View full report in Codecov by Harness.
📢 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.

@llrs-roche llrs-roche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice solution, just one comment.

I like the second test where it uses a repo to really test that it works in practice. Thanks!

test_that("metric_coerce coerces character metrics to each atomic type", {
ms <- metrics()

# integer metric

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The expectations don't explicitly state the class expected. I think it would be better if it used expect_type()

This branch has not been deployed

No deployments
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.

metric_coerce() only handles integer metrics; logical and double coercion fail

3 participants