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

Should there be a galah_profile function? #130

Closed
mjwestgate opened this issue Feb 2, 2022 · 2 comments
Closed

Should there be a galah_profile function? #130

mjwestgate opened this issue Feb 2, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mjwestgate
Copy link
Collaborator

Currently, users set a profile as an optional argument within galah_filter. This is weird for a few reasons:

  • setting the profile doesn't add any rows to the resulting tibble; instead the profile name is added as an attribute, which is not standard behavior for any other galah_ function
  • there is a lookup function associated with profiles (show_all_profiles), but no corresponding galah_ function
  • calling the profiles argument within galah_filter is awkward because it doesn't use NSE. In practice, this results in combining calls that use = and == within the same function (e.g. galah_filter(year == 2020, profile = "ALA")), which is confusing

Alternate behaviour would be to allow piping of profiles specifically through its' own function, such as:

galah_call() |>
  galah_filter(year >= 2010) |>
  galah_profile(ALA) |>
  atlas_counts()
@mjwestgate mjwestgate added the enhancement New feature or request label Feb 2, 2022
@mjwestgate mjwestgate self-assigned this Feb 7, 2022
@mjwestgate
Copy link
Collaborator Author

Proposed name change to something more informative, e.g. galah_quality_profile

mjwestgate added a commit that referenced this issue Feb 8, 2022
This works ok, but requires further testing. Name may change in later versions. Also a deprecation message is needed for users who use the `profile` argument of  `galah_filter` from now on.
mjwestgate added a commit that referenced this issue May 2, 2022
Relate to problems created by removal of S3 classes (#133) and adding galah_data_profiles (#130)
@mjwestgate mjwestgate removed their assignment Jul 1, 2022
@mjwestgate mjwestgate self-assigned this Jul 20, 2022
daxkellie added a commit that referenced this issue Sep 5, 2022
* Naming changed to remain consistent with verbing language of `galah_` functions
@daxkellie
Copy link
Contributor

daxkellie commented Sep 5, 2022

A decision was made after discussion to make the name galah_apply_profile() to keep the verbing language consistent for galah_ functions (e.g., select,filter, group_by). Name might require revisiting in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants