AI Assistant Instructions for igvShiny
Source:AGENTS.md
This is an R package for Bioconductor. All code changes must adhere to Bioconductor standards.
Workflow & Standards
-
Documentation (Roxygen2): Use
roxygen2for all R documentation. When modifying.Rfiles in theR/directory (adding/changing functions or docs), you must rundevtools::document()to update theman/directory andNAMESPACEfile. Do not editNAMESPACEor.Rdfiles manually. -
Testing: This package uses the
testthatframework for testing. Tests are located intests/testthat/. Any new feature or bug fix must be accompanied by appropriate tests. Run tests viamake testordevtools::test()to verify changes. -
Continuous Integration / Checking: The preferred method for running comprehensive checks (R CMD check, tests, linters, etc.) is via
gDRstyle::checkPackage(). Ensure the package passes these checks before finalizing any commits. -
Dependencies: R dependencies are defined in the
DESCRIPTIONfile. If a new package is required, add it to the appropriate section (Imports:,Suggests:,Depends:). -
Front-end / JavaScript: As an
htmlwidgetspackage, the JavaScript code is typically located ininst/htmlwidgets/or a similarly configured directory. Ensure any JS modifications are properly synchronized with the R widget bindings. -
General Make Targets: The
makefileprovides useful targets:make roxy(document),make test(run testthat tests),make demo(run the shiny demo app), andmake all.
Automated review — what it does and does not catch
Pull requests are reviewed by CodeRabbit (.coderabbit.yaml, profile assertive). Treat it as editorial review: style, obvious logic slips, missing tests and docs. It reads the diff, so it cannot catch the class of bug that has actually hurt this package — the semantics of the bundled igv.js. Finding those means reading inst/htmlwidgets/lib/igv-*.js directly, and that path is filtered out of review on purpose (~8.7 MB of third-party code).
Two conventions exist for the bot’s benefit:
- PRs use
Related: #NNN, notFixes #NNN— see.github/pull_request_template.md. Auto-closing has hidden partly-finished work before (#36), but the reference still has to be there or CodeRabbit’s linked-issue checks silently skip. - Broken external assets are checked deterministically, not by an AI reviewer:
.github/workflows/asset-url-check.ymlruns.github/scripts/check-asset-urls.shweekly and files an issue when a genome, index or demo track URL stops resolving. Run the script by hand after touching any URL inR/,inst/demos/orinst/htmlwidgets/igvShiny.js.