Skip to content

Commit

Permalink
Drop old Tool test parsing logic in favor of ToolSource logic.
Browse files Browse the repository at this point in the history
Add to tool_util, drop all the Galaxy mocking required using the older tool based logic.
  • Loading branch information
jmchilton committed Jul 18, 2024
1 parent 90c6dcc commit 071c376
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 376 deletions.
7 changes: 4 additions & 3 deletions lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
)
from galaxy.tool_util.toolbox.views.sources import StaticToolBoxViewSources
from galaxy.tool_util.verify.interactor import ToolTestDescription
from galaxy.tool_util.verify.parse import parse_tool_test_descriptions
from galaxy.tool_util.verify.test_data import TestDataNotFoundError
from galaxy.tool_util.version import (
LegacyVersion,
Expand Down Expand Up @@ -149,7 +150,6 @@
from galaxy.tools.parameters.meta import expand_meta_parameters
from galaxy.tools.parameters.workflow_utils import workflow_building_modes
from galaxy.tools.parameters.wrapped_json import json_wrap
from galaxy.tools.test import parse_tests
from galaxy.util import (
in_directory,
listify,
Expand Down Expand Up @@ -1306,9 +1306,10 @@ def __parse_trackster_conf(self, tool_source):
self.trackster_conf = TracksterConfig.parse(trackster_conf)

def parse_tests(self):
if tests_source := self.tool_source:
if self.tool_source:
test_descriptions = parse_tool_test_descriptions(self.tool_source, self.id)
try:
self.__tests = json.dumps([t.to_dict() for t in parse_tests(self, tests_source)], indent=None)
self.__tests = json.dumps([t.to_dict() for t in test_descriptions], indent=None)
except Exception:
self.__tests = None
log.exception("Failed to parse tool tests for tool '%s'", self.id)
Expand Down
350 changes: 0 additions & 350 deletions lib/galaxy/tools/test.py

This file was deleted.

Loading

0 comments on commit 071c376

Please sign in to comment.