CorrelAid / datenguideR

R wrapper for the datengui.de GraphQL API to easily access German regional statistics
GNU General Public License v3.0
26 stars 3 forks source link

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

Closed favstats closed 3 years ago

favstats commented 5 years ago

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 commented 5 years ago

"Fixed" this issue with following pull request: https://github.com/CorrelAid/datenguideR/pull/17

favstats commented 5 years ago

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 https://github.com/CorrelAid/datenguideR/blob/3d5d346bcf13b7f6b97dbc764c899d27c955bc5e/R/helpers_call_results.R#L142
  2. this left_join doesn't work because api_results has zero rows https://github.com/CorrelAid/datenguideR/blob/3d5d346bcf13b7f6b97dbc764c899d27c955bc5e/R/helpers_call_results.R#L200
favstats commented 5 years ago

I implemented two temporary "fixes" for this:

  1. Only add source_dat if it's not empty https://github.com/CorrelAid/datenguideR/blob/3d5d346bcf13b7f6b97dbc764c899d27c955bc5e/R/helpers_call_results.R#L139-L143
  2. Error handle the add_substat_info function https://github.com/CorrelAid/datenguideR/blob/3d5d346bcf13b7f6b97dbc764c899d27c955bc5e/R/dg_call.R#L179-L180
lhehnke commented 3 years ago

See #32.