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), ('atype', 'int')]),
'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.3.3.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.3.3.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.3.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1edef68646a6caf0072e327c276b4c7d1a0438294b4e0e7b3220860b60cda06b |
|
MD5 | 1414086114ef97aea5e61e1bf9d078ba |
|
BLAKE2b-256 | b1bcfabfa1e8410b7fd2fe297ac41c7cd9601b2f3552deb43d60b965f61e2ef0 |
File details
Details for the file pipen_annotate-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.3.3-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8e840d7c9dfa468197a09916d16ba371c20eba8f8bbf67e197b3b28ad5bc339 |
|
MD5 | 9c07441d65aa982eccb19a0856a3ff57 |
|
BLAKE2b-256 | 8cb248829d3a2b3867f40e972d706003d70a42504ca953676516bdf9d107ffc4 |