Skip to content

Commit

Permalink
fix bad merge and run black and isort
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbray committed May 27, 2022
1 parent dfc7683 commit 74b0ba0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion planemo/engine/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _register_job_data(job_data):
interactor.VERBOSE_GALAXY_ERRORS = True

# on an external Galaxy it makes sense to keep test histories
no_history_cleanup = config._kwds.get('engine') == 'external_galaxy'
no_history_cleanup = config._kwds.get("engine") == "external_galaxy"

interactor.verify_tool(
tool_id,
Expand Down
10 changes: 5 additions & 5 deletions planemo/engine/test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os

from planemo.engine import engine_context
from planemo.galaxy import galaxy_config
from planemo.galaxy import galaxy_serve
from planemo.galaxy.api import (
DEFAULT_ADMIN_API_KEY
from planemo.galaxy import (
galaxy_config,
galaxy_serve,
)
from planemo.galaxy.api import DEFAULT_ADMIN_API_KEY
from planemo.galaxy.config import _find_test_data
from planemo.galaxy.ephemeris_sleep import sleep
from planemo.galaxy.test import (
Expand All @@ -24,7 +24,7 @@ def test_runnables(ctx, runnables, original_paths=None, **kwds):
if kwds.get("serve"):
if "galaxy" not in kwds["engine"]:
raise ValueError("The serve option is only supported by Galaxy-based engines.")
kwds["galaxy_url"] = kwds["galaxy_url"] or ''.join(("http://", kwds["host"], ":", str(kwds["port"])))
kwds["galaxy_url"] = kwds["galaxy_url"] or "".join(("http://", kwds["host"], ":", str(kwds["port"])))
kwds["galaxy_admin_key"] = kwds["galaxy_admin_key"] or DEFAULT_ADMIN_API_KEY
pid = os.fork()
if pid == 0:
Expand Down
4 changes: 3 additions & 1 deletion planemo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,9 @@ def serve_option():
"--serve",
is_flag=True,
default=False,
help=("Continue serving Galaxy instance after testing. Like the serve command itself, this is only compatible with Galaxy-based engines.")
help=(
"Continue serving Galaxy instance after testing. Like the serve command itself, this is only compatible with Galaxy-based engines."
),
)


Expand Down
2 changes: 1 addition & 1 deletion planemo/runnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def flatten_to_single_artifacts(runnables):
if runnable.type.is_single_artifact:
single_runnables.append(runnable)
else:
paths = glob.glob(f'{runnable.path}/*')
paths = glob.glob(f"{runnable.path}/*")
for path in paths:
if os.path.isdir(path):
continue
Expand Down
8 changes: 5 additions & 3 deletions tests/test_cmd_serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ def test_workflow_test_with_serve(self):
extra_args = [
"--serve",
test_artifact,
"--port", str(self._port),
"--port",
str(self._port),
"--no_dependency_resolution",
"--extra_tools", cat,
"--extra_tools",
cat,
]
self._launch_thread_and_wait(self._run_test, extra_args)
time.sleep(30)
Expand All @@ -184,7 +186,7 @@ def test_workflow_test_with_serve(self):
user_gi = self._user_gi
workflows = user_gi.workflows.get_workflows()
assert len(workflows) == 1
assert workflows[0]['name'] == 'TestWorkflow1'
assert workflows[0]["name"] == "TestWorkflow1"
histories = user_gi.histories.get_histories(name="CWL Target History")
assert len(histories) == 1

Expand Down
5 changes: 0 additions & 5 deletions tests/test_galaxy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,8 @@ def test_refgenie_config_version():
version_path = os.path.join(galaxy_lib_path, "version.py")
with open(version_path, "w") as version_fh:
version_fh.write('VERSION_MAJOR = "21.05"')
<<<<<<< HEAD
refgenie_config = get_refgenie_config(galaxy_root=tdc.temp_directory, refgenie_dir='/')
assert yaml.load(refgenie_config, Loader=yaml.SafeLoader)['config_version'] == 0.3
=======
refgenie_config = get_refgenie_config(galaxy_root=tdc.temp_directory, refgenie_dir="/")
assert yaml.load(refgenie_config, Loader=yaml.SafeLoader)["config_version"] == 0.3
>>>>>>> upstream/master


def _assert_property_is(config, prop, value):
Expand Down

0 comments on commit 74b0ba0

Please sign in to comment.