-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
Maybe add a precondition that |
Per this page, "arguments will be provided to your program as a seq of strings bound to the var command-line-args". So under no circumstances should an argument come in as anything but a string. But do you think it's worth making it explicit, for the sake of future readers? |
Yeah you're right. Preconditions not needed. Merge. |
Actually, I think a precondition is a great idea. You can still call the defmain function from the repl. Also, we never use the command-line-args var, so that doesn't apply here. It's still true that arguments from the command line show up as strings, just not through that var. |
Good point. Will do. Can you remind me btw why s-res and t-res have to be strings? I remember there was a justification at one point but have long since forgotten it. On May 25, 2012, at 8:47 AM, Sam Ritchie reply@reply.github.com wrote:
|
Because they're strings in the schema, and because they're not really numeric values -- we're never going to perform any operations on them -- they're really just identifiers. |
Aaaaand I take it back. Preconditions are a great idea. :) I wonder if something like |
I don't like that... then you'd have a settings map represented as Much better to just have validation on the values. The right way to do this is to use a thrift enum.
|
Nice. Submitted issue for this: |
@robinkraft, if you add that precondition I'll merge this. |
68fd9a4 Added preconditions for spatial res as string |
Looks like this pull request was reverted - the resolutions are still hardcoded in develop as of today, with the most recent commit back in February. Very strange ... I'll resubmit. |
Tweaked static and rain preprocessing main functions to take spatial resolution as an argument.