Use docstring to annotate pipen processes
Project description
pipen-annotate
Use docstring to annotate pipen processes
Installation
pip install pipen-annotate
Usage
from pipen import Proc
from pipen_annotate import annotate
@annotate
class Process(Proc):
"""Short description
Long description
Input:
infile: An input file
invar: An input variable
Output:
outfile: The output file
Args:
ncores: Number of cores
"""
input = "infile:file, invar"
output = "outfile:file:output.txt"
args = {'ncores': 1}
print(Process.annotated)
# prints:
{'args': {'ncores': ParsedItem(name='ncores',
type=None,
desc='Number of cores',
more=[ParsedPara(lines=['Default: 1'])])},
'input': {'infile': ParsedItem(name='infile',
type='file',
desc='An input file',
more=[]),
'invar': ParsedItem(name='invar',
type='var',
desc='An input variable',
more=[])},
'long': [ParsedPara(lines=['Long description'])],
'output': {'outfile': ParsedItem(name='outfile',
type='file',
desc='The output file',
more=[ParsedPara(lines=['Default: output.txt'])])},
'short': ParsedPara(lines=['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.0.3.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for pipen_annotate-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 969e4b0c8124c61e0df2523476360f2b230b87e461e3c97f189d91c01e081756 |
|
MD5 | c88ff3c3f06e484bdab5c62f1d3a290c |
|
BLAKE2b-256 | 8bc09a412114ef2c96ef9f5db550e995e0b8ca8b200b8023dc31fbe286e02b49 |