rlsbl v0.113.0 /rlsbl.workspace_types
On this page

Core workspace types and path-building utilities defining WorkspaceProject, Releasable, and directory resolution for monorepo workspace operations.

#rlsbl.workspace_types

#rlsbl.workspace_types

Core workspace types and path-building utilities defining WorkspaceProject, Releasable, and directory resolution for monorepo workspace operations.

This module contains the fundamental types (WorkspaceProject, Releasable) and pure path-building functions (get_releasable_dir, etc.) that are used across the codebase. It is intentionally free of imports from targets, workspace, context, or checks to break circular dependency cycles.

The workspace module re-exports everything from here so existing importers are unaffected.

#get_releasable_dir

python
def get_releasable_dir(workspace_root, releasable_name)

Return the directory path for a releasable's state files.

Path: <workspace_root>/.rlsbl-monorepo/releasables/<name>/

Args:

  • workspace_root: path to the monorepo root.
  • releasable_name: name of the releasable.

Returns:

  • Absolute path string to the releasable directory.

#get_releasable_changes_dir

python
def get_releasable_changes_dir(workspace_root, releasable_name)

Return the path to a releasable's changelog changes directory.

Path: <workspace_root>/.rlsbl-monorepo/releasables/<name>/changes/

Args:

  • workspace_root: path to the monorepo root.
  • releasable_name: name of the releasable.

Returns:

  • Absolute path string to the changes directory.

#get_releasable_version_path

python
def get_releasable_version_path(workspace_root, releasable_name)

Return the path to a releasable's version file.

Path: <workspace_root>/.rlsbl-monorepo/releasables/<name>/version

Args:

  • workspace_root: path to the monorepo root.
  • releasable_name: name of the releasable.

Returns:

  • Absolute path string to the version file.

#get_releasable_hook_path

python
def get_releasable_hook_path(workspace_root, releasable_name, hook_name)

Return the absolute path to a releasable-level hook script.

Path: <workspace_root>/.rlsbl-monorepo/releasables/<name>/hooks/<hook_name>

Args:

  • workspace_root: path to the monorepo root.
  • releasable_name: name of the releasable.
  • hook_name: hook file name (e.g. "pre-checks.sh").

Returns:

  • Absolute path string. The file may or may not exist on disk.

#Releasable

A named unit of versioning: a group of packages sharing version, changelog, and release.

Releasables are defined via [[releasables]] in workspace.toml.

#WorkspaceProject

Typed wrapper over a workspace.toml project dict.

Provides typed property access for known fields while preserving the underlying dict for round-trip serialization. Unknown fields are kept intact. Dict-like [], get(), and in access is supported for backward compatibility with code that treats projects as dicts.

#name

python
def name(self) -> str

#path

python
def path(self) -> str

#watch

python
def watch(self) -> list[str]

#library

python
def library(self) -> bool

#dev_only

python
def dev_only(self) -> bool

#dev_node

python
def dev_node(self) -> bool

Derived shorthand: True when dev_only and not a member of any releasable.

A project is considered non-releasable when releasable is explicitly False, OR when releasable is None and the legacy dev_node flag is set.

#is_releasable

python
def is_releasable(self) -> bool

Whether this project can produce releases.

A project is releasable when it belongs to some releasable unit (releasable = "name"). Returns False when releasable = false is set explicitly, or when the project is a dev_node.

#depends_on

python
def depends_on(self) -> list[str]

#releasable

python
def releasable(self) -> 'str | bool | None'

The releasable this project belongs to.

Returns:

  • str: name of the releasable group this project belongs to.
  • False: project is explicitly unversioned (no releases).
  • None: field not set.

#import_name

python
def import_name(self) -> str

#registry_name

python
def registry_name(self) -> str

#subtree_remote

python
def subtree_remote(self) -> str

URL of the standalone mirror repository for this project.

Empty string when the project has no subtree mirror configured.

#get

python
def get(self, key, default=None)

Dict-like access for backward compatibility.

#to_dict

python
def to_dict(self) -> dict

Return the underlying dict for serialization.

#project_is_dev_only

python
def project_is_dev_only(proj) -> bool

Check if a project is dev_only (works with WorkspaceProject or dict).

#project_is_releasable

python
def project_is_releasable(proj) -> bool

Check if a project is releasable (works with WorkspaceProject or dict).

Search