zooniverse / panoptes-cli

A command-line interface for Panoptes
Apache License 2.0
18 stars 5 forks source link

Fix #222 #224

Closed CKrawczyk closed 2 years ago

CKrawczyk commented 2 years ago

These changes fix issue #222. The validate_file checks for each row were returning early if no file was found regardless of how the allow_missing flag was set. The existing allow_missing check was after the early return.

The logic behind checking for a valid file has been updated to ensure the state of allow_missing is checked before returning early.

I have tested this locally and it works as intended now, my only concern is the messaging set to stderr in the validate_file function might be a bit confusing for anyone using the code with this flag set as it says Error: at the start.

I am happy to update the message to be a bit more dynamic and change to a Warning: when allow_missing is used but was on the fence if the extra logic needed for that was really worth it in this case.