irorun package — irorun documentation

# irorun documentation

## irorun package

## Submodules

## irorun.cli module

irorun.cli.check()

  Runs the code quality and formatting checks.

irorun.cli.check_codestyle()

  Checks your code style against some of the style conventions in PEP 8.

irorun.cli.check_upgrade(fix: bool = <typer.models.OptionInfo object>)

  Checks your code syntax to see where it can be upgraded to meet the latest version.

irorun.cli.document(docs_dir=<typer.models.ArgumentInfo object>, author: str = <typer.models.OptionInfo object>) → None

  Generates or updates the project documentation from documentation strings.

  Notes

  Uses sphinx + reStructuredText and numpydoc.

irorun.cli.format()

  Runs the formatting checks using ruff. This command does the following: - Sorts imports and removes unused imports.

irorun.cli.gen_config()

  Generates a configuration file for the project named project_config.toml.

irorun.cli.init(project_dir: str = <typer.models.ArgumentInfo object>, package_manager: ~irorun.helpers.EnvManager = <typer.models.OptionInfo object>)

  Bootstraps a new project environment using settings from project_config.toml.

irorun.cli.load_config(config_path: str = 'project_config.toml') → dict

irorun.cli.main(verbose: bool = <typer.models.OptionInfo object>)

  Global callback to adjust logging level based on the –verbose flag.

## irorun.helpers module

class irorun.helpers.EnvManager(*values)

  Bases: `Enum`

  POETRY = 'poetry'
  UV = 'uv'
  VIRTUALENV = 'virtualenv'

irorun.helpers.add_dependencies(package_manager: EnvManager, dependencies: list[str]) → None

  Adds dependencies using the specified package manager. Only supports POETRY and UV.

irorun.helpers.change_dir(new_dir: str)

  Context manager for changing the current working directory.

irorun.helpers.create_poetry_project(project_dir: str, dependencies: list[str] | None = None) → None

  Creates a new Poetry project and optionally installs dependencies.

irorun.helpers.create_subdirectories(project_dir: str, subdirectories: Iterable[str]) → None

  Creates subdirectories within a project directory.

  Parameters: project_dir: The base project directory. subdirectories: An iterable of subdirectory names to create under project_dir.

irorun.helpers.create_uv_project(project_dir: str, venv_name: str, dependencies: list[str] | None = None) → None

  Creates a new project with a virtual environment using uv.

irorun.helpers.create_virtualenv_project(project_dir: str, venv_name: str, dependencies: list[str] | None = None) → None

  Creates a new project directory and virtual environment using virtualenv.

irorun.helpers.run_command(cmd: list[str], cwd: str | None = None) → None

  Wrapper for subprocess.run to execute a command and handle errors.