Skip to main content

Utilities for VoxelAI jobspec containers

Project description

vai-jobspec-tools

Utilities for VoxelAI jobspec containers

PyPI Version codecov Tests Code Style Type Check

Installation

pip install vai-jobspec-tools

API

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,
    *,
    create: bool = True,
) -> str:
    """Generate a URI scoped to a particular subject, session, pipeline, and version."""
    ...


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

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

vai-jobspec-tools-1.0.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

vai_jobspec_tools-1.0.0-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

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