planemo
planemo copied to clipboard
Please ignore macros during testing
It would be helpful if macros could be ignored if they're passed in to a test command.
Now that I know, I will use . instead, but this was really unexpected and an opaque error message, thankfully someone more experienced was sitting next to me (thanks @shiltemann) and could point out where I went wrong.
$ planemo test [...] *.xml
Unable to determine runnable type for path [/home/hxr/arbeit/tools-devteam/tool_collections/cufflinks/cuff_macros.xml]
$ planemo test [...] gffread.xml
git --git-dir /home/hxr/.planemo/gx_repo config remote.origin.fetch '+refs/*:refs/*'
git --git-dir /home/hxr/.planemo/gx_repo config remote.origin.mirror true
git --git-dir /home/hxr/.planemo/gx_repo remote update >/dev/null 2>&1
$ planemo test [...] .
git --git-dir /home/hxr/.planemo/gx_repo config remote.origin.fetch '+refs/*:refs/*'
git --git-dir /home/hxr/.planemo/gx_repo config remote.origin.mirror true
git --git-dir /home/hxr/.planemo/gx_repo remote update >/dev/null 2>&1
I don't think it's a good idea to skip a particular type of file, given you are passing it explicitly (planemo cannot know that you used the * given it's expanded by the shell).
The error message comes from the from_path() function: https://github.com/galaxyproject/planemo/blob/master/planemo/runnable.py#L120
This is used by various planemo commands (serve, test, tool_factory, workflow_convert and workflow_edit), not sure how to rephrase it.
But it doesn't need to be fatal, right? Sure, log an error that it can't be run, but don't exit, instead test the other files that were provided?
You explicitly passed something wrong, we shouldn't try to correct for user errors like this. I agree we could be failing more gently, but it should not ignore the input.