-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add input check functions using {cli}
#150
Conversation
Adds helper functions for input checks for arc_open, add_features, update_features, and add_item: - check_dataframe - check_url (w/ is_url) - check_string - check_crs_match - check_add_item_args Also adds inform_nin_feature to reduce duplicate between add_features and update_features
Also remove non-ASCII characters from add_item
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.
Using this as an opportunity to fix some issues with the readme.
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.
Sweeeeett! Thank you! I've simplified some code and made some adjustments where i saw fit. Thank you Veryyy much!
Great! The pattern argument in check_url could also help functions error on invalid URLs. I think the URL patterns for ArcGIS REST servers and AGOL services are consistent enough to support those kind of checks. |
Adds helper functions for input checks for
arc_open()
,add_features()
,update_features()
, andadd_item()
including:Also adds
inform_nin_feature()
to reduce duplicative code betweenadd_features()
andupdate_features()
.Also tries to make error and warning messages more consistent internally and consistent with the tidyverse style guide for error messages.
Checklist
devtools::document()
devtools::check()
passes locallyChanges
This adds the general helper functions listed above to
utils.R
and other functions as appropriate. I did not include updates to NEWS.md or any changes to documentation in this PR.Follow up tasks
More consistent input checks should be implemented overall and URL checking could be improved to ensure input URL is consistent with the type of URL that could be a ArcGIS Server or ArcGIS Online URL.