Skip to content

Add create_cutting_test() and multitest()#215

Merged
nanxstats merged 4 commits into
Merck:mainfrom
jdblischak:create-cutting-test
Mar 11, 2024
Merged

Add create_cutting_test() and multitest()#215
nanxstats merged 4 commits into
Merck:mainfrom
jdblischak:create-cutting-test

Conversation

@jdblischak
Copy link
Copy Markdown
Collaborator

This PR introduces a new function create_cutting_test(). Similar to create_cutting(), it is a function factory that generates functions that can easily be passed around. This enables us to do various new things.

  1. I created a new function multitest(). It allows running multiple tests at once on a cut data set. It currently returns a list because the test functions do not return consistent outputs
  2. I updated the sim_gs_n() argument test to accept a list of test functions, one per cutting. This is mostly a proof of concept at the moment. More work will be required before we can support allowing multiple tests per cutting and mixing heterogenous tests (as it is currently written sim_gs_n() requires all the test results to be combined into a single output data frame)

I also took the time to clean up some of the roxygen2 docs since I was the one who introduced a lot of the macros.

Lastly, I didn't touch maxcombo() in this PR, but you can imagine that we could also use create_cutting_test() to be able to pass any arbitrary number of test functions to maxcombo(). But just like for sim_gs_n() and multitest(), this would be facilitated by the test functions having consistent output.

@jdblischak jdblischak self-assigned this Mar 7, 2024
@jdblischak jdblischak changed the title Add create_cutting_test() Add create_cutting_test() and multitest() Mar 7, 2024
@jdblischak jdblischak force-pushed the create-cutting-test branch from 61f38f5 to f96a370 Compare March 8, 2024 19:23
@jdblischak
Copy link
Copy Markdown
Collaborator Author

Rebased onto 9ac40f3 to include #214

Copy link
Copy Markdown
Contributor

@nanxstats nanxstats left a comment

Choose a reason for hiding this comment

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

LGTM

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