Skip to content

GitHub Copilot agent configuration files added#123

Open
fpahlke wants to merge 14 commits into
mainfrom
dev/4.4.1
Open

GitHub Copilot agent configuration files added#123
fpahlke wants to merge 14 commits into
mainfrom
dev/4.4.1

Conversation

@fpahlke
Copy link
Copy Markdown
Member

@fpahlke fpahlke commented Jun 3, 2026

This pull request introduces new GitHub Copilot agent configuration files and instructions for the rpact package, updates package metadata, and applies several minor bugfixes and code quality improvements. The agent files clarify the roles and priorities for Copilot in different development contexts (general, bugfix, test coverage, GitHub-driven). The package metadata is updated for a new development version, and several small code and documentation corrections are made for clarity and correctness.

Copilot agent and instructions infrastructure:

  • Added four new agent configuration files in .github/agents/ for specialized Copilot behavior: general development (rpact_general.agent.md), bugfix/refactor (rpact_bugfix_refactor.agent.md), test coverage (rpact_testcoverage.agent.md), and GitHub-driven work (rpact_github.agent.md). Each provides detailed priorities, workflow, and output expectations for Copilot in that context. [1] [2] [3] [4]
  • Added .github/copilot-instructions.md with package-specific guidance for Copilot, covering statistical risk, R style, API stability, test, and documentation discipline.

Package metadata and documentation updates:

  • Updated DESCRIPTION for development version 4.4.0.9303 (date updated), and added Config/roxygen2/version: 7.3.3.9000. [1] [2]

Bugfixes and code quality improvements:

  • Fixed a bug in DatasetSurvival and DatasetEnrichmentSurvival classes by ensuring correct usage of helper functions and member variables for allocation ratios and variance events. [1] [2]
  • Corrected a comment to use self$.data instead of .data for clarity and future maintainability.
  • Minor documentation typo fix: "quasiquotation" → "quasi-quotation" in fetch function docs.

API and code consistency:

  • Improved consistency in method signatures for hasChanged in TrialDesignFisher and TrialDesignInverseNormal classes, and added missing parameters for completeness. [1] [2] [3]

fpahlke added 10 commits March 4, 2026 11:00
- Fixed spelling to "quasi-quotation" in R documentation
- Added many new terms to inst/WORDLIST for spell checking
- Sorted and deduplicated entries in inst/WORDLIST
- Improved coverage of technical and domain-specific vocabulary
- No functional code changes, documentation and wordlist only
- Prepares for improved documentation and code quality tools
docs

- Added efficacyStops and futilityStops to hasChanged methods
- Updated .getDesignGroupSequentialOrWithInterimStops to use new params
- Replaced -Inf with C_FUTILITY_BOUNDS_DEFAULT for futility bounds
- Improved parameter comparison logic for design changes
- Fixed typo: quasiquotation to quasi-quotation in documentation
- Bumped package version to 4.4.0.9302 in DESCRIPTION
sequential design

- Add .isBoundayStoppingActivated helper for boundary stop checks
- Warn if delayedInformation is ignored due to interim stops
- Use stricter argument validation for typeOfDesign and typeBetaSpending
- Change exception type for invalid typeOfDesign when stops are
specified
designPlan

- Bump package version to 4.4.0.9303 in DESCRIPTION
- Add simulationEnabled check to rejectPerStage assignment
- Store lambda1 and lambda2 in designPlan object
- Minor formatting adjustments for clarity
- No changes to external interfaces or function signatures
- Refactor function signatures for better readability in
f_core_assertions.R and f_design_group_sequential.R
- Update documentation links in man files to use the new syntax for
better compatibility
- Adjust output format handling in f_logger.R and related tests
- Update DESCRIPTION file to reflect the new roxygen2 version
- Update method calls to use 'self$' for accessing object properties
- Refactor assignment operator for overallVarianceEvent to use '<-'
instead of '<<-'
- Ensure validation method for varianceEvents uses the correct property
reference
Copilot AI review requested due to automatic review settings June 3, 2026 11:36
- Change email from daniel.sabanes_bove@rconis.com to
daniel.sabanes_bove@rpact.com
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds GitHub Copilot agent/instruction configuration for the rpact repository, bumps package development metadata, and includes a set of targeted bug fixes and maintenance improvements across design, simulation, output formatting, documentation, and tests.

