CWSL / cwsl-mas

VisTrails plugin for Climate Model Analysis
Apache License 2.0
6 stars 32 forks source link

Non-string positional arguments #20

Closed DamienIrving closed 9 years ago

DamienIrving commented 9 years ago

If you define a script at https://github.com/CWSL/cwsl-ctools that takes positional arguments that aren't strings (e.g. argparse allows you to specific int and float positional arguments) then I've found that cwsl/core/scheduler.py and cwsl/utils/utils.py will fail when applying join to the list of positional arguments. I tried to fix this error myself (using map(str, positional_argument_list)) but then cwsl/core/scheduler.py started throwing different errors which I didn't understand (sorry!).

captainceramic commented 9 years ago

Thanks for that Damien - I think we should be able to get that fixed up pretty easily. I'll have a look at it. I think ensuring that the argument lists get converted to strings when going to the scheduler should do it.

captainceramic commented 9 years ago

I've pushed a change for this to the devel branch - 42d95978ad38c2edaa54586a9bc5764fd36d0232. It seems to be working for me - could you check out to see if this fixes it up?

I pull across a whole bunch of changes from my fork into devel, so it's possible something may have regressed.

captainceramic commented 9 years ago

Actually - I just clicked on the link and perhaps that should have been self.cmds = self.cmds + str_args, not self.cmds.append(str_args) :) Let me know if it needs to be changed!