galaxyproject / tools-iuc

Tool Shed repositories maintained by the Intergalactic Utilities Commission
https://galaxyproject.org/iuc
MIT License
161 stars 421 forks source link

Testing using paths with spaces #577

Open peterjc opened 8 years ago

peterjc commented 8 years ago

Spin out from discussion on #455 where is is good practice to defensively quote path and filenames in the <command> template (etc?) when wrapping tools. This intended to cope with the corner case where Galaxy or one of the working folders has been setup using a directory name with a space.

While we recognise using spaces in directories is a bad idea given how command line parsing works, and expect that many Galaxy tools will break in this situation (perhaps also parts of Galaxy), it would be nice for tools-iuc to illustrate best practise guidelines by quoting filenames/paths.

This issue is about deliberately including such paths in any automated testing for tools-iuc, e.g. using Travis https://github.com/galaxyproject/tools-iuc/tree/travis

Assuming Galaxy copes, we could tweak the Travis (etc) setup to install all of Galaxy on a path with a space. Otherwise we could try just set a few key paths, e.g. maybe:

job_working_directory = database/job working directory
bgruening commented 8 years ago

@peterjc is it feasible to make this part of Galaxy lint? Searching for all data and text parameters and ensure that these are quoted in the command section?

peterjc commented 8 years ago

It should be easy to spot $name (with white space before and after, including special case of at the end of the line) in planemo lint, and variants like ${name}, within the <command> tag. That would help and seems like a good idea in itself. I like that idea :)

In general however, there is no substitute for actually running the entire stack on a path with spaces.

nsoranzo commented 7 years ago

:+1:

bernt-matthias commented 4 years ago

Like that idea Maybe adding --file_path to the planemo t calls is a good first step.

Otherwise I guess cloning galaxy in a directory with a space and using this via --galaxy_root is the ultimative solution which would also catch errors like scripts shipped with the tool ($__tool_directory__)

bernt-matthias commented 4 years ago

LOL: https://github.com/galaxyproject/galaxy/pull/9222

I tried planemo --file_path .. locally on maxbin2 and it failed .. I think having spaces in path will often require upstream fixes (e.g. for pipelines that don't quote properly internally).

Not sure if we really want to have this globally... my first Idea was that it might be better to have a check in Galaxy

and just dont start / print a big warning if one of these applies.