irorun package

Submodules

irorun.cli module

irorun.cli.check()[source]

Runs the code quality and formatting checks.

irorun.cli.check_codestyle()[source]

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

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

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[source]

Generates or updates the project documentation from documentation strings.

Notes

Uses sphinx + reStructuredText and numpydoc.

irorun.cli.format()[source]

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

irorun.cli.gen_config()[source]

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>)[source]

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

irorun.cli.load_config(config_path: str = 'project_config.toml') dict[source]
irorun.cli.main(verbose: bool = <typer.models.OptionInfo object>)[source]

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

irorun.helpers module

class irorun.helpers.EnvManager(*values)[source]

Bases: Enum

POETRY = 'poetry'
UV = 'uv'
VIRTUALENV = 'virtualenv'
irorun.helpers.add_dependencies(package_manager: EnvManager, dependencies: list[str]) None[source]

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

irorun.helpers.change_dir(new_dir: str)[source]

Context manager for changing the current working directory.

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

Creates a new Poetry project and optionally installs dependencies.

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

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[source]

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[source]

Creates a new project directory and virtual environment using virtualenv.

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

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