argiopetech/base

inappropriate yaml files should not cause crashes

Closed this issue · 6 comments

If the yaml file is missing some entries (or has extra unneeded entries) it seems to cause mpiMcmc to crash. With new features being added, the yaml file is in a state of flux. It would be better for code to prompt for parameters missing from the yaml file, or if that is too involved, tell the user which ones need to be added. It would also be good if the code could ignore parameters in the yaml files that were unfamiliar.

This wouldn't be too hard to do. The main downside I see is that it would encourage manual inputting rather than the automation effect we were initially going for with the YAML configurations.

Unknown parameters should be ignored currently. I will test this in the near future and ensure it is the case.

thnaks!

On 1/2/14 7:58 PM, Elliot Robinson wrote:

This wouldn't be too hard to do. The main downside I see is that it would
encourage manual inputting rather than the automation effect we were initially
going for with the YAML configurations.

Unknown parameters should be ignored currently. I will test this in the near
future and ensure it is the case.


Reply to this email directly or view it on GitHub
#54 (comment).

Ted von Hippel

Department of Physical Sciences
Embry-Riddle Aeronautical University
600 S. Clyde Morris Boulevard
Daytona Beach, FL 32114-3900
386-226-7751

I just partially fixed this. If there is an actual error with the YAML file, it still crashes, but if it's just missing information, it will ask you for the info via command prompt and then move on once you enter the necessary info. See my pull request for more: #60

This brings us to a design question. You get multiple opportunities to input information. First you do so on the command line. If you fail to do that, the code looks in the YAML. And if it doesn't find it there, it asks you via command prompt.

So the question is, let's say you put in bad information. Regardless of whether this happens on the command line, in the YAML, or via command line prompt, bad information causes an error message and a crash (I mean, a graceful exit, not some sort of nasty memory explosion or anything).

If someone enters bad information, do we want to give them another chance? In other words, instead of crashing, should we print an error message and then try again?

This would not be a hard feature to implement and I'd be happy to do it. It's just a question of what design we think is best. Let me know! (And if we do not want to provide another "chance" via command prompt, then I think we can go ahead and close this issue.)

tedvh commented

Ok sounds good. That and logging will be the purpose of my next pr.