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.7.2.tar.gz
(6.9 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.7.2.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.7.2.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b36c13df4e012584ced281af7a9125a0639f07139bb8fc5075ba940f88cef8 |
|
MD5 | 7cf8789fbaa026344461d92e762d1d08 |
|
BLAKE2b-256 | 5d39d9d1a953f5147ffc16a5ba600f86555f3691105700efcfb6bd475d39786d |
File details
Details for the file pipen_annotate-0.7.2-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.7.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/5.15.0-1037-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 211775b834bbdc684418b82c3353481d117a58147786daeff1c307a1397b703e |
|
MD5 | 783a3e0d445a713ab7c2d40832acfb84 |
|
BLAKE2b-256 | 8d436d9a717c5075ffe9a4c60e01a7284a752ae374466032cb8016529d2715df |