Changes:

  • Added .github/copilot-instructions.md plus four specialized agent configs under .github/agents/ to guide Copilot behavior in different workflows.
  • Updated package metadata (DESCRIPTION, wordlist, generated Rd cross-links, vignette tweak) and improved output-format handling/tests.
  • Fixed/adjusted several internal behaviors (e.g., dataset survival members, group sequential interim-stops handling, logging toggle support, minor C++ suppressions).

Reviewed changes

Copilot reviewed 28 out of 45 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vignettes/rpact_getting_started.Rmd Adds VS Code to the “auto code completion” editor list in the getting started vignette.
tests/testthat/test-pkgname.R Adds regression/behavior tests for output format file I/O and rounding functions.
src/f_utilities.cpp Adds suppress comments on template instantiations in getOrder() switch cases.
R/parameter_descriptions.R Wraps/clarifies internal parameter description text for lambda1/lambda2.
R/f_simulation_multiarm_survival.R Adds internal roxygen docs for .getSimulationSurvivalMultiArmStageEvents() and minor doc formatting.
R/f_logger.R Adds logEnabled toggle to .logBase() to allow disabling logging.
R/f_design_plan_counts.R Persists lambda1/lambda2 back into the returned design plan object.
R/f_design_group_sequential.R Introduces interim-stop activation helper and improves handling/warnings for incompatible args when interim stops are used.
R/f_core_output_formats.R Fixes roundFunction string matching, accepts roundFunction in file-based option values, and corrects pluralization when writing formats.
R/f_core_assertions.R Formatting-only change to .assertAreValidFutilityBounds() signature layout.
R/class_summary.R Avoids using probsH1$rejectPerStage in a simulation-enabled branch.
R/class_design.R Makes hasChanged() signatures consistent and includes interim-stop parameters for inverse normal designs.
R/class_core_parameter_set.R Documentation typo fix (“quasiquotation” → “quasi-quotation”).
R/class_analysis_dataset.R Fixes member access (self$...) in survival dataset allocation ratio/variance validation and clarifies a commented placeholder.
man/setOutputFormat.Rd Improves \seealso linking style for getOutputFormat().
man/getTestActions.Rd Updates \seealso links to the explicit \link[=...] form.
man/getStageResults.Rd Updates \seealso links to the explicit \link[=...] form.
man/getSampleSizeSurvival.Rd Updates \seealso links to the explicit \link[=...] form.
man/getSampleSizeRates.Rd Updates \seealso links to the explicit \link[=...] form.
man/getSampleSizeMeans.Rd Updates \seealso links to the explicit \link[=...] form.
man/getSampleSizeCounts.Rd Updates \seealso links to the explicit \link[=...] form.
man/getRepeatedPValues.Rd Updates \seealso links to the explicit \link[=...] form.
man/getRepeatedConfidenceIntervals.Rd Updates \seealso links to the explicit \link[=...] form.
man/getPowerSurvival.Rd Updates \seealso links to the explicit \link[=...] form.
man/getPowerRates.Rd Updates \seealso links to the explicit \link[=...] form.
man/getPowerMeans.Rd Updates \seealso links to the explicit \link[=...] form.
man/getPowerCounts.Rd Updates \seealso links to the explicit \link[=...] form.
man/getPowerAndAverageSampleNumber.Rd Updates \seealso links to the explicit \link[=...] form.
man/getOutputFormat.Rd Improves \seealso linking style for setOutputFormat().
man/getGroupSequentialProbabilities.Rd Updates \seealso links to the explicit \link[=...] form.
man/getFinalPValue.Rd Updates \seealso links to the explicit \link[=...] form.
man/getFinalConfidenceInterval.Rd Updates \seealso links to the explicit \link[=...] form.
man/getDesignInverseNormal.Rd Updates \seealso links to the explicit \link[=...] form.
man/getDesignGroupSequential.Rd Updates \seealso links to the explicit \link[=...] form.
man/getDesignFisher.Rd Updates \seealso links to the explicit \link[=...] form.
man/getDesignConditionalDunnett.Rd Updates \seealso links to the explicit \link[=...] form.
man/getDesignCharacteristics.Rd Updates \seealso links to the explicit \link[=...] form.
man/getConditionalRejectionProbabilities.Rd Updates \seealso links to the explicit \link[=...] form.
man/getConditionalPower.Rd Updates \seealso links to the explicit \link[=...] form.
man/getClosedConditionalDunnettTestResults.Rd Updates \seealso links to the explicit \link[=...] form.
man/getClosedCombinationTestResults.Rd Updates \seealso links to the explicit \link[=...] form.
man/getAnalysisResults.Rd Updates \seealso links to the explicit \link[=...] form.
man/fetch.ParameterSet.Rd Documentation typo fix (“quasiquotation” → “quasi-quotation”).
inst/WORDLIST Expands/organizes spelling whitelist terms used by spell-check tooling.
DESCRIPTION Bumps dev version/date, removes RoxygenNote, and adds Config/roxygen2/version.
.github/copilot-instructions.md Adds repository-specific Copilot guidance for statistical risk, style, tests, and docs.
.github/agents/rpact_testcoverage.agent.md Adds a Copilot agent profile for improving test coverage (testthat/covr).
.github/agents/rpact_github.agent.md Adds a Copilot agent profile for GitHub issue/PR-driven workflow.
.github/agents/rpact_general.agent.md Adds a Copilot agent profile for general package development.
.github/agents/rpact_bugfix_refactor.agent.md Adds a Copilot agent profile for bugfixing and careful refactoring.
Files not reviewed (17)
  • man/fetch.ParameterSet.Rd: Language not supported
  • man/getAnalysisResults.Rd: Language not supported
  • man/getClosedCombinationTestResults.Rd: Language not supported
  • man/getClosedConditionalDunnettTestResults.Rd: Language not supported
  • man/getConditionalPower.Rd: Language not supported
  • man/getConditionalRejectionProbabilities.Rd: Language not supported
  • man/getDesignCharacteristics.Rd: Language not supported
  • man/getDesignConditionalDunnett.Rd: Language not supported
  • man/getDesignFisher.Rd: Language not supported
  • man/getDesignGroupSequential.Rd: Language not supported
  • man/getDesignInverseNormal.Rd: Language not supported
  • man/getFinalConfidenceInterval.Rd: Language not supported
  • man/getFinalPValue.Rd: Language not supported
  • man/getGroupSequentialProbabilities.Rd: Language not supported
  • man/getOutputFormat.Rd: Language not supported
  • man/getPowerAndAverageSampleNumber.Rd: Language not supported
  • man/getPowerCounts.Rd: Language not supported

