Use function factory pattern to pass cutting functions to sim_gs_n()#201
Conversation
|
Thanks for applying the function factory, @jdblischak ! Before the merge, could you please introduce us to the changes and new syntax tomorrow? |
|
Overall looking good. Let's try follow the testing best practices in designing your test suite:
|
@LittleBeannie Yes, of course. I'll explain everything in today's meeting. Also note that this morning I also converted the |
@nanxstats I switched to |
bcc37ad to
b302c3e
Compare
LittleBeannie
left a comment
There was a problem hiding this comment.
Thanks for these terrific improvement, @jdblischak ! I will add an example of maxcombo test after this PR is merged.
nanxstats
left a comment
There was a problem hiding this comment.
Awesome! I love simple, reliable, and effective solutions like this.
Follow-up to #195. Closes #196.
This PR makes the following updates:
get_analysis_date()expressions that then need to be evaluated, the argumentcuttingofsim_gs_n()now accepts a list of cutting functions. These functions are created by the function factorycreate_cutting()testofsim_gs_n(), only the test function itself is passed, and any further arguments are passed to the testing function via...Note that I didn't fully convert
maxcombo(). I don't think I fully understand the purpose of this function. Its arguments are quoted functions, but they are never evaluated. Instead their arguments forrhoandgammaare extracted and passed tofh_weight(). Is there any reason thatmaxcombo()couldn't instead just receive the vectors ofrhoandgammadirectly? And why ismaxcombo()needed whenfh_weight()already exists?