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.11.4.tar.gz
(9.5 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.11.4.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.11.4.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf9dd94237aa17cb6dd9e83f57706875ef7608941ed60765cdd48d200eb9710d |
|
MD5 | 4bd16b89242203a4da536629678d9347 |
|
BLAKE2b-256 | 97f8ada01cf4653e3a32d18935ef31be58c4bd9365f30d252eceb06660ca615a |
File details
Details for the file pipen_annotate-0.11.4-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.11.4-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78ec4b69e8fed1f8ecf2422a8ebd661aa14c226ee7be955d228b2ce76bd78fd6 |
|
MD5 | 25b9fc917b3d76e9ebc3d97ff67abcdf |
|
BLAKE2b-256 | e92ab297de3d929678b3cf611d2b3f29a8deedf6b10d23a8202faff54845a9c2 |