rlsbl v0.113.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, *, is_explicit, projects, releasables, resolve_releasable_for_project_fn, get_releasable_dir_fn) -> str | None

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

Receives pre-loaded workspace data via parameters to avoid importing from workspace.py (breaks the context->workspace circular dep edge).

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

#resolve_releasable_config_dir

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

Convenience wrapper: load workspace data and resolve the releasable config dir.

External callers (release_state, sync) use this instead of calling _resolve_releasable_config_dir directly. The lazy workspace import happens here, keeping the inner function import-free.

#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.

Search