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'}}
Metadata
Release files for pipen-annotate 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pipen_annotate-1.0.6.tar.gz | 172.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipen_annotate-1.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 183.3 kB
Release files / pipen_annotate-1.0.6.tar.gz
| Download URL | pipen_annotate-1.0.6.tar.gz |
|---|---|
| Size | 172.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
191350427fd78d9f59da0c46443c2fa5aace7e30ec938193ca7e88e28b0c9f88
|
|
BLAKE2b-256 checksum How to use checksums |
0575093158d77cc3900e2e68a91991ce6dd65e3f398f0864ddadf7fe45468402
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pipen_annotate-1.0.6-py3-none-any.whl
| Download URL | pipen_annotate-1.0.6-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3829cf79166ee18eaae5460b02786a25728cb7be90902cf291090b77fad8a72e
|
|
BLAKE2b-256 checksum How to use checksums |
c5cce2501177044311b9e0c5ded00867b31f46e2d374bdd28fe948149ef213ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|