Comment thread R/f_design_group_sequential.R Outdated
Comment on lines +1190 to +1196
.isBoundayStoppingActivated <- function(boundaryStops) {
if (anyNA(boundaryStops) || all(boundaryStops)) {
return(FALSE)
}

return(TRUE)
}
Comment thread R/f_design_group_sequential.R Outdated
newDesign <- do.call(.getDesignGroupSequential, args)
newDesign$criticalValues[which(!efficacyStops)] <- Inf
newDesign$futilityBounds[which(!futilityStops)] <- -Inf
newDesign$futilityBounds[which(!futilityStops)] <- C_FUTILITY_BOUNDS_DEFAULT # TODO check -Inf
Comment thread vignettes/rpact_getting_started.Rmd Outdated
Comment on lines +96 to +98
[RStudio](https://posit.co/downloads/) / [Positron](https://positron.posit.co/)
/ [Eclipse](https://www.eclipse.org): auto code completion makes it easy to use
/ [VS Code](https://code.visualstudio.com) /
[Eclipse](https://www.eclipse.org): auto code completion makes it easy to use
fpahlke added 3 commits June 3, 2026 14:24
- Bump version to 4.4.0.9304
- Update date to 2026-06-03
- Correct function name from .isBoundayStoppingActivated to
.isBoundaryStoppingActivated in f_design_group_sequential.R
- Adjust conditional checks to use the corrected function name
- Clean up formatting in rpact_getting_started.Rmd
- Add `TrialDesignFixed` class for fixed sample size trials.
- Implement `getDesignFixed` function to create fixed design objects.
- Update DESCRIPTION to require R version 4.1.0 or higher.
- Export `getDesignFixed` in NAMESPACE.
- Enhance internal validation functions for trial design checks.
- Modify `plot.TrialDesign` and `plot.TrialDesignSet` to allow NA as a
valid plot type
- Update validation to permit NA in `.assertIsValidPlotType`
- Introduce new function `.assertIsTrialDesignGroupSequentialOrFixed`
for design validation
- Add documentation for `TrialDesignFixed` and `getDesignFixed`
functions
- Ensure compatibility with existing design functions and improve error
handling
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.

2 participants