zooniverse / panoptes-cli

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

The allow missing command does not work as intened with uploading files #222

Closed CKrawczyk closed 2 years ago

CKrawczyk commented 2 years ago

I don't think the state where the --allow-missing flag is called can actually be reached by the code. The relevant logic block is here: https://github.com/zooniverse/panoptes-cli/blob/master/panoptes_cli/commands/subject_set.py#L328-L365

I think the bug is specifically this line: https://github.com/zooniverse/panoptes-cli/blob/master/panoptes_cli/commands/subject_set.py#L336

CKrawczyk commented 2 years ago

I think these two blocks of code should be skipped if the allow missing flag is set: https://github.com/zooniverse/panoptes-cli/blob/master/panoptes_cli/commands/subject_set.py#L336-L338 https://github.com/zooniverse/panoptes-cli/blob/master/panoptes_cli/commands/subject_set.py#L345-L347

Otherwise, the code will never make it to the line of code where that check is made: https://github.com/zooniverse/panoptes-cli/blob/master/panoptes_cli/commands/subject_set.py#L361