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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file pipen-diagram-0.0.1.tar.gz.

File metadata

  • Download URL: pipen-diagram-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.5 Linux/4.19.128-microsoft-standard

File hashes

Hashes for pipen-diagram-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ca7fbddf468f90f5e56e44e0965e810a585bc344bb50bbd95c42d76848903087
MD5 880bbdf82584937dbdcdb7aae91c4ab8
BLAKE2b-256 63befb988eb53cb976c859f4f1c800970f6c2768d88614ecc17e2fea2fdd90de

See more details on using hashes here.

File details

Details for the file pipen_diagram-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pipen_diagram-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.5 Linux/4.19.128-microsoft-standard

File hashes

Hashes for pipen_diagram-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47d279a7f765aa12cdf8bc75ca798fdd32ce87e8069a416f10faf2cad98a5849
MD5 48dc8727a86990f42f4d202bc8659a20
BLAKE2b-256 f8175f5a2ccbb9a712b81b2b6da08aba8fdfc9ae51f6a0796e6804f84543cb0a

See more details on using hashes here.

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