|
16 | 16 | from galaxy.tools.deps import docker_util |
17 | 17 | from galaxy.tools.deps.commands import argv_to_str |
18 | 18 |
|
19 | | -from six import iteritems |
| 19 | +from six import ( |
| 20 | + add_metaclass, |
| 21 | + iteritems |
| 22 | +) |
20 | 23 | from six.moves.urllib.request import urlopen |
21 | 24 | from six.moves.urllib.request import urlretrieve |
22 | 25 |
|
|
79 | 82 | </toolbox> |
80 | 83 | """ |
81 | 84 |
|
| 85 | +SHED_DATA_MANAGER_CONF_TEMPLATE = """<?xml version="1.0"?> |
| 86 | +<data_managers> |
| 87 | +</data_managers> |
| 88 | +""" |
82 | 89 |
|
83 | 90 | EMPTY_JOB_METRICS_TEMPLATE = """<?xml version="1.0"?> |
84 | 91 | <job_metrics> |
@@ -281,7 +288,6 @@ def config_join(*args): |
281 | 288 |
|
282 | 289 | tool_conf = config_join("tool_conf.xml") |
283 | 290 |
|
284 | | - tool_conf = config_join("tool_conf.xml") |
285 | 291 | shed_tool_path = kwds.get("shed_tool_path") or config_join("shed_tools") |
286 | 292 | _ensure_directory(shed_tool_path) |
287 | 293 |
|
@@ -393,7 +399,8 @@ def config_join(*args): |
393 | 399 |
|
394 | 400 | tool_conf = config_join("tool_conf.xml") |
395 | 401 |
|
396 | | - tool_conf = config_join("tool_conf.xml") |
| 402 | + shed_data_manager_config_file = config_join("shed_data_manager_conf.xml") |
| 403 | + |
397 | 404 | shed_tool_path = kwds.get("shed_tool_path") or config_join("shed_tools") |
398 | 405 | _ensure_directory(shed_tool_path) |
399 | 406 |
|
@@ -461,6 +468,7 @@ def config_join(*args): |
461 | 468 | amqp_internal_connection="sqlalchemy+sqlite://", |
462 | 469 | migrated_tools_config=empty_tool_conf, |
463 | 470 | test_data_dir=test_data_dir, # TODO: make gx respect this |
| 471 | + shed_data_manager_config_file=shed_data_manager_config_file, |
464 | 472 | )) |
465 | 473 | _handle_container_resolution(ctx, kwds, properties) |
466 | 474 | write_file(config_join("logging.ini"), _sub(LOGGING_TEMPLATE, template_args)) |
@@ -502,6 +510,8 @@ def config_join(*args): |
502 | 510 | # Write a new shed_tool_conf.xml if needed. |
503 | 511 | write_file(shed_tool_conf, shed_tool_conf_contents, force=False) |
504 | 512 |
|
| 513 | + write_file(shed_data_manager_config_file, SHED_DATA_MANAGER_CONF_TEMPLATE) |
| 514 | + |
505 | 515 | pid_file = kwds.get("pid_file") or config_join("galaxy.pid") |
506 | 516 |
|
507 | 517 | yield LocalGalaxyConfig( |
@@ -578,15 +588,14 @@ def _config_directory(ctx, **kwds): |
578 | 588 | shutil.rmtree(config_directory) |
579 | 589 |
|
580 | 590 |
|
| 591 | +@add_metaclass(abc.ABCMeta) |
581 | 592 | class GalaxyConfig(object): |
582 | 593 | """Abstraction around a Galaxy instance. |
583 | 594 |
|
584 | 595 | This requires more than just an API connection and assumes access to files |
585 | 596 | etc.... |
586 | 597 | """ |
587 | 598 |
|
588 | | - __metaclass__ = abc.ABCMeta |
589 | | - |
590 | 599 | @abc.abstractproperty |
591 | 600 | def kill(self): |
592 | 601 | """Stop the running instance.""" |
@@ -1167,7 +1176,7 @@ def _build_env_for_galaxy(properties, template_args): |
1167 | 1176 |
|
1168 | 1177 |
|
1169 | 1178 | def _build_test_env(properties, env): |
1170 | | - # Keeping these environment variables around for a little while but they |
| 1179 | + # Keeping these environment variables around for a little while but |
1171 | 1180 | # many are probably not needed as of the following commit. |
1172 | 1181 | # https://bitbucket.org/galaxy/galaxy-central/commits/d7dd1f9 |
1173 | 1182 | test_property_variants = { |
|
0 commit comments