-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BUG] galah_select(group = "assertions") causes error #137
Comments
- 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)
It looks like there is still an issue with downloads when using As an example, this query returns an error: library(galah)
library(magrittr)
galah_config(email = "your_email_here")
galah_call() %>%
galah_identify("animalia") %>%
galah_identify("https://biodiversity.org.au/afd/taxa/3cbb537e-ab39-4d85-864e-76cd6b6d6572", search = FALSE) %>%
galah_filter(basisOfRecord == "PRESERVED_SPECIMEN",
year == 2022) %>% # Limiting to 2022 for now
galah_select(group = "assertions") %>%
atlas_occurrences()
#> Calling the API failed for `atlas_occurrences`.
#> ℹ This might mean that the selected system is down. Double check that your query is correct.
#> ℹ If you continue to see this message, please email support@ala.org.au.
#> # A tibble: 0 × 0 Created on 2022-10-31 with reprex v2.0.2 |
This looks like a bug in the code for passing assertions to
This function checks whether ‘all’ assertions are requested by testing whether 107 rows have been passed; but since that was written, the ALA has updated their assertions, and there are now 116. Therefore A better solution is to record which groups are passed by |
fixed as of version 1.5.1 |
Describe the bug
In an effort to debug this issue, I seem to have stuffed something up because I can no longer download any records with
galah
. Thus, this bug report is going from memory.Using the example code works fine:
But changing this to
group = 'assertions'
causes an error about the$
operator being invalid for vectors.Galah 1.4.0
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
I expect to get a list of records along with their associated assertion data.
Additional context
This bug appears to come from the
preset_cols()
helper function ingalah_select.R
. Changing this line:"assertions" = search_fields(type = "assertions")$id)
to:
"assertions" = show_all_fields(type = "assertions")$id)
seems to fix the issue. I have submitted pull request #135 that fixes this bug and expands on the documentation, but I have no idea what I'm doing.
The text was updated successfully, but these errors were encountered: