From cbd4d9bcfd0321874a8fc1231196451c7e81b554 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 3 May 2024 14:50:51 +0200 Subject: [PATCH 1/4] Set dest to galaxy_skip_client_build for skip_client_build_option --- planemo/commands/cmd_serve.py | 1 - planemo/commands/cmd_shed_serve.py | 1 - planemo/options.py | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/planemo/commands/cmd_serve.py b/planemo/commands/cmd_serve.py index 5711a8c6b..b590b6bf4 100644 --- a/planemo/commands/cmd_serve.py +++ b/planemo/commands/cmd_serve.py @@ -40,6 +40,5 @@ def cli(ctx, uris, **kwds): """ paths = uris_to_paths(ctx, uris) runnables = for_paths(paths) - kwds["galaxy_skip_client_build"] = kwds.pop("skip_client_build", False) with galaxy_serve(ctx, runnables, **kwds): pass diff --git a/planemo/commands/cmd_shed_serve.py b/planemo/commands/cmd_shed_serve.py index 21d806cf1..5a0dead3f 100644 --- a/planemo/commands/cmd_shed_serve.py +++ b/planemo/commands/cmd_shed_serve.py @@ -29,7 +29,6 @@ def cli(ctx, paths, **kwds): install these artifacts, and serve a Galaxy instances that can be logged into and explored interactively. """ - kwds["galaxy_skip_client_build"] = kwds.pop("skip_client_build", False) install_args_list = kwds["install_args_list"] = shed.install_arg_lists(ctx, paths, **kwds) runnables = install_args_list_to_runnables(ctx, install_args_list, kwds) with engine_context(ctx, **kwds) as engine: diff --git a/planemo/options.py b/planemo/options.py index c17069787..da8a4ca90 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -36,7 +36,7 @@ def skip_venv_option(): def skip_client_build_option(): """Annotate click command as consume the --skip_client_build option.""" return planemo_option( - "--skip_client_build", is_flag=True, default=False, help=("Do not build Galaxy client when serving Galaxy.") + "--skip_client_build", dest="galaxy_skip_client_build", is_flag=True, default=False, help=("Do not build Galaxy client when serving Galaxy.") ) From 72d9e06e6d3f92e5166053996fa1bb5352e7b1e3 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 3 May 2024 14:51:14 +0200 Subject: [PATCH 2/4] Don't run through dependency resolution setup in ci_setup command --- planemo/commands/cmd_ci_setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/planemo/commands/cmd_ci_setup.py b/planemo/commands/cmd_ci_setup.py index 6c63a7df4..09d3ba349 100644 --- a/planemo/commands/cmd_ci_setup.py +++ b/planemo/commands/cmd_ci_setup.py @@ -17,5 +17,6 @@ def cli(ctx, **kwds): Useful for populating a CI cache. """ kwds["galaxy_skip_client_build"] = True + kwds["no_dependency_resolution"] = True with serve_daemon(ctx, **kwds): return From db20824f5ede6e161919dd16a105305e4fe86f1b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 3 May 2024 14:51:38 +0200 Subject: [PATCH 3/4] Install pre-built client by default --- planemo/galaxy/config.py | 2 ++ planemo/options.py | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/planemo/galaxy/config.py b/planemo/galaxy/config.py index caf0c768c..1704b484b 100644 --- a/planemo/galaxy/config.py +++ b/planemo/galaxy/config.py @@ -357,6 +357,8 @@ def config_join(*args): install_env = {} if kwds.get("galaxy_skip_client_build", True): install_env["GALAXY_SKIP_CLIENT_BUILD"] = "1" + elif kwds.get("galaxy_install_prebuilt_client", True): + install_env["GALAXY_INSTALL_PREBUILT_CLIENT"] = "1" if galaxy_root is None: galaxy_root = config_join("galaxy-dev") if not os.path.isdir(galaxy_root): diff --git a/planemo/options.py b/planemo/options.py index da8a4ca90..eb77fb303 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -36,7 +36,21 @@ def skip_venv_option(): def skip_client_build_option(): """Annotate click command as consume the --skip_client_build option.""" return planemo_option( - "--skip_client_build", dest="galaxy_skip_client_build", is_flag=True, default=False, help=("Do not build Galaxy client when serving Galaxy.") + "--skip_client_build", + "galaxy_skip_client_build", + is_flag=True, + default=False, + help=("Do not build Galaxy client when serving Galaxy."), + ) + + +def install_prebuilt_client_option(): + return planemo_option( + "--install_prebuilt_client/--no_install_prebuilt_client", + "galaxy_install_prebuilt_client", + is_flag=True, + default=True, + help=("Install a pre-built client from npm. Turn this off you need access to visualizations."), ) @@ -1268,6 +1282,7 @@ def galaxy_serve_options(): daemon_option(), pid_file_option(), ignore_dependency_problems_option(), + install_prebuilt_client_option(), skip_client_build_option(), shed_install_option(), ) From 6f99498536da961575c4f3c93b28c2fa87182605 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 11 Apr 2024 11:04:11 +0200 Subject: [PATCH 4/4] Ignore toil cwltool warning in lint_sphinx_output.py --- scripts/lint_sphinx_output.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/lint_sphinx_output.py b/scripts/lint_sphinx_output.py index 701479178..fe8ea002f 100644 --- a/scripts/lint_sphinx_output.py +++ b/scripts/lint_sphinx_output.py @@ -8,7 +8,7 @@ def warning_line(line): - if "WARNING" not in line: + if "WARNING" not in line or "Toil" in line: return False if "docs/tests" in line: # Doesn't actually show up in docs so don't lint. return False @@ -23,9 +23,7 @@ def main(argv=None): argv = sys.argv sphinx_output = sys.stdin.read() warning_lines = [_ for _ in sphinx_output.splitlines() if warning_line(_)] - for line in warning_lines: - print(line) - sys.exit(1 if warning_lines else 0) + sys.exit("\n".join(warning_lines) if warning_lines else 0) if __name__ == "__main__":