Skip to content
Commits on Source (6)
*.pyc
*.egg-info
.tox
dist
build
_build
doc/hosted_site.cmd
.ruffus_history.sqlite
ruffus_development.*
\ No newline at end of file
[submodule "doc/sphinx_rtd_theme"]
path = doc/sphinx_rtd_theme
url = https://github.com/bunbun/sphinx_rtd_theme.git
.*\.pyc$
^nested_dict.egg-info/.+
^dist
_build$
doc/hosted_site.cmd
^.tox
^.ruffus_history.sqlite$
language: python
# all python versions tested via pip in tox
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
before_install:
install: python setup.py install
script: cd ruffus/test && /bin/bash run_all_unit_tests.cmd
sudo: false
This diff is collapsed.
include *.TXT
recursive-include doc *
recursive-include ruffus *.py
include ruffus/test/run_all_unit_tests.cmd
include ruffus/test/run_all_unit_tests3.cmd
include README.rst
Metadata-Version: 1.1
Name: ruffus
Version: 2.6.3
Summary: Light-weight Python Computational Pipeline Management
Home-page: http://www.ruffus.org.uk
Author: Leo Goodstadt
Author-email: ruffus_lib@llew.org.uk
License: MIT
Download-URL: https://pypi.python.org/pypi/ruffus
Description:
***************************************
Overview
***************************************
The Ruffus module is a lightweight way to add support
for running computational pipelines.
Computational pipelines are often conceptually quite simple, especially
if we breakdown the process into simple stages, or separate **tasks**.
Each stage or **task** in a computational pipeline is represented by a python function
Each python function can be called in parallel to run multiple **jobs**.
Ruffus was originally designed for use in bioinformatics to analyse multiple genome
data sets.
***************************************
Documentation
***************************************
Ruffus documentation can be found `here <http://www.ruffus.org.uk>`__ ,
with `download notes <http://www.ruffus.org.uk/installation.html>`__ ,
a `tutorial <http://www.ruffus.org.uk/tutorials/new_tutorial/introduction.html>`__ and
an `in-depth manual <http://www.ruffus.org.uk/tutorials/new_tutorial/manual_contents.html>`__ .
***************************************
Background
***************************************
The purpose of a pipeline is to determine automatically which parts of a multi-stage
process needs to be run and in what order in order to reach an objective ("targets")
Computational pipelines, especially for analysing large scientific datasets are
in widespread use.
However, even a conceptually simple series of steps can be difficult to set up and
maintain.
***************************************
Design
***************************************
The ruffus module has the following design goals:
* Lightweight
* Scalable / Flexible / Powerful
* Standard Python
* Unintrusive
* As simple as possible
***************************************
Features
***************************************
Automatic support for
* Managing dependencies
* Parallel jobs, including dispatching work to computational clusters
* Re-starting from arbitrary points, especially after errors (checkpointing)
* Display of the pipeline as a flowchart
* Managing complex pipeline topologies
***************************************
A Simple example
***************************************
Use the **@follows(...)** python decorator before the function definitions::
from ruffus import *
import sys
def first_task():
print "First task"
@follows(first_task)
def second_task():
print "Second task"
@follows(second_task)
def final_task():
print "Final task"
the ``@follows`` decorator indicate that the ``first_task`` function precedes ``second_task`` in
the pipeline.
The canonical Ruffus decorator is ``@transform`` which **transforms** data flowing down a
computational pipeline from one stage to teh next.
********
Usage
********
Each stage or **task** in a computational pipeline is represented by a python function
Each python function can be called in parallel to run multiple **jobs**.
1. Import module::
import ruffus
1. Annotate functions with python decorators
2. Print dependency graph if you necessary
- For a graphical flowchart in ``jpg``, ``svg``, ``dot``, ``png``, ``ps``, ``gif`` formats::
pipeline_printout_graph ("flowchart.svg")
This requires ``dot`` to be installed
- For a text printout of all jobs ::
pipeline_printout(sys.stdout)
3. Run the pipeline::
pipeline_run()
Keywords: make task pipeline parallel bioinformatics science
Platform: UNKNOWN
Classifier: Intended Audience :: End Users/Desktop
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries
Classifier: Environment :: Console
python-ruffus (2.7-1) UNRELEASED; urgency=medium
* New upstream version
Closes: #903531
* Standards-Version: 4.1.5
* Build-Depends: python3-sphinx-rtd-theme
-- Andreas Tille <tille@debian.org> Wed, 11 Jul 2018 11:21:00 +0200
python-ruffus (2.6.3+dfsg-5) unstable; urgency=medium
* Testsuite: autopkgtest-pkg-python
......
......@@ -11,8 +11,9 @@ Build-Depends: debhelper (>= 11~),
python3-all,
python3-setuptools,
python3-sphinx,
python3-sphinx-rtd-theme,
graphviz
Standards-Version: 4.1.4
Standards-Version: 4.1.5
Vcs-Browser: https://salsa.debian.org/med-team/python-ruffus
Vcs-Git: https://salsa.debian.org/med-team/python-ruffus.git
Homepage: http://www.ruffus.org.uk/
......
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 13 Mar 2015 11:00:09 +0100
Description: replace failed test from upstream Git where it is fixed
--- a/ruffus/test/test_file_name_parameters.py
+++ b/ruffus/test/test_file_name_parameters.py
@@ -1613,3 +1613,4 @@ class Test_product_param_factory(unittes
if __name__ == '__main__':
unittest.main()
+
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 15 Jan 2016 10:08:16 +0100
Bug-Debian: https://bugs.debian.org/811002
Description: Fix issue in test suite when using Python 3.5
See https://lists.debian.org/debian-python/2016/01/msg00060.html
--- a/ruffus/test/test_ruffus_utility.py
+++ b/ruffus/test/test_ruffus_utility.py
@@ -259,7 +259,8 @@ class Test_compile_regex (unittest.TestC
try:
compile_regex("Dummy Task", regex(".*)"), Exception, "test1")
except Exception as e:
- self.assertEqual(e.args, ('Dummy Task', "test1: regular expression regex('.*)') is malformed\n[sre_constants.error: (unbalanced parenthesis)]"))
+ self.assertEqual(e.args[0], 'Dummy Task')
+ self.assertIn("test1: regular expression regex('.*)') is malformed\n[sre_constants.error: (unbalanced parenthesis", e.args[1])
# bad number of items regex
self.assertRaises(Exception, compile_regex, "Dummy Task", regex(".*", "o"), Exception, "test1")
fix_test.patch
python-3.5.patch
use_libjs-mathjax.patch
sphinx.ext.pngmath_deprecated.patch
use_png_instead_of_jpg.patch
......@@ -5,7 +5,7 @@ Description: Fix sphinx.ext.mathjax: other math package is already loaded
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -30,7 +30,7 @@ import ruffus, ruffus.task, ruffus.ruffu
@@ -36,7 +36,7 @@ def setup(app):
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
......
......@@ -4,7 +4,7 @@ Description: Use Debian packaged mathjax
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -32,6 +32,8 @@ import ruffus, ruffus.task, ruffus.ruffu
@@ -38,6 +38,8 @@ def setup(app):
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo',
'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
......
......@@ -5,7 +5,7 @@ Description: Create PNG instead of JPG to work around bug #827806
--- a/doc/pipeline_functions.rst
+++ b/doc/pipeline_functions.rst
@@ -455,7 +455,7 @@ Pipeline functions
@@ -460,7 +460,7 @@ Ruffus Functions
**Example**:
::
......@@ -16,7 +16,7 @@ Description: Create PNG instead of JPG to work around bug #827806
--- a/ruffus/task.py
+++ b/ruffus/task.py
@@ -4572,7 +4572,7 @@ def pipeline_printout_graph(stream,
@@ -4573,7 +4573,7 @@ def pipeline_printout_graph(stream,
:param stream: where to print to
:type stream: file-like object with ``write()`` function
......
......@@ -17,6 +17,12 @@ print sys.path
import ruffus, ruffus.task, ruffus.ruffus_version
def setup(app):
#app.add_javascript("custom.js")
if not on_rtd:
app.add_stylesheet("ruffus.css")
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
......@@ -46,7 +52,7 @@ master_doc = 'contents'
# General information about the project.
project = u'ruffus'
copyright = u'2009-2013 Leo Goodstadt'
copyright = u'2009-2015 Leo Goodstadt'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -72,7 +78,7 @@ print version, release
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = ['_build', "sphinx_rtd_theme"]
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
......@@ -105,36 +111,39 @@ pygments_style = 'sphinx'
# given in html_static_path.
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:
html_style = 'ruffus.css'
#if not on_rtd:
# html_style = 'ruffus.css'
#html_style = 'ruffus.css'
# a list of builtin themes.
html_theme = 'default'
if not on_rtd:
# a list of builtin themes.
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_path = ["sphinx_rtd_theme"]
#html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
html_short_title = "Ruffus " + version
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
#html_logo = "images/logo64.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
html_favicon = "static_data/favicon32.ico"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
......
......@@ -5,182 +5,53 @@
==========================================
Start Here:
==========================================
.. toctree::
:maxdepth: 2
installation.rst
tutorials/new_tutorial/manual_contents.rst
tutorials/new_tutorial/introduction.rst
tutorials/new_tutorial/transform.rst
tutorials/new_tutorial/transform_in_parallel.rst
tutorials/new_tutorial/originate.rst
tutorials/new_tutorial/pipeline_printout.rst
tutorials/new_tutorial/command_line.rst
tutorials/new_tutorial/pipeline_printout_graph.rst
tutorials/new_tutorial/output_file_names.rst
tutorials/new_tutorial/mkdir.rst
tutorials/new_tutorial/checkpointing.rst
tutorials/new_tutorial/decorators_compendium.rst
tutorials/new_tutorial/split.rst
tutorials/new_tutorial/merge.rst
tutorials/new_tutorial/multiprocessing.rst
tutorials/new_tutorial/logging.rst
tutorials/new_tutorial/subdivide_collate.rst
tutorials/new_tutorial/combinatorics.rst
tutorials/new_tutorial/active_if.rst
tutorials/new_tutorial/posttask.rst
tutorials/new_tutorial/inputs.rst
tutorials/new_tutorial/onthefly.rst
tutorials/new_tutorial/parallel.rst
tutorials/new_tutorial/check_if_uptodate.rst
tutorials/new_tutorial/flowchart_colours.rst
tutorials/new_tutorial/dependencies.rst
tutorials/new_tutorial/exceptions.rst
tutorials/new_tutorial/list_of_ruffus_names.rst
tutorials/new_tutorial/deprecated_files.rst
tutorials/new_tutorial/deprecated_files_re.rst
Example code for:
.. toctree::
:titlesonly:
:maxdepth: 1
:caption: Introduction
:name: introduction_toc
tutorials/new_tutorial/introduction_code.rst
tutorials/new_tutorial/transform_code.rst
tutorials/new_tutorial/transform_in_parallel_code.rst
tutorials/new_tutorial/originate_code.rst
tutorials/new_tutorial/pipeline_printout_code.rst
tutorials/new_tutorial/pipeline_printout_graph_code.rst
tutorials/new_tutorial/output_file_names_code.rst
tutorials/new_tutorial/mkdir_code.rst
tutorials/new_tutorial/checkpointing_code.rst
tutorials/new_tutorial/split_code.rst
tutorials/new_tutorial/merge_code.rst
tutorials/new_tutorial/multiprocessing_code.rst
tutorials/new_tutorial/logging_code.rst
tutorials/new_tutorial/subdivide_collate_code.rst
tutorials/new_tutorial/combinatorics_code.rst
tutorials/new_tutorial/inputs_code.rst
tutorials/new_tutorial/onthefly_code.rst
tutorials/new_tutorial/flowchart_colours_code.rst
=====================
Overview:
=====================
.. toctree::
:maxdepth: 2
cheatsheet.rst
pipeline_functions.rst
drmaa_wrapper_functions.rst
installation.rst
design.rst
Bugs and Updates <history>
history.rst
tutorials/new_syntax.rst
tutorials/new_syntax_worked_example.rst
tutorials/new_syntax_worked_example_code.rst
Future plans <todo>
Implementation_notes <implementation_notes.rst>
faq.rst
glossary.rst
gallery.rst
why_ruffus.rst
=====================
Examples
=====================
.. toctree::
:maxdepth: 2
examples/bioinformatics/index.rst
examples/bioinformatics/part2.rst
examples/bioinformatics/part1_code.rst
examples/bioinformatics/part2_code.rst
examples/paired_end_data.py.rst
tutorials/new_tutorial/manual_contents.rst
=====================
Reference:
Quick Reference:
=====================
######################
Decorators
######################
.. toctree::
:maxdepth: 1
:caption: Reference
:name: reference_toc
pipeline_functions.rst
decorators/decorators.rst
decorators/indicator_objects.rst
.. topic::
Core
.. toctree::
:maxdepth: 1
decorators/originate.rst
decorators/split.rst
decorators/transform.rst
decorators/merge.rst
.. topic::
For advanced users
.. toctree::
:maxdepth: 1
decorators/subdivide.rst
decorators/transform_ex.rst
decorators/collate.rst
decorators/collate_ex.rst
decorators/graphviz.rst
decorators/mkdir.rst
decorators/jobs_limit.rst
decorators/posttask.rst
decorators/active_if.rst
decorators/follows.rst
.. topic::
Combinatorics
.. toctree::
:maxdepth: 1
decorators/product.rst
decorators/permutations.rst
decorators/combinations.rst
decorators/combinations_with_replacement.rst
.. topic::
Esoteric
.. toctree::
:maxdepth: 1
decorators/files_ex.rst
decorators/check_if_uptodate.rst
decorators/parallel.rst
.. topic::
Deprecated
.. toctree::
:maxdepth: 2
:hidden:
.. toctree::
:maxdepth: 1
design.rst
Implementation_notes <implementation_notes.rst>
cheatsheet.rst
glossary.rst
decorators/files.rst
decorators/files_re.rst
######################
Modules:
######################
.. toctree::
:maxdepth: 2
:hidden:
task.rst
proxy_logger.rst
......
......@@ -10,7 +10,7 @@
############
@active_if
active_if
############
.. Comment. These are parameter names
......@@ -71,9 +71,10 @@
Produces the following output:
.. code-block:: pycon
:emphasize-lines: 1,13
:emphasize-lines: 1,2,14,15
>>> # @active_if switches off task "this_task_might_be_inactive" because run_if_true_2 == False
>>> # @active_if switches off task "this_task_might_be_inactive"
>>> # because run_if_true_2 == False
>>> pipeline_run(verbose = 3)
Task enters queue = create_files
......@@ -85,7 +86,8 @@
Completed Task = create_files
Inactive Task = this_task_might_be_inactive
>>> # @active_if switches on task "this_task_might_be_inactive" because all run_if_true conditions are met
>>> # @active_if switches on task "this_task_might_be_inactive"
>>> # because all run_if_true conditions are met
>>> run_if_true_2 = True
>>> pipeline_run(verbose = 3)
......