Example #1
0
def prepare_templates():
    """
    Templates can probably 
    :return:
    """

    os.makedirs(templates_dir, exist_ok=True)

    templates = get_all_templates()

    for tkey, template in templates.items():
        with open(os.path.join(templates_dir, tkey + ".rst"), "w+") as f:
            f.write(prepare_template(tkey, template))

    introtext = """\

Templates
###########
    
These templates are used to configure Cromwell / CWLTool broadly. For more information, visit `Configuring Janis <https://janis.readthedocs.io/en/latest/references/configuration.html#cromwell>`__.
"""

    with open(os.path.join(templates_dir, "index.rst"), "w+") as f:
        f.write(introtext + get_toc(
            title="",
            intro_text="List of templates for ``janis-assistant``:",
            subpages=list(templates.keys()),
        ))
Example #2
0
def prepare_runner_templates():
    """
    Templates can probably 
    :return:
    """

    os.makedirs(templates_dir, exist_ok=True)

    templates = get_all_templates()

    for tkey, template in templates.items():
        with open(os.path.join(templates_dir, tkey + ".rst"), "w+") as f:
            f.write(prepare_template(tkey, template))

    introtext = """\

Templates
###########
    
This document containers the templates available to Janis by default. These are used
to configure Cromwell to execute across a number of compute environments.

Janis can be configured to submit to an existing Cromwell instance (including on GCP) with:

.. code-block:: bash

   urlwithport="127.0.0.1:8000"
   janis run --engine cromwell --cromwell-url $urlwithport hello
"""

    with open(os.path.join(templates_dir, "index.rst"), "w+") as f:
        f.write(introtext + get_toc(
            title="",
            intro_text="List of templates for ``janis-assistant``:",
            subpages=list(templates.keys()),
        ))