mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #7992 from jmchilton/more_packages
Add galaxy-tool-util and galaxy-job-metrics packages.
This commit is contained in:
@@ -9,7 +9,7 @@ from unittest import skip, SkipTest, TestCase
|
||||
|
||||
import pytest
|
||||
|
||||
from galaxy.tools.deps.commands import which
|
||||
from galaxy.tool_util.deps.commands import which
|
||||
from galaxy.tools.verify.test_data import TestDataResolver
|
||||
from .api import UsesApiTestCaseMixin
|
||||
from .driver_util import GalaxyTestDriver
|
||||
|
||||
@@ -8,7 +8,7 @@ from base.populators import (
|
||||
DatasetPopulator,
|
||||
)
|
||||
|
||||
from galaxy.tools.deps.commands import which
|
||||
from galaxy.tool_util.deps.commands import which
|
||||
from .test_job_environments import RunsEnvironmentJobs
|
||||
|
||||
SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
from galaxy.job_metrics import JobMetrics
|
||||
|
||||
|
||||
def test_job_metrics_load():
|
||||
# Just construct the manager to make sure all the plugin classes load fine
|
||||
# and package is configured properly.
|
||||
JobMetrics()
|
||||
@@ -1,8 +1,8 @@
|
||||
from unittest import TestCase
|
||||
|
||||
from galaxy.jobs.output_checker import check_output, DETECTED_JOB_STATE
|
||||
from galaxy.tools.parser.error_level import StdioErrorLevel
|
||||
from galaxy.tools.parser.interface import ToolStdioRegex
|
||||
from galaxy.tool_util.parser.error_level import StdioErrorLevel
|
||||
from galaxy.tool_util.parser.interface import ToolStdioRegex
|
||||
from galaxy.util.bunch import Bunch
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ from unittest import TestCase
|
||||
|
||||
import psutil
|
||||
|
||||
from galaxy import job_metrics
|
||||
from galaxy import model
|
||||
from galaxy.jobs import metrics
|
||||
from galaxy.jobs.runners import local
|
||||
from galaxy.util import bunch
|
||||
from ..tools_support import (
|
||||
@@ -20,7 +20,7 @@ class TestLocalJobRunner(TestCase, UsesApp, UsesTools):
|
||||
def setUp(self):
|
||||
self.setup_app()
|
||||
self._init_tool()
|
||||
self.app.job_metrics = metrics.JobMetrics()
|
||||
self.app.job_metrics = job_metrics.JobMetrics()
|
||||
self.job_wrapper = MockJobWrapper(self.app, self.test_directory, self.tool)
|
||||
|
||||
def tearDown(self):
|
||||
|
||||
@@ -4,12 +4,12 @@ from xml.etree.ElementTree import XML
|
||||
|
||||
from galaxy import model
|
||||
from galaxy.exceptions import UserActivationRequiredException
|
||||
from galaxy.tool_util.parser.output_objects import ToolOutput
|
||||
from galaxy.tools.actions import (
|
||||
DefaultToolAction,
|
||||
determine_output_format,
|
||||
on_text_for_names
|
||||
)
|
||||
from galaxy.tools.parser.output_objects import ToolOutput
|
||||
from .. import tools_support
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from galaxy import (
|
||||
model,
|
||||
util
|
||||
)
|
||||
from galaxy.tools.parser import output_collection_def
|
||||
from galaxy.tool_util.parser import output_collection_def
|
||||
from galaxy.tools.provided_metadata import LegacyToolProvidedMetadata, NullToolProvidedMetadata
|
||||
from .. import tools_support
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ import shutil
|
||||
import unittest
|
||||
from tempfile import mkdtemp
|
||||
|
||||
from galaxy.tools.deps import (
|
||||
from galaxy.tool_util.deps import (
|
||||
conda_util,
|
||||
DependencyManager
|
||||
)
|
||||
from galaxy.tools.deps.requirements import ToolRequirement
|
||||
from galaxy.tools.deps.resolvers.conda import CondaDependencyResolver
|
||||
from galaxy.tool_util.deps.requirements import ToolRequirement
|
||||
from galaxy.tool_util.deps.resolvers.conda import CondaDependencyResolver
|
||||
|
||||
|
||||
def skip_unless_environ(var):
|
||||
|
||||
@@ -12,6 +12,7 @@ from galaxy.model import (
|
||||
JobParameter,
|
||||
JobToInputDatasetAssociation
|
||||
)
|
||||
from galaxy.tool_util.parser.output_objects import ToolOutput
|
||||
from galaxy.tools.evaluation import ToolEvaluator
|
||||
# For MockTool
|
||||
from galaxy.tools.parameters import params_from_strings
|
||||
@@ -25,7 +26,6 @@ from galaxy.tools.parameters.grouping import (
|
||||
ConditionalWhen,
|
||||
Repeat
|
||||
)
|
||||
from galaxy.tools.parser.output_objects import ToolOutput
|
||||
from galaxy.util.bunch import Bunch
|
||||
# Test fixtures for Galaxy infrastructure.
|
||||
from ..tools_support import UsesApp
|
||||
|
||||
@@ -5,7 +5,8 @@ import tempfile
|
||||
import unittest
|
||||
from math import isinf
|
||||
|
||||
from galaxy.tools.parser.factory import get_tool_source
|
||||
from galaxy.tool_util.parser.factory import get_tool_source
|
||||
from galaxy.util import galaxy_directory
|
||||
|
||||
|
||||
TOOL_XML_1 = """
|
||||
@@ -521,7 +522,7 @@ class DataSourceLoaderTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class ApplyRulesToolLoaderTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "lib/galaxy/tools/apply_rules.xml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "lib/galaxy/tools/apply_rules.xml")
|
||||
source_contents = None
|
||||
|
||||
def test_tool_type(self):
|
||||
@@ -537,7 +538,7 @@ class ApplyRulesToolLoaderTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class BuildListToolLoaderTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "lib/galaxy/tools/build_list.xml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "lib/galaxy/tools/build_list.xml")
|
||||
source_contents = None
|
||||
|
||||
def test_tool_type(self):
|
||||
@@ -547,7 +548,7 @@ class BuildListToolLoaderTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class SpecialToolLoaderTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "lib/galaxy/tools/imp_exp/exp_history_to_archive.xml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "lib/galaxy/tools/imp_exp/exp_history_to_archive.xml")
|
||||
source_contents = None
|
||||
|
||||
def test_tool_type(self):
|
||||
@@ -572,7 +573,7 @@ class SpecialToolLoaderTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class CollectionTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "test/functional/tools/collection_two_paired.xml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "test/functional/tools/collection_two_paired.xml")
|
||||
source_contents = None
|
||||
|
||||
def test_tests(self):
|
||||
@@ -586,7 +587,7 @@ class CollectionTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class CollectionOutputXmlTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "test/functional/tools/collection_creates_pair.xml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "test/functional/tools/collection_creates_pair.xml")
|
||||
source_contents = None
|
||||
|
||||
def test_tests(self):
|
||||
@@ -595,7 +596,7 @@ class CollectionOutputXmlTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class CollectionOutputYamlTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "test/functional/tools/collection_creates_pair_y.yml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "test/functional/tools/collection_creates_pair_y.yml")
|
||||
source_contents = None
|
||||
|
||||
def test_tests(self):
|
||||
@@ -604,7 +605,7 @@ class CollectionOutputYamlTestCase(BaseLoaderTestCase):
|
||||
|
||||
|
||||
class ExpectationsTestCase(BaseLoaderTestCase):
|
||||
source_file_name = os.path.join(os.getcwd(), "test/functional/tools/detect_errors.xml")
|
||||
source_file_name = os.path.join(galaxy_directory(), "test/functional/tools/detect_errors.xml")
|
||||
source_contents = None
|
||||
|
||||
def test_tests(self):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from galaxy.model import tool_shed_install
|
||||
from galaxy.tools.deps import (
|
||||
from galaxy.tool_util.deps import (
|
||||
dependencies,
|
||||
requirements
|
||||
)
|
||||
|
||||
@@ -12,15 +12,15 @@ from shutil import rmtree
|
||||
from stat import S_IXUSR
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
from galaxy.tools.deps import DependencyManager
|
||||
from galaxy.tools.deps.requirements import (
|
||||
from galaxy.tool_util.deps import DependencyManager
|
||||
from galaxy.tool_util.deps.requirements import (
|
||||
ToolRequirement,
|
||||
ToolRequirements
|
||||
)
|
||||
from galaxy.tools.deps.resolvers import NullDependency
|
||||
from galaxy.tools.deps.resolvers.galaxy_packages import GalaxyPackageDependency
|
||||
from galaxy.tools.deps.resolvers.lmod import LmodDependency, LmodDependencyResolver
|
||||
from galaxy.tools.deps.resolvers.modules import ModuleDependency, ModuleDependencyResolver
|
||||
from galaxy.tool_util.deps.resolvers import NullDependency
|
||||
from galaxy.tool_util.deps.resolvers.galaxy_packages import GalaxyPackageDependency
|
||||
from galaxy.tool_util.deps.resolvers.lmod import LmodDependency, LmodDependencyResolver
|
||||
from galaxy.tool_util.deps.resolvers.modules import ModuleDependency, ModuleDependencyResolver
|
||||
from galaxy.util.bunch import Bunch
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from shutil import rmtree
|
||||
from string import Template
|
||||
from tempfile import mkdtemp
|
||||
|
||||
from galaxy.tools.loader import load_tool, template_macro_params
|
||||
from galaxy.tool_util.loader import load_tool, template_macro_params
|
||||
from galaxy.util import parse_xml
|
||||
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ from collections import defaultdict
|
||||
|
||||
import galaxy.datatypes.registry
|
||||
import galaxy.model
|
||||
from galaxy.tool_util.parser import get_tool_source
|
||||
from galaxy.tools import create_tool_from_source
|
||||
from galaxy.tools.parser import get_tool_source
|
||||
from galaxy.util.bunch import Bunch
|
||||
from .unittest_utils import galaxy_mock
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from galaxy.datatypes import registry
|
||||
from galaxy.jobs.manager import NoopManager
|
||||
from galaxy.model import mapping, tags
|
||||
from galaxy.security import idencoding
|
||||
from galaxy.tools.deps.containers import NullContainerFinder
|
||||
from galaxy.tool_util.deps.containers import NullContainerFinder
|
||||
from galaxy.util.bunch import Bunch
|
||||
from galaxy.util.dbkeys import GenomeBuilds
|
||||
from galaxy.web.stack import ApplicationStack
|
||||
|
||||
Reference in New Issue
Block a user