Function names rename for R/combine_analysis.R, R/combine_files.R, R/create_lineage_lookup.R, R/assign_job_queue.R#95
Conversation
- Added validation checks for input parameters (accessions, ipg_file, assembly_path, lineagelookup_path). - Included error messages for missing or invalid inputs and file existence checks. - Wrapped main logic in tryCatch for graceful error handling during execution. ")
- Implement error handling for mapOption2Process, get_proc_medians, write_proc_medians_table, get_proc_weights, advanced_opts2est_walltime, assign_job_queue, and plot_estimated_walltimes . - Validate input arguments for each function to ensure they meet expected criteria. - Use tryCatch blocks to gracefully handle errors and warnings. - Provide informative error messages and detailed logging where appropriate. - Ensure functions fail gracefully and provide useful feedback. Also renamed the functions to the following; assign_job_queue -> assignJobQueue make_opts2procs -> mapOption2Process map_advanced_opts2procs -> mapAdvOption2Process get_proc_medians - calculateProcessRuntime write_proc_medians_table -> writeProcessRuntime2TSV write_proc_medians_yml -> writeProcessRuntime2YML get_proc_weights -> getProcessRuntimeWeights advanced_opts2est_walltime -> calculateEstimatedWallTimeFromOpts plot_estimated_walltimes -> plotEstimatedWallTimes
…in readAAStringSet
…blast functions. This includes arguments check before wrapping code logic in a tryCatch block.
… a separate pr for their updates and on a different branch: R/combine_analysis.R combine_full combine_ipr R/combine_files.R combine_files R/create_lineage_lookup.R create_lineage_lookup shorten_NA
R/combine_analysis.R combine_full combine_ipr R/combine_files.R combine_files R/create_lineage_lookup.R create_lineage_lookup shorten_NA with approved names from JRaviLab#44
…rocs, get_proc_medians, write_proc_medians_table, write_proc_medians_yml, get_proc_weights, advanced_opts2est_walltime in R/assign_job_queue.R to be updated in a separate full request
Merge branch 'rename_functions' into function_names_rename
| Original | Modified | User Facing | |---------------------------------|----------------------------------|----------------------------------| | assign_job_queue | assignJobQueue | ✔️ | | make_opts2procs | mapOption2Process | ✔️ | | map_advanced_opts2procs | mapAdvOption2Process | ✔️ | | get_proc_medians | calculateProcessRuntime | ✔️ | | write_proc_medians_table | writeProcessRuntime2TSV | ✔️ | | write_proc_medians_yml | writeProcessRuntime2YML | ✔️ | | get_proc_weights | getProcessRuntimeWeights | ✔️ | | advanced_opts2est_walltime | calculateEstimatedWallTimeFromOpts| ✔️ | | plot_estimated_walltimes | plotEstimatedWallTimes | ✔️ |
jananiravi
left a comment
There was a problem hiding this comment.
@Seyi007 (@the-mayer) does this carry a combination of function renames, styler, and tryCatch error handling commits? Should we separate them out in the future into separate PRs, even if it's easier to go ahead with the combined one this time?
the-mayer
left a comment
There was a problem hiding this comment.
@jananiravi / @Seyi007 , I believe I have removed all code not relevant to the rename PR. This combined with a rebase to pull in additional PRs and I think we are ready to merge.
|
Yes as @the-mayer said, this pr is solely for renaming functions. The other pr #76 is for error handling @jananiravi. This would make it easy for David to merge them on the basis of a specific issue. |
falquaddoomi
left a comment
There was a problem hiding this comment.
Generally, it looks good, and the new names are IMO much more readable. I left a few comments.
- re-implement dropped check - fix .Rd
- adjust roxygen skeleton readability
Description
Due to the last conversation on the Zoom meeting, I decided to separate the function names rename from the error handling PR I opened in #76. This makes it easier for the continuous topic-based merging currently being done by @the-mayer.
What kind of change(s) are included?
Checklist
Please ensure that all boxes are checked before indicating that this pull request is ready for review.