pipen-annotate


Namepipen-annotate JSON
Version 0.14.0 PyPI version JSON
download
home_pageNone
SummaryUse docstring to annotate pipen processes
upload_time2024-07-23 22:08:05
maintainerNone
docs_urlNone
authorpwwang
requires_python<4.0,>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pipen-annotate

Use docstring to annotate [pipen](https://github.com/pwwang/pipen) processes

## Installation

```shell
pip install -U pipen-annotate
```

## Usage

```python
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'}}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pipen-annotate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "pwwang",
    "author_email": "pwwang@pwwang.com",
    "download_url": "https://files.pythonhosted.org/packages/e3/77/406fcef1e11fabb14cedf67390806c5a3f953e169271381db8fb4e49e496/pipen_annotate-0.14.0.tar.gz",
    "platform": null,
    "description": "# pipen-annotate\n\nUse docstring to annotate [pipen](https://github.com/pwwang/pipen) processes\n\n## Installation\n\n```shell\npip install -U pipen-annotate\n```\n\n## Usage\n\n```python\nfrom pprint import pprint\nfrom pipen import Proc\nfrom pipen_annotate import annotate\n\n\nclass Process(Proc):\n    \"\"\"Short description\n\n    Long description\n\n    Input:\n        infile: An input file\n        invar: An input variable\n\n    Output:\n        outfile: The output file\n\n    Envs:\n        ncores: Number of cores\n    \"\"\"\n    input = \"infile:file, invar\"\n    output = \"outfile:file:output.txt\"\n    args = {'ncores': 1}\n\nannotated = annotate(Process)\n# prints:\n{'Envs': {'ncores': {'attrs': OrderedDiot([('default', 1)]),\n                     'help': 'Number of cores',\n                     'terms': OrderedDiot([])}},\n 'Input': {'infile': {'attrs': {'action': 'extend',\n                                'itype': 'file',\n                                'nargs': '+'},\n                      'help': 'An input file',\n                      'terms': OrderedDiot([])},\n           'invar': {'attrs': {'action': 'extend',\n                               'itype': 'var',\n                               'nargs': '+'},\n                     'help': 'An input variable',\n                     'terms': OrderedDiot([])}},\n 'Output': {'outfile': {'attrs': {'default': 'output.txt',\n                                  'otype': 'file'},\n                        'help': 'The output file',\n                        'terms': OrderedDiot([])}},\n 'Summary': {'long': 'Long description\\n',\n             'short': 'Short description'}}\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Use docstring to annotate pipen processes",
    "version": "0.14.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d2750bf3ed5f0be5d6ce90afc3952db2ea8a590b81a11039e269721a63a4483",
                "md5": "22bd8daae025b90292175d5a47d74231",
                "sha256": "1a6275897a1483083c403351ff2d294f04dcf47dbb6be07b0c38ff30ef9da404"
            },
            "downloads": -1,
            "filename": "pipen_annotate-0.14.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22bd8daae025b90292175d5a47d74231",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 9850,
            "upload_time": "2024-07-23T22:08:04",
            "upload_time_iso_8601": "2024-07-23T22:08:04.033264Z",
            "url": "https://files.pythonhosted.org/packages/9d/27/50bf3ed5f0be5d6ce90afc3952db2ea8a590b81a11039e269721a63a4483/pipen_annotate-0.14.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e377406fcef1e11fabb14cedf67390806c5a3f953e169271381db8fb4e49e496",
                "md5": "c3b1eb6fb3abf8f70b33ccbb55db5f01",
                "sha256": "752ce43f3af009ad17fadd109dfc3a87537e119e1ea9352cbf55a16404f88935"
            },
            "downloads": -1,
            "filename": "pipen_annotate-0.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c3b1eb6fb3abf8f70b33ccbb55db5f01",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 9518,
            "upload_time": "2024-07-23T22:08:05",
            "upload_time_iso_8601": "2024-07-23T22:08:05.662752Z",
            "url": "https://files.pythonhosted.org/packages/e3/77/406fcef1e11fabb14cedf67390806c5a3f953e169271381db8fb4e49e496/pipen_annotate-0.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-23 22:08:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pipen-annotate"
}
        
Elapsed time: 0.28879s