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.6.0.tar.gz
(6.8 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.6.0.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.6.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.15.0-1034-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b22e19aa9852d1f4be7530a1ef993b12158399149fa40637e1cf9404f8a5a202 |
|
MD5 | 5c6e9e6e05972e6da932c2708831e774 |
|
BLAKE2b-256 | 152bf88391362cfcc884a19d128b98d1e688184a83adb7d3b4e236ad8da75baf |
File details
Details for the file pipen_annotate-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.6.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.15.0-1034-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a8eaab74d99dea493560bf02fb4bf82b99e1c5f108496d1e41fc39561a73af3 |
|
MD5 | 90ee9c61c948228571a24e237f15edf1 |
|
BLAKE2b-256 | c829f507a55d0b25903769d588ed10a15edc8d356eb25822638456978c8e5b2d |