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
- See
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
:
Project details
Release history Release notifications | RSS feed
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.1.1.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for pipen_diagram-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24bb12df51903dc860ec22a6f98ed4ad571b218dd7ec804ecdf240a4da50d216 |
|
MD5 | 85f0c6e13751e13209157ca2c282b334 |
|
BLAKE2b-256 | 989acb88efc0af64303eae1b001628baef08c17408440689cd23e34b63de9348 |