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

galah_select always returns 'basic' columns #128

Closed
mjwestgate opened this issue Feb 2, 2022 · 1 comment
Closed

galah_select always returns 'basic' columns #128

mjwestgate opened this issue Feb 2, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mjwestgate
Copy link
Collaborator

mjwestgate commented Feb 2, 2022

Ideally, galah_select should return only those columns specified by the user, unless they also specify group. In practice, however, columns selected by group = "basic" are always present, e.g.:

reptile_occurrences_1930 <- galah_call() |> 
  galah_identify("reptilia") |> 
  galah_filter(year == 1930) |>
  galah_select(eventDate, kingdom) |>
  atlas_occurrences()

> colnames(reptile_occurrences_1930)
[1] "eventDate"        "kingdom"          "decimalLatitude"  "decimalLongitude" "scientificName"  
[6] "taxonConceptID"   "recordID"         "dataResourceName"

This is almost certainly caused by failing to overwrite the default settings when the user supplies alternate arguments.

@mjwestgate mjwestgate added the bug Something isn't working label Feb 2, 2022
@mjwestgate mjwestgate self-assigned this Feb 7, 2022
mjwestgate added a commit that referenced this issue Feb 23, 2022
- fix bug where `group = "assertions"` failed (#137)
- fix bug where `group = "basic"` columns were always included (#128)
- update behaviour of validate fields to recognise `show_all_assertions` (i.e. assertions no longer included in `show_all_fields`)
- add tests to prevent recurrences (all passing)
@mjwestgate
Copy link
Collaborator Author

Appears fixed now; will close when releasing next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants