Use docstring to annotate pipen processes
Project description
pipen-annotate
Use docstring to annotate pipen processes
Installation
pip install -U pipen-annotate
Usage
from pprint import pprint
from pipen import Proc
from pipen_annotate import annotate
class Process(Proc):
"""Short description
Long description
Input:
infile: An input file
invar: An input variable
Output:
outfile: The output file
Envs:
ncores: Number of cores
"""
input = "infile:file, invar"
output = "outfile:file:output.txt"
args = {'ncores': 1}
annotated = annotate(Process)
# prints:
{'Envs': {'ncores': {'attrs': OrderedDiot([('default', 1)]),
'help': 'Number of cores',
'terms': OrderedDiot([])}},
'Input': {'infile': {'attrs': {'action': 'extend',
'itype': 'file',
'nargs': '+'},
'help': 'An input file',
'terms': OrderedDiot([])},
'invar': {'attrs': {'action': 'extend',
'itype': 'var',
'nargs': '+'},
'help': 'An input variable',
'terms': OrderedDiot([])}},
'Output': {'outfile': {'attrs': {'default': 'output.txt',
'otype': 'file'},
'help': 'The output file',
'terms': OrderedDiot([])}},
'Summary': {'long': 'Long description\n',
'short': 'Short description'}}
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_annotate-0.12.0.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.12.0.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.12.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35b30b5a15b1acf56392e21ef4aa41c7760e2bebcf636c2b3cc260c7b54ab42 |
|
MD5 | d06b67e16cda2eb36431ce15c59028b9 |
|
BLAKE2b-256 | 1e1580e6ae11e50fa5f3c440c20d0b00d4ecdf89b8c51942ad542a3d0ad79946 |
File details
Details for the file pipen_annotate-0.12.0-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.12.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91f88719f163b3c042c18ef34159a9e884a7b7fc23a7b35ec38f0bf3bc34e91 |
|
MD5 | e583e4c90af8917fa70dc574d3160500 |
|
BLAKE2b-256 | 3ba885b26a3e62752dff98f887255ab64a8858d9abff9dcbd05cd4d7c5045d61 |