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 details)
Built Distribution
File details
Details for the file pipen-diagram-0.1.1.tar.gz
.
File metadata
- Download URL: pipen-diagram-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ba3b7190500ba107f012f218095009267dfe94d99704e635c16c6a026056cf5 |
|
MD5 | 5e5cffccec539e4171e9f84c325609b4 |
|
BLAKE2b-256 | 3c9e93ef0954e67edd2cf3131bfefaf9446c9fafdacb81e21e924d5c8a820f4f |
File details
Details for the file pipen_diagram-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pipen_diagram-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.6 Linux/5.15.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24bb12df51903dc860ec22a6f98ed4ad571b218dd7ec804ecdf240a4da50d216 |
|
MD5 | 85f0c6e13751e13209157ca2c282b334 |
|
BLAKE2b-256 | 989acb88efc0af64303eae1b001628baef08c17408440689cd23e34b63de9348 |