Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add error message for class "difftime" #232

Merged
merged 4 commits into from
Nov 8, 2024
Merged

Conversation

ayogasekaram
Copy link
Contributor

closes #215

Adding an error message for now for clarity - we can revisit supporting the "difftime" class type based on user requests.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

badge

Code Coverage Summary

Filename                 Stmts    Miss  Cover    Missing
---------------------  -------  ------  -------  ----------------------------------------
R/paginate_listing.R        29       0  100.00%
R/rlistings_methods.R      117      26  77.78%   18-29, 49, 65, 69, 155-158, 161, 245-251
R/rlistings.R              183      13  92.90%   180, 389-392, 396-399, 428-431
TOTAL                      329      39  88.15%

Diff against main

Filename         Stmts    Miss  Cover
-------------  -------  ------  -------
R/rlistings.R       +2       0  +0.08%
TOTAL               +2       0  +0.07%

Results for commit: 40a4723

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@ayogasekaram
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Unit Tests Summary

  1 files   5 suites   10s ⏱️
 40 tests 30 ✅ 10 💤 0 ❌
107 runs  92 ✅ 15 💤 0 ❌

Results for commit 40a4723.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
listings 👶 $+0.01$ appropriate_error_message_returned_for_difftime_class

Results for commit f07d627

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Melkiades Melkiades left a comment

Choose a reason for hiding this comment

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

Great fix! we should do the same for {rtables}. It happens from time to time. Just wondering if it would be better to check this before creating the listing (and table). What do you think? I am quite sure that the one in {rtables} should be in build_table because it is the first checks when you see the data.

@Melkiades
Copy link
Contributor

remember news file ;)

Copy link
Collaborator

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

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

lgtm! thanks @ayogasekaram

we can merge this once insightsengineering/scda.test#164 is green

Copy link

@BFalquet BFalquet left a comment

Choose a reason for hiding this comment

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

Same opinion as @Melkiades, I would put the assertion in as_listings so that it is clear the the error is due to the data, not subsequent modification of the listing. thank you.

@shajoezhu
Copy link
Collaborator

yes, assertion in as_listings from the start, printing is too downstream

Copy link
Collaborator

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

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

hi @ayogasekaram can you please update, use assertion, thanks!

@ayogasekaram
Copy link
Contributor Author

I've shifted the check to the as_listing function. I opted to not use the checkmate function because the error message seemed lengthy, but I can replace with this if required.
@shajoezhu
image

Copy link
Collaborator

@shajoezhu shajoezhu left a comment

Choose a reason for hiding this comment

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

lgtm! thanks @ayogasekaram

@ayogasekaram ayogasekaram merged commit 34c07f4 into main Nov 8, 2024
28 checks passed
@ayogasekaram ayogasekaram deleted the 215_error_msg@main branch November 8, 2024 17:22
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support additional data type
4 participants