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.5.3.tar.gz
(6.7 kB
view details)
Built Distribution
File details
Details for the file pipen_annotate-0.5.3.tar.gz
.
File metadata
- Download URL: pipen_annotate-0.5.3.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.15.0-1034-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d10504a3376fbbb41a68740f43c0706d521b0057fc69f482eb30d95665f83709 |
|
MD5 | df824e18606a0f04d9c38b44f4d6e3c3 |
|
BLAKE2b-256 | ae60eafac34c3764300ef1ab8f54e5a0f95fe91a5ff8618014d5736785e31b7f |
File details
Details for the file pipen_annotate-0.5.3-py3-none-any.whl
.
File metadata
- Download URL: pipen_annotate-0.5.3-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.6 Linux/5.15.0-1034-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1782b4f24eed9eb5410754132ca1d962320e5ef31017e7c15dfb90bbaca3d836 |
|
MD5 | 67969a9da2250f4efeeb93d48f68ca8e |
|
BLAKE2b-256 | 3350305dcdc1ee7118d4f8ff82dc8f3c5aa96a314039e17db4e519eb8edc8b17 |