diff --git a/docs/_writing_conda_new.rst b/docs/_writing_conda_new.rst index dbdab981f..0fd0689ff 100644 --- a/docs/_writing_conda_new.rst +++ b/docs/_writing_conda_new.rst @@ -53,4 +53,4 @@ Exercise - Build a Recipe ---------------------------------------------------------------- If you have just completed the exercise above - this exercise can be found in parent folder. Get -there with ``cd ../exercise2``. If not, the exercise can be downloaded with +there with ``cd ../exercise_2``. If not, the exercise can be downloaded with diff --git a/docs/_writing_dependencies_conda.rst b/docs/_writing_dependencies_conda.rst index 971f91676..f3235ae85 100644 --- a/docs/_writing_dependencies_conda.rst +++ b/docs/_writing_dependencies_conda.rst @@ -200,8 +200,8 @@ Use the ``project_init`` command to download this exercise. :: $ planemo project_init --template conda_exercises conda_exercises - $ cd conda_exercises/exercise1 - $ ls + $ cd conda_exercises/exercise_1 + $ ls pear.xml test-data This project template contains a few exercises. The first uses an adapted @@ -226,19 +226,18 @@ no ``requirement`` tags and so will not work properly. :: $ planemo project_init --template conda_exercises conda_exercises - $ cd conda_exercises/exercise2 - $ ls + $ cd conda_exercises/exercise_2 + $ ls fleeqtk_seq.xml test-data .. include:: _writing_conda_fleeqtk.rst 1. Clone and branch Bioconda_. -2. Build a recipe for fleeqtk version 1.3. You may wish to use ``conda skeleton``, start from - scratch, or copy the recipe of seqtk and work from there - any of these strategies should work. +2. Build a recipe for fleeqtk version 1.3. You may wish to start from scratch + (``conda skeleton`` is not available for C programs like fleeqtk), or copy + the recipe of seqtk and modify it for fleeqtk. 3. Use ``conda build`` or Bioconda tooling to build the recipe. -4. Run ``planemo conda_install --conda_use_local fleeqtk_seq.xml`` to verify the resulting package - can be built into a Galaxy environment. -5. Run ``planemo test fleeqtk_seq.xml`` to verify the resulting package works as expected. +4. Run ``planemo test --conda_use_local fleeqtk_seq.xml`` to verify the resulting package works as expected. .. note: The planemo flag ``--conda_use_local`` causes Planemo to use locally built packages during dependency resolution and related commands. diff --git a/docs/_writing_dependencies_conda_cwl.rst b/docs/_writing_dependencies_conda_cwl.rst index a8d1e2fc9..7586e9879 100644 --- a/docs/_writing_dependencies_conda_cwl.rst +++ b/docs/_writing_dependencies_conda_cwl.rst @@ -77,7 +77,7 @@ listed requirements are found. We can verify these tool requirements install with the ``conda_install`` command. With its default parameters ``conda_install`` processes tools and creates isolated environments -for their declared `Software Requirements`_ (mirroring what can be done in production with +for their declared `Software Requirements`_ (mirroring what can be done in production with cwltool_ and Toil_). :: @@ -178,7 +178,7 @@ demonstrating using this tool. All 1 test(s) executed passed. seqtk_seq_0: passed -Since ``seqtk`` isn't on the path and we did not use a container, we can see the SoftwareRequirement +Since ``seqtk`` isn't on the path and we did not use a container, we can see the SoftwareRequirement resolution was successful and it found the environment we previously installed with ``conda_install``. This can be used outside of Planemo testing as well, the following invocation shows running a job @@ -370,8 +370,8 @@ Use the ``project_init`` command to download this exercise. :: $ planemo project_init --template conda_exercises_cwl conda_exercises - $ cd conda_exercises/exercise1 - $ ls + $ cd conda_exercises/exercise_1 + $ ls pear.cwl test-data This project template contains a few exercises. The first uses a CWL tool for @@ -397,19 +397,18 @@ not work properly without modification. :: $ planemo project_init --template conda_exercises_cwl conda_exercises - $ cd conda_exercises/exercise2 - $ ls + $ cd conda_exercises/exercise_2 + $ ls fleeqtk_seq.cwl fleeqtk_seq_tests.yml test-data .. include:: _writing_conda_fleeqtk.rst 1. Clone and branch Bioconda_. -2. Build a recipe for fleeqtk version 1.3. You may wish to use ``conda skeleton``, start from - scratch, or copy the recipe of seqtk and work from there - any of these strategies should work. +2. Build a recipe for fleeqtk version 1.3. You may wish to start from scratch + (``conda skeleton`` is not available for C programs like fleeqtk), or copy + the recipe of seqtk and modify it for fleeqtk. 3. Use ``conda build`` or Bioconda tooling to build the recipe. -4. Run ``planemo conda_install --conda_use_local fleeqtk_seq.cwl`` to verify the resulting package - can be built into a Galaxy environment. -5. Run ``planemo test fleeqtk_seq.cwl`` to verify the resulting package works as expected. +4. Run ``planemo test --conda_use_local fleeqtk_seq.cwl`` to verify the resulting package works as expected. .. note: The planemo flag ``--conda_use_local`` causes Planemo to use locally built packages during dependency resolution and related commands. diff --git a/docs/_writing_multiple_outputs.rst b/docs/_writing_multiple_outputs.rst index d334e3c89..b8f26d6d4 100644 --- a/docs/_writing_multiple_outputs.rst +++ b/docs/_writing_multiple_outputs.rst @@ -166,7 +166,7 @@ Consider a tool that creates a bunch of text files or bam files and writes them .. code-block:: xml - + @@ -178,8 +178,8 @@ If the tool doesn't create the files in ``split`` with extensions or does but wi .. code-block:: xml - - + + @@ -190,8 +190,8 @@ It may not be desirable for the extension/format (``.tsv``) to appear in the ``d .. code-block:: xml - - + + diff --git a/docs/tests/tests_conda.sh b/docs/tests/tests_conda.sh index 28f738040..5cf15d02f 100644 --- a/docs/tests/tests_conda.sh +++ b/docs/tests/tests_conda.sh @@ -89,5 +89,4 @@ conda build fleeqtk # Update to fix tool and see it work. wget https://raw.githubusercontent.com/galaxyproject/planemo/master/project_templates/conda_answers/exercise_2/fleeqtk_seq.xml -O fleeqtk_seq.xml -planemo conda_install --conda_use_local fleeqtk_seq.xml -planemo test fleeqtk_seq.xml +planemo test --conda_use_local fleeqtk_seq.xml diff --git a/docs/tests/tests_conda_cwl.sh b/docs/tests/tests_conda_cwl.sh index 2d6724714..859167f6b 100644 --- a/docs/tests/tests_conda_cwl.sh +++ b/docs/tests/tests_conda_cwl.sh @@ -83,5 +83,4 @@ conda build fleeqtk # Update to fix tool and see it work. wget https://raw.githubusercontent.com/galaxyproject/planemo/master/project_templates/conda_answers_cwl/exercise_2/fleeqtk_seq.cwl -O fleeqtk_seq.cwl -planemo conda_install --conda_use_local fleeqtk_seq.cwl -planemo test --no-container fleeqtk_seq.cwl +planemo test --conda_use_local --no-container fleeqtk_seq.cwl diff --git a/planemo/deps.py b/planemo/deps.py index fa4b07107..2e608129f 100644 --- a/planemo/deps.py +++ b/planemo/deps.py @@ -64,6 +64,7 @@ def ensure_dependency_resolvers_conf_configured(ctx, kwds, resolvers_conf=None): 'conda_auto_init': always_specify_attribute, 'conda_auto_install': always_specify_attribute, 'conda_ensure_channels': '', + 'conda_use_local': False, } attributes = [] diff --git a/planemo/galaxy/config.py b/planemo/galaxy/config.py index 3d6338304..6bc85a55d 100644 --- a/planemo/galaxy/config.py +++ b/planemo/galaxy/config.py @@ -399,7 +399,7 @@ def config_join(*args): ) _ensure_directory(shed_tool_path) port = _get_port(kwds) - if parse_version(kwds.get('galaxy_python_version', DEFAULT_PYTHON_VERSION)) >= parse_version('3'): + if parse_version(kwds.get('galaxy_python_version') or DEFAULT_PYTHON_VERSION) >= parse_version('3'): # on python 3 we use gunicorn, # which requires 'main' as server name server_name = 'main' @@ -947,7 +947,7 @@ def startup_command(self, ctx, **kwds): run_script += " --server-name %s" % shlex_quote(self.server_name) server_ini = os.path.join(self.config_directory, "galaxy.ini") self.env["GALAXY_CONFIG_FILE"] = server_ini - if parse_version(kwds.get('galaxy_python_version', DEFAULT_PYTHON_VERSION)) >= parse_version('3'): + if parse_version(kwds.get('galaxy_python_version') or DEFAULT_PYTHON_VERSION) >= parse_version('3'): # We need to start under gunicorn self.env['APP_WEBSERVER'] = 'gunicorn' self.env['GUNICORN_CMD_ARGS'] = "--bind={host}:{port} --name={server_name}".format( diff --git a/planemo/galaxy/run.py b/planemo/galaxy/run.py index fc2fb1214..b34d2226d 100644 --- a/planemo/galaxy/run.py +++ b/planemo/galaxy/run.py @@ -58,7 +58,7 @@ def locate_galaxy_virtualenv(ctx, kwds): workspace = ctx.workspace galaxy_branch = kwds.get("galaxy_branch") or "master" shared_venv_path = os.path.join(workspace, "gx_venv") - galaxy_python_version = kwds.get('galaxy_python_version', DEFAULT_PYTHON_VERSION) + galaxy_python_version = kwds.get('galaxy_python_version') or DEFAULT_PYTHON_VERSION if galaxy_python_version != DEFAULT_PYTHON_VERSION: shared_venv_path = "%s_%s" % (shared_venv_path, galaxy_python_version) if galaxy_branch != "master": diff --git a/planemo/options.py b/planemo/options.py index 582c4486a..60d26a03b 100644 --- a/planemo/options.py +++ b/planemo/options.py @@ -133,7 +133,7 @@ def galaxy_python_version(): return planemo_option( '--galaxy_python_version', use_global_config=True, - default='2.7', + default=None, type=click.Choice(['2', '2.7', '3', '3.3', '3.4', '3.5', '3.6', '3.7']), help="Python version to start Galaxy under", ) diff --git a/project_templates/conda_exercises/exercise_2/fleeqtk_seq.xml b/project_templates/conda_exercises/exercise_2/fleeqtk_seq.xml index 64ec5d1f0..030869e93 100644 --- a/project_templates/conda_exercises/exercise_2/fleeqtk_seq.xml +++ b/project_templates/conda_exercises/exercise_2/fleeqtk_seq.xml @@ -1,4 +1,7 @@ + + fleeqtk +