vai-jobspec-tools


Namevai-jobspec-tools JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/voxelai/vai-jobspec-tools
SummaryUtilities for VoxelAI jobspec containers
upload_time2023-12-15 04:52:25
maintainer
docs_urlNone
authorAndrew Ross
requires_python>=3.7,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vai-jobspec-tools

Utilities for VoxelAI jobspec containers

[![PyPI Version](https://img.shields.io/pypi/v/vai-jobspec-tools.svg)](https://pypi.org/project/vai-jobspec-tools/)
[![codecov](https://codecov.io/gh/voxelai/vai-jobspec-tools/branch/main/graph/badge.svg?token=ZX37CSBE50)](https://codecov.io/gh/voxelai/vai-jobspec-tools)
[![Tests](https://github.com/voxelai/vai-jobspec-tools/workflows/Tests/badge.svg)](https://github.com/voxelai/vai-jobspec-tools/actions/workflows/test.yaml)
[![Code Style](https://github.com/voxelai/vai-jobspec-tools/workflows/Code%20Style/badge.svg)](https://github.com/voxelai/vai-jobspec-tools/actions/workflows/lint.yaml)
[![Type Check](https://github.com/voxelai/vai-jobspec-tools/workflows/Type%20Check/badge.svg)](https://github.com/voxelai/vai-jobspec-tools/actions/workflows/type-check.yaml)

## Installation

```bash
pip install vai-jobspec-tools
```

## API

```python
from __future__ import annotations

import contextlib
import logging
from pathlib import Path
from typing import Iterator


def configure_logger(
    logger: logging.Logger,
    *,
    verbosity: int = 0,
    level: int | None = None,
):
    """Configure a logger with a level and custom stream handler."""
    ...


@contextlib.contextmanager
def optional_temporary_directory(workdir: str | Path | None = None) -> Iterator[Path]:
    """Create a temporary directory if one is not provided."""
    ...


def prepare_dst_uri(
    uri: str,
    subject_id: str,
    session_id: str,
    pipeline_name: str,
    pipeline_version: str,
    job_id: str,
    *,
    create: bool = True,
) -> str:
    """Generate a URI scoped to a particular subject, session, pipeline, version and job"""
    ...


def lowercase_alnum(s: str) -> str:
    """Transform a string so that it contains only lowercase alphanumeric characters."""
    ...

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/voxelai/vai-jobspec-tools",
    "name": "vai-jobspec-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Andrew Ross",
    "author_email": "andrew.ross.mail@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/db/09/8e8a1747240dbdeda74b998274c2691493aab05fb2c8ee05fd9942e7e252/vai_jobspec_tools-2.1.0.tar.gz",
    "platform": null,
    "description": "# vai-jobspec-tools\n\nUtilities for VoxelAI jobspec containers\n\n[![PyPI Version](https://img.shields.io/pypi/v/vai-jobspec-tools.svg)](https://pypi.org/project/vai-jobspec-tools/)\n[![codecov](https://codecov.io/gh/voxelai/vai-jobspec-tools/branch/main/graph/badge.svg?token=ZX37CSBE50)](https://codecov.io/gh/voxelai/vai-jobspec-tools)\n[![Tests](https://github.com/voxelai/vai-jobspec-tools/workflows/Tests/badge.svg)](https://github.com/voxelai/vai-jobspec-tools/actions/workflows/test.yaml)\n[![Code Style](https://github.com/voxelai/vai-jobspec-tools/workflows/Code%20Style/badge.svg)](https://github.com/voxelai/vai-jobspec-tools/actions/workflows/lint.yaml)\n[![Type Check](https://github.com/voxelai/vai-jobspec-tools/workflows/Type%20Check/badge.svg)](https://github.com/voxelai/vai-jobspec-tools/actions/workflows/type-check.yaml)\n\n## Installation\n\n```bash\npip install vai-jobspec-tools\n```\n\n## API\n\n```python\nfrom __future__ import annotations\n\nimport contextlib\nimport logging\nfrom pathlib import Path\nfrom typing import Iterator\n\n\ndef configure_logger(\n    logger: logging.Logger,\n    *,\n    verbosity: int = 0,\n    level: int | None = None,\n):\n    \"\"\"Configure a logger with a level and custom stream handler.\"\"\"\n    ...\n\n\n@contextlib.contextmanager\ndef optional_temporary_directory(workdir: str | Path | None = None) -> Iterator[Path]:\n    \"\"\"Create a temporary directory if one is not provided.\"\"\"\n    ...\n\n\ndef prepare_dst_uri(\n    uri: str,\n    subject_id: str,\n    session_id: str,\n    pipeline_name: str,\n    pipeline_version: str,\n    job_id: str,\n    *,\n    create: bool = True,\n) -> str:\n    \"\"\"Generate a URI scoped to a particular subject, session, pipeline, version and job\"\"\"\n    ...\n\n\ndef lowercase_alnum(s: str) -> str:\n    \"\"\"Transform a string so that it contains only lowercase alphanumeric characters.\"\"\"\n    ...\n\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Utilities for VoxelAI jobspec containers",
    "version": "2.1.0",
    "project_urls": {
        "Documentation": "https://github.com/voxelai/vai-jobspec-tools",
        "Homepage": "https://github.com/voxelai/vai-jobspec-tools",
        "Repository": "https://github.com/voxelai/vai-jobspec-tools"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9ee73c31707a1eea4be728b4b909b6dfec2f1b6095dd43c2bbafd48f2748018",
                "md5": "2be8e54895960cc2c8cd48555f0b72f3",
                "sha256": "1fed670bbe6dd10e38483ccdcb66f0015a62c8715a8132a9b1bf63cf4e3fe519"
            },
            "downloads": -1,
            "filename": "vai_jobspec_tools-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2be8e54895960cc2c8cd48555f0b72f3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 3345,
            "upload_time": "2023-12-15T04:52:24",
            "upload_time_iso_8601": "2023-12-15T04:52:24.091823Z",
            "url": "https://files.pythonhosted.org/packages/c9/ee/73c31707a1eea4be728b4b909b6dfec2f1b6095dd43c2bbafd48f2748018/vai_jobspec_tools-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db098e8a1747240dbdeda74b998274c2691493aab05fb2c8ee05fd9942e7e252",
                "md5": "a169e87f969650608e816e34b1833191",
                "sha256": "c0ce6388eda86981cb22fbfcc53bb8006409172a925da6e6e6a0c4e6e7183e2e"
            },
            "downloads": -1,
            "filename": "vai_jobspec_tools-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a169e87f969650608e816e34b1833191",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 3093,
            "upload_time": "2023-12-15T04:52:25",
            "upload_time_iso_8601": "2023-12-15T04:52:25.068256Z",
            "url": "https://files.pythonhosted.org/packages/db/09/8e8a1747240dbdeda74b998274c2691493aab05fb2c8ee05fd9942e7e252/vai_jobspec_tools-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-15 04:52:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "voxelai",
    "github_project": "vai-jobspec-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vai-jobspec-tools"
}
        
Elapsed time: 0.17951s