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

Improvise error reporting mechanism of cache_filters module #32

Merged
merged 3 commits into from
Jul 15, 2019

Conversation

jaladh-singhal
Copy link
Member

In this PR, I've made load data functions to throw more accurate errors about the missing cache data. The several changes I made are:

  • Taken out raise exception code from df_from_votable() into the functions that were using it: load_filter_index() & load_transmission_data() to customize error-checking as per need of caller function.
  • In load_transmission_data(), absence of filter data file is not enough to decide filter_id doesn't index, but it should also be absent from index - for the cases when download of filter data left incomplete.
  • Added a function download_transmission_data() to let users specifically download the missing filter data. Hence code to download transmission data in download_filter_data() is also wrapped in this new function.
  • Also added more tests for:
    • the failing use cases by checking the expected error to be raised
    • the newly added function download_transmission_data() i.e. a part of complete downloading function: download_filter_data()

This is essential for the use of cache_filters module both independently and for general purpose, like in base.py

@wkerzendorf wkerzendorf merged commit ddc3c5e into starkit:master Jul 15, 2019
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.

2 participants