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 (type=int): Number of cores
"""
input = "infile:file, invar"
output = "outfile:file:output.txt"
args = {'ncores': 1}
annotated = annotate(Process)
# returns:
{'Envs': {'ncores': {'attrs': {'type': 'int'},
'help': 'Number of cores',
'name': 'ncores',
'terms': {}}},
'Input': {'infile': {'attrs': {'action': 'extend',
'itype': 'file',
'nargs': '+'},
'help': 'An input file',
'name': 'infile',
'terms': {}},
'invar': {'attrs': {'action': 'extend',
'itype': 'var',
'nargs': '+'},
'help': 'An input variable',
'name': 'invar',
'terms': {}}},
'Output': {'outfile': {'attrs': {'default': 'output.txt', 'otype': 'file'},
'help': 'The output file',
'name': 'outfile',
'terms': {}}},
'Summary': {'long': 'Long description', '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-1.0.0.tar.gz
(9.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipen_annotate-1.0.0.tar.gz.
File metadata
- Download URL: pipen_annotate-1.0.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
208dedfcbb26aa95e7ea0d7792632c9209209d65b5f8382972c5e163355b8201
|
|
| MD5 |
0689561963845fbafada48f365e8e76c
|
|
| BLAKE2b-256 |
f903902971b288c821a6d6625ae18d3f243baabbb68a39586f42b07039687fb8
|
File details
Details for the file pipen_annotate-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pipen_annotate-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c28c4dfb3bd2b6428c167e04a4be928b75b615e8ca4ffcdbef503fdf2ae3d78e
|
|
| MD5 |
33785993237209a216a6a7bd919f1042
|
|
| BLAKE2b-256 |
9341d35d06f10cf1eecf06abc05d3c176d6a4cbb6001e4c400df8e06b8e2ac01
|