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

Finalise how covtracer is represented in v1.0 of the gh-action #35

Open
epijim opened this issue Oct 20, 2021 · 2 comments
Open

Finalise how covtracer is represented in v1.0 of the gh-action #35

epijim opened this issue Oct 20, 2021 · 2 comments
Assignees

Comments

@epijim
Copy link
Contributor

epijim commented Oct 20, 2021

From issue #8

The covtracer output here is pretty generic. We can do some filtering if we want to present other information. By default, NAs are included for documented objects that are untested. As well, there may be situations where the test_name is unknown, but there is still testing code that prompts package execution (often this is test setup code, outside of any test_that() call).

In the covtracer README, I include these columns just to illustrate the missingness of code coverage. In a report, I would choose other, more meaningful columns - I would drop test_name and count, and instead filter out unexported documentation (filter(is_exported = TRUE)) to only show untested, exported functions as those are a better indicator of the user contract of a package. Just for the sake of clarity, it might be nice to have a clean "No untested behavior" if the resulting table has no records instead of just showing an empty table.

Originally posted by @dgkf-roche in #8 (comment)

@epijim
Copy link
Contributor Author

epijim commented Oct 20, 2021

Changes made to the template starting here: https://github.com/insightsengineering/thevalidatoR/blob/main/template.Rmd#L166

And a built example here: https://github.com/epijim/admiral/releases/tag/v0.3.0-example

@dgkf-roche next step (to knock out before week end) would be to confirm with you these three tables provide a sufficient summary of relevant information from covtracer (at which point I think we are good to move this into prod).

@dgkf-roche
Copy link
Collaborator

dgkf-roche commented Oct 21, 2021

Some updates that I think would help to clean this up:

table 4

  • rename "test_name" to "Test Description"
  • rename "file" to "Documentation"
  • Having the documentation files given as "example.Rd" might be a bit unclear. Would it be better to add a prefix of file.path(params$pkg_dir, "man", file) (such that the displayed path would be "man/example.Rd", which might be more clear to a reviewer).

table 5

  • rename "alias" to, for example "Exported Package Object"
  • rename "file" to "Documentation"
  • filter unique rows

table 6

  • rename "alias" to, for example "Exported Package Object"
  • rename "any_direct_test", to "Tested Directly"
  • include "is_exported" column
  • filter for only exported objects (up for debate - communicates a slightly different meaning)

This was referenced Oct 22, 2021
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

No branches or pull requests

2 participants