IMAP-Science-Operations-Center / imap-data-access

Package to download, query, and upload files from the IMAP Science Data Center.
MIT License
0 stars 9 forks source link

Input validation to handle 502 Errors #87

Closed daralynnrhode closed 1 month ago

daralynnrhode commented 2 months ago

Adding input validation for some parameters to avoid 502 errors

Overview

Input validation code for all input parameters. This should avoid most if not all 502 errors triggered when incorrect data is passed to the query and it crashes. Also introduced a test to iterate over bad input values and check that the correct valueError message is returned.

Closes #55

New Dependencies

New Files

Deleted Files

Updated Files

Testing

daralynnrhode commented 2 months ago

I went in and made a small change to the test_io.py``query_parameters supplied to the tests. The version being supplied was 000 which does not adhere to the code I introduced. The new code requires version be passed in as v000. I opted to change the test to reflect the formatting that was consistently being used, but I can aways reverse the change and update the code as well as any documentation. Although, this would require both documentation and output messages to be updated as well.