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

Patch pd datelocal #31

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stijnvanhoey
Copy link
Contributor

This PR tackles (partly) #10 by returning an empty DataFrame instead of an error message when no results are returned by the API (in combination with a status 200).

Some remarks:

  • Returning empty DataFrame instead of error to be consistent with the df=False option also returning json with no results.
  • Similar to other sections of the code with hard coded column names (e.g. locations,...), I also returned the DataFrame with a hard coded set of names.
  • I adjusted the plot function to assert an error when trying to plot an empty DataFrame and added a unit test for this.

The tests do still fail as the API is not returning any information. Fixing this is out of scope of this PR, as it would require having fixture or mocked data as the input of the plot functions instead of relying on the API when running the tests.

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

Successfully merging this pull request may close these issues.

1 participant