define

Comprehensive Automation Namespace for Python Project Operations

This module provides a unified interface for managing various aspects of a Python project lifecycle, including virtual environment, dependencies, testing, documentation, build, and publishing processes.

The PyWf (Python Workflow) class consolidates multiple operational concerns into a single, cohesive management system, enabling streamlined project automation.

The class uses a composition-based approach, inheriting from multiple specialized namespace classes to provide a comprehensive project management toolkit.

class pywf_internal_proprietary.define.PyWf(dir_project_root: Path, toml_data: Dict[str, Any])[source]

Unified Automation Interface for Python Project Management

Parameters:
  • dir_project_root – Root directory of the project, typically the git repository root. It has to have a pyproject.toml file in it.

  • toml_data – Parsed configuration data from pyproject.toml

property package_name: str

Retrieve the package name from pyproject.toml.

property package_name_slug: str

Slugify package name for use in PyPI, readthedocs, etc.

property package_version: str

Retrieve the package version from pyproject.toml.

property package_license: str

Retrieve the package license from pyproject.toml.

property package_description: str

Retrieve the package description from pyproject.toml.

property package_author_name: str

Retrieve the primary author’s name from pyproject.toml.

property package_author_email: str

Retrieve the primary author’s email from pyproject.toml.

property package_maintainer_name: str

Retrieve the primary maintainer’s name from pyproject.toml.

property package_maintainer_email: str

Retrieve the primary maintainer’s email from pyproject.toml.

property py_ver_major: int

Extract major version number from development Python version.

property py_ver_minor: int

Extract minor version number from development Python version.

property py_ver_micro: int

Extract micro version number from development Python version.

property git_repo_name: str

Git repo name.

property doc_host_aws_profile: str

Retrieve AWS profile for documentation hosting.

property doc_host_s3_bucket: str

Retrieve S3 bucket for documentation hosting.

property doc_host_s3_prefix: str

Retrieve and sanitize S3 prefix for documentation hosting.

Ensures prefix does not start or end with ‘/’ to maintain consistent path formatting.

property cloudflare_account_alias: str

CloudFlare account alias, it is an alias you made up for your account and we need this to locate the token file.

property cloudflare_pages_token_name: str

The Cloudflare API token you use to upload the documentation to Cloudflare Pages.

classmethod from_pyproject_toml(path_pyproject_toml: Path)[source]

Create a PyWf instance from a pyproject.toml file.