christopherwharrop / rocoto

Rocoto Workflow Management System
Apache License 2.0
21 stars 16 forks source link

Give a warning message if any tags are empty in Torque or MOAB/Torque… #33

Closed samtrahan closed 5 years ago

samtrahan commented 5 years ago

Deprecation warning is given when any empty tags are found in a Torque or MOABTorque job except for the memory tag. The warning states that support for empty tags may be removed in a later release.

samtrahan commented 5 years ago

This will require re-testing. It will take me a few hours.

christopherwharrop commented 5 years ago

That is ridiculous. It's trivial. Please just do it.

christopherwharrop commented 5 years ago

Why did you close this? This needs to go in because the feature/slurm branch that was just merged removed this.

samtrahan commented 5 years ago

The second "if" is not needed. As with most languages, Ruby has short-circuit operators. If you do this:

a && b

and a is false, then b will never be evaluated. Thus, the second "if" statement is unneeded. You can verify this by running:

false && "asdf".cow?

which will return false.

christopherwharrop commented 5 years ago

Maybe I've been doing too much Fortran lately... It has made me paranoid about this sort of thing.

samtrahan commented 5 years ago

Fortran is the only widely-used language I know of that has no short-circuit operators. It has been known to cause brain damage. Be careful.