To utilize qcthat, you must
- Use GitHub Issues to document package requirements (see Chapter
20: Software development practices from R Packages (2e) by
Hadley Wickham and Jennifer Bryan and
usethis::use_github()). - Use testthat to verify the implementation of those
requirements (see the Testing section of R
Packages (2e) by Hadley Wickham and Jennifer Bryan and
usethis::use_testthat()). - Link tests to issues by including
(#{issue_number})in the test description, such as:
test_that("Users can view a matrix of GitHub issues and test results (#31)", {
# Expectations that prove that this worked.
})Activating {qcthat}
qcthat::use_qcthat()Run use_qcthat() from within your package directory
to:
- Create GitHub labels (
SetupGHLabels()) with the default labels that qcthat uses to assist in reporting: qcthat-nocov, qcthat-uat. - Install a GitHub Action (
Action_qcthat()) that will automatically generate QC reports and user acceptance reports on pull requests and releases. You can customize the behavior of this action by modifying the YAML file in.github/workflows/qcthat.yaml.
Bootstrapping test tags with AI
qcthat::Skill_TagTestsWithIssues()Run Skill_TagTestsWithIssues() to install an
experimental SKILL.md file to help you use AI to tag your
tests with GitHub issue numbers. Tell your agent to use the skill with
“tag tests” with issues” (or by pointing to the installed skill file,
depending on your setup). Read more about AI agent skills at agentskills.io. Note: This might
use a lot of tokens, depending on the number of tests and
issues that you have in your repository.
As part of the tagging process, your agent will generate a log of its
reasoning in pkgdown/assets/test_tag_reasons.qmd, rendered
to html as pkgdown/assets/test_tag_reasons.html. If you use
pkgdown, you can view this file at “test_tag_reasons.html” (relative to
your site, locally or deployed).
Review all tags generated by the agent carefully.
After you produce this initial set of tags, we recommend deleting the
SKILL.md file and the test_tag_reasons files.
They are only intended to get you started.