rlsbl v0.92.0 /rlsbl.context
On this page

ProjectContext dataclass holding project_root, monorepo_root, and config for threading explicit paths through rlsbl command flows.

#rlsbl.context

#rlsbl.context

Project context for general command use.

#ProjectContext

Context object carrying project root, optional workspace root, and loaded config.

#_resolve_releasable_config_dir

python
def _resolve_releasable_config_dir(root: Path, workspace_root: Path) -> str | None

Find the releasable config directory for a package in a monorepo.

Loads the workspace, resolves which project root belongs to, checks its releasable field, and returns the releasable state directory path if the project belongs to a releasable.

Returns None if the project is not in the workspace, is not releasable, or if [[releasables]] is not defined.

#create_context

python
def create_context(root: Path, workspace_root: Path | None=None, project: WorkspaceProject | None=None) -> ProjectContext

Create a ProjectContext, loading config via read_project_config().

When in a monorepo with [[releasables]], automatically detects releasable membership and applies config inheritance (releasable-level config as base, per-package config on top).

Returns an empty dict for config if no config.json exists.