Skip to main content

Draw pipeline diagrams for pipen.

Project description

pipen-diagram

Draw pipeline diagrams for pipen.

Features

  • Different coloring for different roles of processes (start, end, etc)
  • Diagram theming
  • Hiding processes from diagram

Configurations

  • diagram_theme: The name of the theme to use, or a dict of a custom theme.
    • See pipen_diagram/diagram.py for the a theme definition
  • diagram_savedot: Whhether to save the dot file (for debugging purpose)
  • diagram_hide: Process-level item, whether to hide current process from the diagram

Installation

pip install -U pipen-diagram

Enabling/Disabling the plugin

The plugin is registered via entrypoints. It's by default enabled. To disable it: plugins=[..., "no:diagram"], or uninstall this plugin.

Usage

example.py

from pipen import Proc, Pipen

class Process(Proc):
    input = 'a'
    output = 'b:{{in.a}}'

class P1(Process):
    input_data = [1]

class P2(Process):
    requires = P1

class P3(Process):
    requires = P2
    plugin_opts = {"diagram_hide": True}

class P4(Process):
    requires = P3

Pipen().run(P1)

Running python example.py will generate pipen-0_results/diagram.svg:

diagram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipen-diagram-0.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

pipen_diagram-0.0.1-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page