Skip to content

Add default error branch to getParamCCP() for unknown dataset keys#82

Merged
phoman14 merged 3 commits intoNewFun_CompareCelPopfrom
copilot/sub-pr-80-again
Mar 18, 2026
Merged

Add default error branch to getParamCCP() for unknown dataset keys#82
phoman14 merged 3 commits intoNewFun_CompareCelPopfrom
copilot/sub-pr-80-again

Conversation

Copy link

Copilot AI commented Mar 18, 2026

getParamCCP() had no fallback for unrecognized data values, leaving object and column variables undefined and producing confusing downstream errors.

Changes

  • tests/testthat/helper-Compare_Cell_Populations.R: Added an else branch that stop()s immediately with a clear message enumerating the supported dataset keys:
} else {
  stop(paste0(
    "Unknown dataset '", data, "'. ",
    "Supported datasets are: TEC, Chariou, PBMC, NSCLC, BRCA."
  ))
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: phoman14 <21298645+phoman14@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on "New fun compare cel pop" PR Add default error branch to getParamCCP() for unknown dataset keys Mar 18, 2026
Copilot AI requested a review from phoman14 March 18, 2026 01:05
@phoman14 phoman14 marked this pull request as ready for review March 18, 2026 01:19
@phoman14 phoman14 merged commit 5f1bc23 into NewFun_CompareCelPop Mar 18, 2026
@phoman14 phoman14 deleted the copilot/sub-pr-80-again branch March 19, 2026 18:53
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