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

Make syntax more consistent with expected function behaviour #112

Closed
daxkellie opened this issue Dec 14, 2021 · 0 comments
Closed

Make syntax more consistent with expected function behaviour #112

daxkellie opened this issue Dec 14, 2021 · 0 comments

Comments

@daxkellie
Copy link
Collaborator

In the current version of galah, functions that manipulated or built queries were identified with a select_ prefix (i.e., select_taxa, select_filters, select_locations). With the changes to make syntax more consistent with dplyr filter, select and group_by (#101 ), this makes the syntax of select_taxa an outlier because it does not select columns (which is now what galah_select does).

After discussion, we decided that select_taxa is really a search function and should be renamed search_taxa, consistent with the existing search_fields function. Expected output of search_ functions will be made consistent as well.

Discussion also identified that the difference between search_ functions and find_ functions is ambiguous to the user, but most find_ functions return a data.frame of possible values. However, not all find_ functions accept a blank argument (e.g., find_field_values and find_profile_attributes). To remedy this inconsistent syntax to match their expected behaviour, functions that accept a blank argument and return a data.frame of possible values will be prefixed by show_all_:

show_all_fields()
show_all_reasons()
show_all_profiles()
show_all_ranks()
show_all_atlases()
daxkellie added a commit that referenced this issue Dec 15, 2021
* Also update test file name
daxkellie added a commit that referenced this issue Dec 15, 2021
* Update relevant test files
daxkellie added a commit that referenced this issue Dec 16, 2021
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

No branches or pull requests

1 participant