diff --git a/docs/snakefiles/deployment.rst b/docs/snakefiles/deployment.rst index e3dac0337..bc9920aa8 100644 --- a/docs/snakefiles/deployment.rst +++ b/docs/snakefiles/deployment.rst @@ -35,15 +35,18 @@ following structure: ├── results └── resources -In other words, the workflow code goes into a subfolder ``workflow``, while the configuration is stored in a subfolder ``config``. +In other words, the workflow code goes into a subfolder ``workflow``, while the configuration is stored in a subfolder ``config``. Inside of the ``workflow`` subfolder, the central ``Snakefile`` marks the entrypoint of the workflow (it will be automatically discovered when running snakemake from the root of above structure. -In addition to the central ``Snakefile``, rules can be stored in a modular way, using the optional subfolder ``workflow/rules``. Such modules should end with ``.smk`` the recommended file extension of Snakemake. +This main structure and the recommendations below are implemented in `this Snakemake workflow template `_ that you can use to `create your own workflow repository with a single click on "Use this template" _. +In addition to the central ``Snakefile``, rules can be stored in a modular way, using the optional subfolder ``workflow/rules``. +Such modules should end with ``.smk``, the recommended file extension of Snakemake. Further, :ref:`scripts ` should be stored in a subfolder ``workflow/scripts`` and notebooks in a subfolder ``workflow/notebooks``. Conda environments (see :ref:`integrated_package_management`) should be stored in a subfolder ``workflow/envs`` (make sure to keep them as finegrained as possible to improve transparency and maintainability). Finally, :ref:`report caption files ` should be stored in ``workflow/report``. -All output files generated in the workflow should be stored under ``results``, unless they are rather retrieved resources, in which case they should be stored under ``resources``. The latter subfolder may also contain small resources that shall be delivered along with the workflow via git (although it might be tempting, please refrain from trying to generate output file paths with string concatenation of a central ``outdir`` variable or so, as this hampers readability). +All output files generated in the workflow should be stored under ``results``, unless they are rather retrieved resources, in which case they should be stored under ``resources``. +The latter subfolder may also contain small resources that shall be delivered along with the workflow via git (although it might be tempting, please refrain from trying to generate output file paths with string concatenation of a central ``outdir`` variable or so, as this hampers readability). -Workflows setup in above structure can be easily used and combined via :ref:`the Snakemake module system `. +Workflows set up in above structure can be easily used and combined via :ref:`the Snakemake module system `. Such deployment can even be automated via `Snakedeploy `_. Moreover, by publishing a workflow on `Github `_ and following a set of additional `rules `_ the workflow will be automatically included in the `Snakemake workflow catalog `_, thereby easing discovery and even automating its usage documentation. For an example of such automated documentation, see `here `_. diff --git a/tests/test_io.py b/tests/test_io.py index e9d0c8254..9b6745143 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -104,11 +104,8 @@ def __repr__(self): ) == sorted(["a: aa + b: b", "a: aa + b: bb", "c: c", "c: cc"]) # expand on pathlib.Path objects - assert ( - expand( - PosixPath() / "{x}" / "{y}", - x="Hello", - y="world", - ) - == ["Hello/world"] - ) + assert expand( + PosixPath() / "{x}" / "{y}", + x="Hello", + y="world", + ) == ["Hello/world"]