-
Notifications
You must be signed in to change notification settings - Fork 2
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
argument checks for all user facing functions #111
argument checks for all user facing functions #111
Conversation
sync up dev branch to main to avoid potential merge conflicts later
Thanks Egor, will take a look later today. |
@@ -40,26 +40,44 @@ spod_convert <- function( | |||
data_dir = spod_get_data_dir(), | |||
quiet = FALSE, | |||
max_mem_gb = max(4, spod_available_ram() - 4), | |||
max_n_cpu = parallelly::availableCores() - 1, | |||
max_n_cpu = max(1, parallelly::availableCores() - 1), |
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.
👍
zones <- match.arg(zones) | ||
|
||
# Validate inputs | ||
checkmate::assert_choice(type, choices = c("od", "origin-destination", "os", "overnight_stays", "nt", "number_of_trips")) |
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.
Great to see all these additional checks.
@@ -481,7 +486,7 @@ entry-spacing="0"> | |||
|
|||
Lovelace, Robin, and Malcolm Morgan. 2024. “Od: Manipulate and Map | |||
Origin-Destination Data,” August. | |||
<https://cran.r-project.org/web/packages/od/od.pdf>. | |||
<https://doi.org/10.32614/CRAN.package.od>. |
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.
👍
I think this is a final functionality and documentation focussed PR before I reshuffle the functions into separate files for a final cleanup and submit to CRAN. We still have until 23 Dec to submit and their current newbies queue is unusually small (just over 10 packages, see https://nx10.github.io/cransubs/ or https://r-hub.github.io/cransays/articles/dashboard.html ).