Skip to main content

Use docstring to annotate pipen processes

Project description

pipen-annotate

Use docstring to annotate pipen processes

Installation

pip install pipen-annotate

Usage

from pipen import Proc
from pipen_annotate import annotate

@annotate
class Process(Proc):
    """Short description

    Long description

    Input:
        infile: An input file
        invar: An input variable

    Output:
        outfile: The output file

    Args:
        ncores: Number of cores
    """
    input = "infile:file, invar"
    output = "outfile:file:output.txt"
    args = {'ncores': 1}

print(Process.annotated)
# prints:
{'args': {'ncores': ParsedItem(name='ncores',
                               type=None,
                               desc='Number of cores',
                               more=[ParsedPara(lines=['Default: 1'])])},
 'input': {'infile': ParsedItem(name='infile',
                                type='file',
                                desc='An input file',
                                more=[]),
           'invar': ParsedItem(name='invar',
                               type='var',
                               desc='An input variable',
                               more=[])},
 'long': [ParsedPara(lines=['Long description'])],
 'output': {'outfile': ParsedItem(name='outfile',
                                  type='file',
                                  desc='The output file',
                                  more=[ParsedPara(lines=['Default: output.txt'])])},
 'short': ParsedPara(lines=['Short description'])}

Project details


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.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

pipen_annotate-0.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file pipen-annotate-0.0.2.tar.gz.

File metadata

  • Download URL: pipen-annotate-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1023-azure

File hashes

Hashes for pipen-annotate-0.0.2.tar.gz
Algorithm Hash digest
SHA256 400319b87c0eda48f210f35ba0c78e66d7f105fe7ce5b439a003ded6cb796c8c
MD5 a6c47b8a2f43d8580bd6996a8f5d0e69
BLAKE2b-256 36f64180c7e5551282eccae7ee2e93b1f6a5c40bfe6481f23a1eb1ee9ac5bcb0

See more details on using hashes here.

File details

Details for the file pipen_annotate-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pipen_annotate-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1023-azure

File hashes

Hashes for pipen_annotate-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f66a0d965ed58e1868f8d41d4c7d3f788329062b4532a30a1aa208f12c4492a8
MD5 2ca1883cfaf119ae9879e59da499c79f
BLAKE2b-256 f28940438a0151be054517e105bea2ff7544f0cc900b95600f56dc4a2f4e6d23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page