Better default configuration of Galaxy test data directory.

This commit is contained in:
John Chilton
2018-03-06 20:07:52 -05:00
parent db6dafac07
commit e7f7759cc2
6 changed files with 43 additions and 3 deletions
+9
View File
@@ -1167,6 +1167,15 @@ galaxy:
# Set maximum size of ngrams
#tool_ngram_maxsize: 4
# Set tool test data directory. The test framework sets this value to
# 'test-data,https://github.com/galaxyproject/galaxy-test-data.git'
# which will cause Galaxy to clone down extra test data on the fly for
# certain tools distributed with Galaxy but this is likely not
# appropriate for production systems. Instead one can simply clone
# that repository directly and specify a path here instead of a Git
# HTTP repository.
#tool_test_data_directories: test-data
# Galaxy encodes various internal values when these values will be
# output in some format (for example, in a URL or cookie). You should
# set a key to be used by the algorithm that encodes and decodes these
+16
View File
@@ -2439,6 +2439,22 @@
:Type: int
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``tool_test_data_directories``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Description:
Set tool test data directory. The test framework sets this value
to 'test-data,https://github.com/galaxyproject/galaxy-test-
data.git' which will cause Galaxy to clone down extra test data on
the fly for certain tools distributed with Galaxy but this is
likely not appropriate for production systems. Instead one can
simply clone that repository directly and specify a path here
instead of a Git HTTP repository.
:Default: ``test-data``
:Type: str
~~~~~~~~~~~~~
``id_secret``
~~~~~~~~~~~~~
+1 -1
View File
@@ -95,7 +95,7 @@ class UniverseApplication(config.ConfiguresGalaxyMixin):
self.dataset_collections_service = DatasetCollectionManager(self)
self.history_manager = HistoryManager(self)
self.dependency_resolvers_view = DependencyResolversView(self)
self.test_data_resolver = test_data.TestDataResolver()
self.test_data_resolver = test_data.TestDataResolver(file_dirs=getattr(self.config, "tool_test_data_directories", None))
# Tool Data Tables
self._configure_tool_data_tables(from_shed_config=False)
+2
View File
@@ -462,6 +462,8 @@ class Configuration(object):
self.tool_enable_ngram_search = kwargs.get("tool_enable_ngram_search", False)
self.tool_ngram_minsize = kwargs.get("tool_ngram_minsize", 3)
self.tool_ngram_maxsize = kwargs.get("tool_ngram_maxsize", 4)
default_tool_test_data_directories = os.environ.get("GALAXY_TEST_FILE_DIR", resolve_path("test-data", self.root))
self.tool_test_data_directories = kwargs.get("tool_test_data_directories", default_tool_test_data_directories)
# Location for tool dependencies.
use_tool_dependencies, tool_dependency_dir, use_cached_dependency_manager, tool_dependency_cache_dir, precache_dependencies = \
parse_dependency_options(kwargs, self.root, self.dependency_resolvers_config_file)
+3 -2
View File
@@ -27,8 +27,9 @@ LIST_SEP = re.compile("\s*,\s*")
class TestDataResolver(object):
def __init__(self, env_var='GALAXY_TEST_FILE_DIR', environ=os.environ):
file_dirs = environ.get(env_var, None)
def __init__(self, file_dirs=None, env_var='GALAXY_TEST_FILE_DIR', environ=os.environ):
if file_dirs is None:
file_dirs = environ.get(env_var, None)
if file_dirs is None:
file_dirs = "test-data,https://github.com/galaxyproject/galaxy-test-data.git"
if file_dirs:
@@ -1817,6 +1817,18 @@ mapping:
desc: |
Set maximum size of ngrams
tool_test_data_directories:
type: str
default: 'test-data'
required: false
desc: |
Set tool test data directory. The test framework sets this value to
'test-data,https://github.com/galaxyproject/galaxy-test-data.git' which will
cause Galaxy to clone down extra test data on the fly for certain tools
distributed with Galaxy but this is likely not appropriate for production systems.
Instead one can simply clone that repository directly and specify a path here
instead of a Git HTTP repository.
id_secret:
type: str
default: USING THE DEFAULT IS NOT SECURE!