Skip to content

Closes #106: improve test coverage#107

Merged
jwang-lilly merged 11 commits intomainfrom
106-improve-test-covergae
Feb 4, 2026
Merged

Closes #106: improve test coverage#107
jwang-lilly merged 11 commits intomainfrom
106-improve-test-covergae

Conversation

@khatril
Copy link
Copy Markdown
Contributor

@khatril khatril commented Nov 19, 2025

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 family 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 #<insert_issue_number> 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<ext> (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 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!

@khatril khatril linked an issue Nov 19, 2025 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 19, 2025

Code Coverage

Package Line Rate Health
admiralneuro 100%
Summary 100% (64 / 64)

Copy link
Copy Markdown
Contributor

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

Seems to be a DRAFT PR, is it correct?
Initial comments that can already be implemented.

@manciniedoardo manciniedoardo changed the title 106 improve test covergae 106 improve test coverage Dec 8, 2025
@manciniedoardo manciniedoardo changed the title 106 improve test coverage Closes #106: improve test coverage Dec 8, 2025
khatril and others added 3 commits December 9, 2025 15:46
Co-authored-by: Fanny Gautier <157114584+Fanny-Gautier@users.noreply.github.com>
@khatril
Copy link
Copy Markdown
Contributor Author

khatril commented Dec 9, 2025

@Fanny-Gautier Ready for your review again. Thanks!

NEWS.md Outdated

## Updates of Existing Functions

- Improved test coverage in `compute_centiloid()` function when invalid tracer combination is provided. (#106)
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.

Suggested change
- Improved test coverage in `compute_centiloid()` function when invalid tracer combination is provided. (#106)
- Improved test coverage in `compute_centiloid()` function when invalid tracer combination is provided. (#106)

Copy link
Copy Markdown
Contributor

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

Can we also add some tests for zero, missing and negative SUVR values?

NEWS.md Outdated
@@ -1,5 +1,8 @@
# admiralneuro (development version)

## Updates of Existing Functions
Copy link
Copy Markdown
Contributor

@Lina2689 Lina2689 Jan 9, 2026

Choose a reason for hiding this comment

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

remove the extra whitespace (## Updates... to ## Updates...) for consistency.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Lina2689, could you please resolve all issues and complete/approve the review?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Lina2689, Could you please implement the suggested addition to Fanny: test for zero and negative SUVR? SUVR should always be >0.

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.

@jwang-lilly, was I tagged by mistake? Leena Khatri is working on this PR, and I’ve already shared my review comments.

Copy link
Copy Markdown
Collaborator

@jwang-lilly jwang-lilly Jan 27, 2026

Choose a reason for hiding this comment

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

@khatril, Could you please implement the suggested addition by Fanny: test for zero and negative SUVR? SUVR should always be >0.

@khatril
Copy link
Copy Markdown
Contributor Author

khatril commented Jan 29, 2026

Can we also add some tests for zero, missing and negative SUVR values?

@Fanny-Gautier @jwang-lilly In addition to test, there needs to be a validation check on a positive numeric value for SUVR therefore I have also updated the compute_centiloid function to include a cli abort message.

@jwang-lilly
Copy link
Copy Markdown
Collaborator

@manciniedoardo, any insight on the failing checks?

@manciniedoardo
Copy link
Copy Markdown
Collaborator

manciniedoardo commented Feb 3, 2026

@jwang-lilly @khatril I fixed the tests - you had introduced a bug in compute_centiloid() because the check for suvr =< 0 was not vectorised. See here for the relevant updates. Given you've updated how the function works, you should also document that in NEWS.md, which I've now done too.

Sidenote: while checking what was wrong I noticed you have an undocumented lookup table in the package which is saved in the wrong location (R folder rather than data folder). CRAN won't allow this - I have created an issue, #122 for you to fix this.

Update: I was mistaken, there is no need to document the lookup table as it's meant to be internal - thanks @jwang-lilly for the correction.

Copy link
Copy Markdown
Contributor

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

Very minor comments to implement in NEWS.mdand it looks ready to go! Thank you for the addition!

jwang-lilly and others added 2 commits February 3, 2026 16:58
Co-authored-by: Fanny Gautier <157114584+Fanny-Gautier@users.noreply.github.com>
Co-authored-by: Fanny Gautier <157114584+Fanny-Gautier@users.noreply.github.com>
@jwang-lilly
Copy link
Copy Markdown
Collaborator

@manciniedoardo
image

@manciniedoardo
Copy link
Copy Markdown
Collaborator

@manciniedoardo image

@jwang-lilly I think it just errored as it was trying to install admiral 1.4.0 from CRAN but CRAN was in the process of uploading admiral 1.4.1. I reran the job and it's fine now.

@jwang-lilly jwang-lilly merged commit b80c423 into main Feb 4, 2026
58 of 61 checks passed
@jwang-lilly jwang-lilly deleted the 106-improve-test-covergae branch February 4, 2026 14:40
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.

General Issue: Improve test coverage for {admiralneuro}

5 participants