planemo
planemo copied to clipboard
Planemo exits 0 during test despite galaxy/tool error
Cc @bgruening @yhoogstrate @nsoranzo
I noticed this whilst looking at the crossmap tool's build logs. The tools ended up not being tested and two failures were raised that probably should have killed the tests?
2017-05-24 00:10:02,390 INFO [galaxy.config] Install database targetting Galaxy's database configuration.
2017-05-24 00:10:03,300 ERROR [galaxy.visualization.genomes] Error reading twobit.loc
Traceback (most recent call last):
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/visualization/genomes.py", line 210, in reload_genomes
for line in open( os.path.join( self.app.config.tool_data_path, "twobit.loc" ) ):
IOError: [Errno 2] No such file or directory: '/tmp/tmpFqJe_b/galaxy-dev/tool-data/twobit.loc'
2017-05-24 00:10:03,352 INFO [galaxy.util.handlers] Setting <handlers> default to child with id 'main'
2017-05-24 00:10:03,377 INFO [galaxy.tools.toolbox.watcher] Watchdog library unavailable, cannot monitor tools.
2017-05-24 00:10:03,569 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmpFqJe_b/tool_conf.xml
2017-05-24 00:10:03,594 ERROR [galaxy.tools] Could not find dependency 'input' of parameter 'input_chain' in tool CrossMap BAM
2017-05-24 00:10:03,594 ERROR [galaxy.tools.toolbox.base] Error reading tool from path: /home/travis/build/galaxyproject/tools-iuc/tools/crossmap/crossmap_bam.xml
Traceback (most recent call last):
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 544, in _load_tool_tag_set
tool = self.load_tool(concrete_path, use_cached=False)
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 730, in load_tool
tool = self.create_tool( config_file=config_file, repository_id=repository_id, guid=guid, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 249, in create_tool
tool = ToolClass( config_file, tool_source, self.app, guid=guid, repository_id=repository_id, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 423, in __init__
raise e
KeyError: 'input'
2017-05-24 00:10:03,604 ERROR [galaxy.tools] Could not find dependency 'input' of parameter 'input_chain' in tool CrossMap BED
2017-05-24 00:10:03,605 ERROR [galaxy.tools.toolbox.base] Error reading tool from path: /home/travis/build/galaxyproject/tools-iuc/tools/crossmap/crossmap_bed.xml
Traceback (most recent call last):
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 544, in _load_tool_tag_set
tool = self.load_tool(concrete_path, use_cached=False)
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/toolbox/base.py", line 730, in load_tool
tool = self.create_tool( config_file=config_file, repository_id=repository_id, guid=guid, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 249, in create_tool
tool = ToolClass( config_file, tool_source, self.app, guid=guid, repository_id=repository_id, **kwds )
File "/tmp/tmpFqJe_b/galaxy-dev/lib/galaxy/tools/__init__.py", line 423, in __init__
raise e
KeyError: 'input'
2017-05-24 00:10:03,605 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmpFqJe_b/shed_tools_conf.xml
2017-05-24 00:10:03,606 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmpFqJe_b/empty_tool_conf.xml
No handlers could be found for logger "galaxy.datatypes.display_applications.application"
2017-05-24 00:10:04,024 INFO [galaxy.jobs] Handler 'main' will load all configured runner plugins
2017-05-24 00:10:04,036 INFO [galaxy.jobs.handler] job handler stop queue started
2017-05-24 00:10:04,056 INFO [galaxy.jobs.handler] job handler queue started
2017-05-24 00:10:04,090 INFO [galaxy.app] Galaxy app startup finished (5195.934 ms)
2017-05-24 00:10:05,169 INFO [galaxy.queue_worker] Binding and starting galaxy control worker for main
/home/travis/.planemo/gx_venv/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:562: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage.
'storage.' % (dialect.name, dialect.driver))
/home/travis/.planemo/gx_venv/lib/python2.7/site-packages/sqlalchemy/sql/default_comparator.py:153: SAWarning: The IN-predicate on "request_type.id" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.
'strategies for improved performance.' % expr)
----------------------------------------------------------------------
XML: /tmp/tmpFqJe_b/xunit.xml
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
xref https://github.com/galaxyproject/tools-iuc/pull/702
I am posting here, because I think it is related. I am trying to wrapping a tool for Galaxy (it is my first attempt) I made a simple xml file with planemo and planemo lint is OK.
(.venv) domenico@domenico-ThinkCentre-M93p:~$ planemo l
Linting tool /home/domenico/papillon.xml
Applying linter tests... CHECK
.. CHECK: 1 test(s) found.
Applying linter output... CHECK
.. INFO: 1 outputs found.
Applying linter inputs... CHECK
.. INFO: Found 4 input parameters.
Applying linter help... CHECK
.. CHECK: Tool contains help section.
.. CHECK: Help contains valid reStructuredText.
Applying linter general... CHECK
.. CHECK: Tool defines a version [0.1.0].
.. CHECK: Tool defines a name [Read and plot cuffdiff data].
.. CHECK: Tool defines an id [papillon].
.. CHECK: Tool targets 16.01 Galaxy profile.
Applying linter command... CHECK
.. INFO: Tool contains a command.
Applying linter citations... CHECK
.. CHECK: Found 1 likely valid citations.
Applying linter tool_xsd... CHECK
.. INFO: File validates against XML schema.
But the test doesn't work:
planemo test --install_galaxy
2018-01-16 15:41:17,924 INFO [galaxy.model.migrate.check] Migrating 132 -> 133...
2018-01-16 15:41:18,346 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:18,347 INFO [galaxy.model.migrate.check] Add dependencies column to jobs table
2018-01-16 15:41:18,347 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:18,347 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:18,347 INFO [galaxy.model.migrate.check] Migrating 133 -> 134...
2018-01-16 15:41:18,435 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:18,435 INFO [galaxy.model.migrate.check] Migration script to set the 'deleted' column of the
2018-01-16 15:41:18,435 INFO [galaxy.model.migrate.check] 'history_dataset_association' table to True if 'purged' is True.
2018-01-16 15:41:18,436 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:18,436 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:18,436 INFO [galaxy.model.migrate.check] Migrating 134 -> 135...
2018-01-16 15:41:19,580 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:19,580 INFO [galaxy.model.migrate.check] This migration script adds support for storing tags in the context of a dataset in a library
2018-01-16 15:41:19,580 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:19,580 INFO [galaxy.model.migrate.check]
2018-01-16 15:41:19,592 INFO [galaxy.config] Install database targetting Galaxy's database configuration.
2018-01-16 15:41:20,017 ERROR [galaxy.visualization.genomes] Error reading twobit.loc
Traceback (most recent call last):
File "/tmp/tmp5xv3auy3/galaxy-dev/lib/galaxy/visualization/genomes.py", line 211, in reload_genomes
for line in open(os.path.join(self.app.config.tool_data_path, "twobit.loc")):
IOError: [Errno 2] No such file or directory: '/tmp/tmp5xv3auy3/galaxy-dev/tool-data/twobit.loc'
2018-01-16 15:41:20,060 INFO [galaxy.util.handlers] Setting <handlers> default to child with id 'main'
2018-01-16 15:41:20,107 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmp5xv3auy3/tool_conf.xml
2018-01-16 15:41:20,119 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmp5xv3auy3/shed_tools_conf.xml
2018-01-16 15:41:20,119 INFO [galaxy.tools.toolbox.base] Parsing the tool configuration /tmp/tmp5xv3auy3/empty_tool_conf.xml
No handlers could be found for logger "galaxy.datatypes.display_applications.application"
2018-01-16 15:41:20,330 INFO [galaxy.jobs] Handler 'main' will load all configured runner plugins
2018-01-16 15:41:20,334 INFO [galaxy.jobs.handler] job handler stop queue started
2018-01-16 15:41:20,344 INFO [galaxy.jobs.handler] job handler queue started
2018-01-16 15:41:20,356 INFO [galaxy.app] Galaxy app startup finished (130082.764 ms)
2018-01-16 15:41:20,846 INFO [galaxy.queue_worker] Binding and starting galaxy control worker for main
/home/domenico/.planemo/gx_venv/local/lib/python2.7/site-packages/sqlalchemy/sql/default_comparator.py:153: SAWarning: The IN-predicate on "request_type.id" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.
'strategies for improved performance.' % expr)
----------------------------------------------------------------------
XML: /tmp/tmp5xv3auy3/xunit.xml
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
2018-01-16 15:41:21,619 INFO [test_driver] Shutting down
2018-01-16 15:41:21,619 INFO [test_driver] Shutting down embedded galaxy web server
2018-01-16 15:41:21,620 INFO [test_driver] Embedded web server galaxy stopped
2018-01-16 15:41:21,620 INFO [test_driver] Stopping application galaxy
2018-01-16 15:41:24,062 INFO [galaxy.jobs.handler] sending stop signal to worker thread
2018-01-16 15:41:24,062 INFO [galaxy.jobs.handler] job handler queue stopped
2018-01-16 15:41:24,062 INFO [galaxy.jobs.runners] TaskRunner: Sending stop signal to 2 worker threads
2018-01-16 15:41:24,063 INFO [galaxy.jobs.runners] LocalRunner: Sending stop signal to 4 worker threads
2018-01-16 15:41:24,063 INFO [galaxy.jobs.handler] sending stop signal to worker thread
2018-01-16 15:41:24,063 INFO [galaxy.jobs.handler] job handler stop queue stopped
2018-01-16 15:41:24,063 INFO [test_driver] Application galaxy stopped.
2018-01-16 15:41:24,064 INFO [galaxy.jobs.handler] sending stop signal to worker thread
2018-01-16 15:41:24,064 INFO [galaxy.jobs.handler] job handler queue stopped
2018-01-16 15:41:24,064 INFO [galaxy.jobs.runners] TaskRunner: Sending stop signal to 2 worker threads
2018-01-16 15:41:24,065 INFO [galaxy.jobs.runners] LocalRunner: Sending stop signal to 4 worker threads
2018-01-16 15:41:24,065 INFO [galaxy.jobs.handler] sending stop signal to worker thread
2018-01-16 15:41:24,065 INFO [galaxy.jobs.handler] job handler stop queue stopped
Testing complete. HTML report is in "/home/domenico/tool_test_output.html".
There is an Error reading twobit.loc. I opened the tool_test_output.html file, but it is empty:
Overview
No tests were executed.
Tests
The remainder of this contains a description for each test executed to run these jobs.
What should I do? Any workaround? Thanks
@domenico-somma The twobit.loc is not related and not a real error. Can you try to the test specifying the full path of your tool file, e.g. planemo test /home/domenico/papillon.xml
?
@nsoranzo Hi, while I was waiting I was playing a bit with it. To be sure to replicate the issue I removed the .venv
and .planemo
folders and I started again. Made a new .venv, installed planemo e just ran planemo test --install_galaxy
and it's working now.
I can't replicate it.
Sorry about that.