-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor check_tbl_col_ascending #190
Conversation
This will address #189
While I was looking at this for refactoring, I found that I had re-invented the function to sort the table by output type ID and the task IDs: `match_tbl_to_model_task()`. Happily, this speeds up the process quite a bit _and_ allows me to delete code!
…t to check_tbl_value_col_ascending
Thanks for implementing this so quickly! Instead of a review, as there were quite a few changes I wanted to propose, I went ahed and made a PR instead here: #191 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #191
Ak/check derived task ids/189
As explained in #191 (comment), > match_tbl_to_model_task() outputs a list element per model task, > not output type. In hindsight, this makes sense, but the original variable name of `output_type_tbls` made me think that each list element was an output type (see #191 (comment)). Changing the `output_type_tbls` variable name to `model_task_tbls` reduces the cognitive load because now I understand that each element represents a model task (which is NULL if the output type does not exist for the model task), and in this function, there is only ever one output type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final commit looks good to me! Approved on my end
In #105, I had implemented a sorting method for the
check_tbl_col_ascending()
function that involved using an expanded model grid subset to thecdf
andquantile
output types to sort the submission table. As pointed out by @annakrystalli, there were two problems:derived_task_ids
to the functionbind_model_tasks = TRUE
While I was looking at this for refactoring, I found that I had re-invented the function to sort the table by output type ID and the task IDs:
match_tbl_to_model_task()
.Happily, this speeds up the process quite a bit and allows me to delete code!
This will fix #189
EDIT: huge thanks to @annakrystalli for implementing the correct solution and better tests for derived task IDs