Option C Tools
Loading...
Searching...
No Matches
workspace.Workspace Class Reference

Public Member Functions

dict[str, "Subproject"] subprojects_by_name (self)

Static Public Attributes

tuple subprojects = field(default_factory=tuple)
str workspace_profile = _DEFAULT_WORKSPACE_PROFILE
tuple workspace_files = field(default_factory=tuple)
tuple ignore_at_workspace_scope = field(default_factory=tuple)

Detailed Description

Loaded representation of an Option C workspace manifest.

Attributes
----------
root
    Absolute resolved path to the workspace root.
name
    Display name from the manifest.
subprojects
    Tuple of :class:`Subproject` entries, in manifest order.
workspace_profile
    Lint profile applied to files matched by *workspace_files*.
    Defaults to ``"compact"``.
workspace_files
    Tuple of gitignore-style globs identifying files at the
    workspace level (i.e. owned by no subproject). Examples:
    ``("CLAUDE.md", ".github/**", "docs/**")``.
ignore_at_workspace_scope
    Tuple of additional ignore patterns to be inserted into the
    OCT-managed block of the workspace-root ``.gitignore`` when
    ``oct git init`` runs at workspace scope.

Definition at line 102 of file workspace.py.

Member Function Documentation

◆ subprojects_by_name()

dict[str, "Subproject"] workspace.Workspace.subprojects_by_name ( self)
Lookup index from subproject name to :class:`Subproject`.

Computed eagerly on first access; cheap because subprojects
are bounded to a small N. The dict is regenerated per call —
the dataclass is frozen so we can't cache it.

Definition at line 134 of file workspace.py.

Member Data Documentation

◆ ignore_at_workspace_scope

tuple workspace.Workspace.ignore_at_workspace_scope = field(default_factory=tuple)
static

Definition at line 131 of file workspace.py.

◆ subprojects

tuple workspace.Workspace.subprojects = field(default_factory=tuple)
static

Definition at line 128 of file workspace.py.

◆ workspace_files

tuple workspace.Workspace.workspace_files = field(default_factory=tuple)
static

Definition at line 130 of file workspace.py.

◆ workspace_profile

str workspace.Workspace.workspace_profile = _DEFAULT_WORKSPACE_PROFILE
static

Definition at line 129 of file workspace.py.


The documentation for this class was generated from the following file: