Skip to content
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

Rename and added a robust error handling functionality to the R/assign_job_queue.R file functions #73

Closed
wants to merge 3 commits into from

Conversation

Seyi007
Copy link
Collaborator

@Seyi007 Seyi007 commented Oct 7, 2024

  • 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 handle errors and warnings gracefully.
  • 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

  • Feature (adds or updates new capabilities)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • I have added comments to my code to help provide understanding.
  • I have added a test which covers the code changes found within this PR.
  • [ x] I have deleted all non-relevant text in this pull request template.
  • Reviewer assignment: @jananiravi @the-mayer

Seyi007 and others added 3 commits October 5, 2024 12:29
- 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
@Seyi007 Seyi007 requested a review from the-mayer October 7, 2024 22:41
@Seyi007 Seyi007 closed this Oct 7, 2024
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.

1 participant