Conversation
…mage_filename when no urls provided, also added test data will nulls.
|
|
hlapp
left a comment
There was a problem hiding this comment.
I'd note that applying a search or filter to data that returns no results is in general not in error, and arguably should result in an empty result set, not an exception. It seems the picture here is complicated by the fact that based on filtering alone the result set isn't empty, but becomes empty once we remove rows that don't reference a valid image? Then the question is, is it an error to have rows without image to begin with, or is it not.
Regardless of the answer, I feel this doesn't need to be sorted out here. We're at the prototype stage, and now the function at least either returns a result of a consistent type, or it doesn't return a result (by raising an exception), which seems good enough. So perhaps open an issue with the above question to be considered down the road if and when there's a lot more continued development.
Fills null values in data with "unknown" and adds two test files with null values (one for image retrieval and one without):
graphs.py: mapping function filters out values inlat-loncolumn that contain the string 'unknown', i.e., if either latitude or longitude is unknown.query.py:get_data: gets information about included columns (fromdashboard.py), sets null values to 'unknown', returns only suggested/required columns.get_filenames: filters out any entries with 'unknown'Image_filenameorfile_url. Will return number of matching entries that are missing these values if no other images exist. Next update may do this when there are matching that can't be displayed in addition to the returned image(s).get_images: Now will note that entries exist, but no image path or filename is available.get_dataandget_filenamesfunctions.Fixes Issues #29 and #30