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
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
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
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
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.
tag_format is the DECLARED format and may be :data:TAG_FORMAT_ABSENT. Anything that needs a format to work with reads :attr:effective_tag_format, which resolves absence to :data:DEFAULT_TAG_FORMAT. The split is the point: the declared value answers "what does workspace.toml say", the effective value answers "what do this releasable's tags look like", and only the first can tell a workspace that meant the default from one that never thought about it.
#declares_tag_format
def declares_tag_format(self) -> boolDid workspace.toml state a tag_format for this releasable?
#is_mirrored
def is_mirrored(self) -> boolIs this releasable bound to a standalone subtree mirror?
The binding is the mirror's DESTINATION, and it belongs to the releasable rather than to a member package: a mirror carries one subtree's whole history, its tags and its GitHub Releases, and the unit that owns a version, a changelog and a tag scheme is the releasable. A releasable with more than one member therefore cannot declare one at all -- the loader refuses that outright, because there would be no one subtree to mirror.
#effective_tag_format
def effective_tag_format(self) -> strThe format this releasable's tags actually use.
:data:DEFAULT_TAG_FORMAT when none was declared -- the workspace scheme, which is right for every releasable except one that owns the repository root, and the loader refuses that case outright rather than letting it reach here.
#is_runtime_member_key
def is_runtime_member_key(key) -> boolIs key runtime bookkeeping rather than a declared member key?
#WorkspaceProject
Typed wrapper over a workspace.toml project dict.
Provides typed property access for the member keys in :data:MEMBER_KEYS -- one accessor per key, plus the derived dev_node and is_releasable. The underlying dict is preserved for serialization. Dict-like [], get(), and in access is supported for code that treats projects as dicts.
#name
def name(self) -> str#path
def path(self) -> str#library
def library(self) -> bool#dev_only
def dev_only(self) -> bool#dev_node
def dev_node(self) -> boolDerived shorthand: True when dev_only and outside every releasable.
Both halves are required, and both are declared: dev_only = true says what the member IS, releasable = false says it stands outside every releasable. There is no single key for the combination -- the dev_node key was deleted, and the loader refuses it by name.
#is_releasable
def is_releasable(self) -> boolWhether 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
def depends_on(self) -> list[str]#releasable
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
def import_name(self) -> str#registry_name
def registry_name(self) -> str#description
def description(self) -> strFree-text description, carried into the monorepo snapshot.
#test_only
def test_only(self) -> boolIs this member test infrastructure? Carried into the snapshot.
#lint_allow
def lint_allow(self) -> list[str]Imports the library-lint check allows for this member.
#get
def get(self, key, default=None)Dict-like access for backward compatibility.
#to_dict
def to_dict(self) -> dictReturn the underlying dict for serialization.
#project_is_dev_only
def project_is_dev_only(proj) -> boolCheck if a project is dev_only (works with WorkspaceProject or dict).
#project_is_dev_node
def project_is_dev_node(proj) -> boolIs proj a dev node (dev-only AND outside every releasable)?
Works with :class:WorkspaceProject or a raw dict. The two declared keys are the input; "dev node" is derived from them and never declared.
#project_is_releasable
def project_is_releasable(proj) -> boolCheck if a project is releasable (works with WorkspaceProject or dict).