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

Closes #393 Extra header line removed #440

Merged
merged 8 commits into from
Apr 27, 2024
Merged

Conversation

ddsjoberg
Copy link
Collaborator

@ddsjoberg ddsjoberg commented Apr 17, 2024

This turns out to just be an extra line added by accident. The checks for # assert_integer_scalar ---- appear above this chunk.

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the main branch until you have checked off each task.

  • Place Closes Bug: Incorrect assert_integer_scalar() test #393 into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • Update NEWS.md under the header # admiral (development version) if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
  • Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Address or fix all lintr warnings and errors - lintr::lint_package()
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

Copy link

github-actions bot commented Apr 17, 2024

Code Coverage

Package Line Rate Health
admiraldev 95%
Summary 95% (1099 / 1153)

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

Something seems amiss here?

@ddsjoberg
Copy link
Collaborator Author

Something seems amiss here?

There were two sections for # assert_integer_scalar ----. Just deleting the second one that was out of place. Is there something else amiss @bms63 ?

@@ -687,7 +687,6 @@ test_that("assert_numeric_vector Test 39: no error if `arg` is NULL and optional
)
})

# assert_integer_scalar ----
## Test 40: error if `arg` is not an integer scalar ----
test_that("assert_integer_scalar Test 40: error if `arg` is not an integer scalar", {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems inccorrect - the integer and numeric stuff

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, yes, the text needed to updated too
image

Copy link
Collaborator

@bundfussr bundfussr left a comment

Choose a reason for hiding this comment

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

I think there are more issues. For example assert_character_scalar() is tested in tests 10 and 11 and 17-19. Similar for assert_data_frame(). Could we clean this up?

And there are some expect_error() calls which accept any error, e.g.,

expect_error(example_fun2(2))

in test 10. I think we should always specify the class argument for expect_error().

@ddsjoberg
Copy link
Collaborator Author

@bundfussr do you want to add those cleanups in this PR or another? If this PR, please feel free to push the updates here.

@bundfussr
Copy link
Collaborator

@bundfussr do you want to add those cleanups in this PR or another? If this PR, please feel free to push the updates here.

I can add them to this PR.

@bundfussr
Copy link
Collaborator

@bms63 , @ddsjoberg , I have cleaned up test-assertions.R. Now there shouldn't be more than one section per function and all expect_error() calls should use the class argument.

Could you double-check that I didn't miss anything or mess up something?

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

Thanks all!!

@bms63
Copy link
Collaborator

bms63 commented Apr 19, 2024

@ddsjoberg wasn't there a tracking issue for all the error messaging updates? I can't seem to find it

@ddsjoberg
Copy link
Collaborator Author

@ddsjoberg wasn't there a tracking issue for all the error messaging updates? I can't seem to find it

@bms63
There wasn't a master issue for all the updates. It was just a single issue listing the first round updates (#367)

@ddsjoberg ddsjoberg merged commit 52f1f5e into main Apr 27, 2024
17 checks passed
@ddsjoberg ddsjoberg deleted the 393-assert_int_sclr-uat branch April 27, 2024 18:32
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.

Bug: Incorrect assert_integer_scalar() test
3 participants