Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tests break on travis even though it runs locally. #12

Closed
favstats opened this issue Nov 8, 2019 · 4 comments
Closed

Tests break on travis even though it runs locally. #12

favstats opened this issue Nov 8, 2019 · 4 comments
Assignees

Comments

@favstats
Copy link
Collaborator

favstats commented Nov 8, 2019

Need to find the reason why travis keeps breaking although it runs locally without problem.

Here is a failing Travis build for reference:
https://travis-ci.org/CorrelAid/datenguideR/jobs/609598285?utm_medium=notification&utm_source=github_status

@favstats
Copy link
Collaborator Author

favstats commented Nov 9, 2019

"Fixed" this issue with following pull request: #17

@favstats
Copy link
Collaborator Author

favstats commented Nov 9, 2019

However, the original problem still exists. I just implemented an error handler to deal with this.

There are two (probably related) issues on Travis:

  1. cbind doesn't add source_dat because it has zero rows
    cbind(source_dat) %>%
  2. this left_join doesn't work because api_results has zero rows
    dplyr::left_join(meta_info, by = substat_name_)

@favstats
Copy link
Collaborator Author

favstats commented Nov 9, 2019

I implemented two temporary "fixes" for this:

  1. Only add source_dat if it's not empty
    ## TODO: This is necessary because Travis (for some reason) sometimes thinks source_dat is empty
    if (!(nrow(source_dat)==0)) {
    final <- final %>%
    cbind(source_dat) %>%
    tibble::as_tibble()
  2. Error handle the add_substat_info function

    datenguideR/R/dg_call.R

    Lines 179 to 180 in 3d5d346

    ## TODO: This is necessary because Travis (for some reason) sometimes treats API results as empty
    add_substat_info <- purrr::possibly(add_substat_info, otherwise = NULL)

@favstats favstats self-assigned this Apr 14, 2020
@lhehnke lhehnke closed this as completed Jul 23, 2021
@lhehnke
Copy link
Member

lhehnke commented Jul 23, 2021

See #32.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants