firelab / behave

A new implementation of the extended Rothermel model
Other
11 stars 7 forks source link

Add a command line parser #1

Open nwagenbrenner opened 8 years ago

nwagenbrenner commented 8 years ago

We need to be able to accept command line args or a config file. Should we use the program options method used in the WindNinja CLI? This will require boost. Is that okay?

wchatham commented 8 years ago

Hey Natalie,

Jason is going to show me a command line interpreter that I may be able to use that doesn't require boost. If that doesn't work, we can look into adding boost. I've heard horror stories, about boost, so I'll try to keep away from it as long as possible. :)

-Bill

On Tue, Jan 26, 2016 at 3:40 PM, Natalie Wagenbrenner < notifications@github.com> wrote:

We need to be able to accept command line args or a config file Should we use the program options method used in the WindNinja CLI? This will require boost Is that okay?

— Reply to this email directly or view it on GitHub https://github.com/firelab/Behave/issues/1.

nwagenbrenner commented 8 years ago

Okay, I can also add an option in cmake to optionally compile the boost command line stuff. Let me know what you all decide. But we'll need something for the ndfd project.

wchatham commented 8 years ago

OK, sounds good.

On Wed, Jan 27, 2016 at 9:38 AM, Natalie Wagenbrenner < notifications@github.com> wrote:

Okay, I can also add an option in cmake to optionally compile the boost command line stuff. Let me know what you all decide. But we'll need something for the ndfd project.

— Reply to this email directly or view it on GitHub https://github.com/firelab/Behave/issues/1#issuecomment-175733757.

nwagenbrenner commented 8 years ago

Added in 4969c09. The command line parser is only compiled if CLI is defined, otherwise everything should be the same as it was.

ksshannon commented 8 years ago

Knowing it's none of my business, I'd like to comment the absolute hardest part about building software is dependencies. For such a trivial task, I'd recommend just writing it yourself.

nwagenbrenner commented 8 years ago

Yeah, that's fair. I also asked whether we might need other boost capabilities (e.g., datetime stuff, etc.) for this model in the future and it sounds like we might, so maybe boost will be needed anyway?? At any rate, we needed something soon that could handle both command line options as well as reading from a file. This seemed easiest to me (since I was doing the work and am already using boost). It's fine with me if everyone wants to remove it. I don't care how it's done as long as it works.

wchatham commented 8 years ago

I've removed boost and added a simple implementation for a command line parser to perform spread rate calculations. Preliminary testing indicates it is working correctly. There is no implementation for reading from a file at this time. I'll go ahead keep this issue open until it is confirmed that what is in place now sufficiently meets needs and is indeed working correctly.