galaxy-iuc / standards

Documentation for standards and best practices from the Galaxy IUC
http://galaxy-iuc-standards.readthedocs.io/en/latest/
6 stars 16 forks source link

When should we write separate scripts and when should we use configfiles #49

Open mvdbeek opened 6 years ago

mvdbeek commented 6 years ago

That discussion came up in https://github.com/galaxyproject/tools-iuc/pull/1535.

Sometimes we need a helper script. This can either be a script next to the tool xml, or we can template out a script using the <configfile> mechanism. We do have examples for both, but no clear consensus on when to use which mechanism.

The arguments for a script as separate file on disk are:

The arguments against (for including it as <configfile> in the tool wrapper) it are:

(Feel free to edit/add arguments)

mvdbeek commented 6 years ago

I guess I'd like to see a rule of thumb like "if dealing with arguments takes up less than ~ 20 % of the code, use a separate script".

yhoogstrate commented 6 years ago

I don't see an added value of using config files for the purpose of generating <command>-replacing code (unless there is technically no other possibility).