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.10.0.tar.gz
(8.9 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.10.0.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.10.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2852e9ce6bdf7a773307b5df6c50acbf069df3efbdd6a4c3efec43c109c9dc5c |
|
MD5 | 08cf3d8a09274fb7efd4c01f3f5c14ea |
|
BLAKE2b-256 | 11cb5547f47b5ce3a1f93c6b5f2d7ff60411eac7b170ddc01a3529f92f876afe |
File details
Details for the file pipen_annotate-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.10.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8bbfd8f19640ffbbb02ebdd97c3b65fc06b9ebcc3b7cca4b20c337eebd540d1 |
|
MD5 | c3c2840b6ec591807bf59a3ec7737d1d |
|
BLAKE2b-256 | be85883851a6825a24d472b98019a19bb950acda6b7e92c2bd39d8c85bf0f271 |