Index
uv
Canonical uv-workspace resolution surface.
Member
dataclass
A single uv-workspace member.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Directory name of the member. |
path |
Path
|
Absolute, resolved path to the member directory. |
Source code in packages/axm-ingot/src/axm_ingot/uv/models.py
ResolvedWorkspace
dataclass
A uv workspace with its resolved members.
Attributes:
| Name | Type | Description |
|---|---|---|
root |
Path
|
Absolute path to the workspace root (holding the root pyproject). |
members |
tuple[Member, ...]
|
Members sorted by name. |
Source code in packages/axm-ingot/src/axm_ingot/uv/models.py
find_project_root(start)
Walk parents from start to the first directory holding any pyproject.
Returns the directory of the first ancestor (start included) that
contains a pyproject.toml -- any project, not necessarily a uv
workspace. start is resolved first; a file start is anchored on its
parent directory. Unlike :func:find_workspace_root, this never returns
None: with no pyproject.toml in any ancestor it falls back to the
(resolved) starting directory.
Source code in packages/axm-ingot/src/axm_ingot/uv/resolve.py
find_workspace_root(path)
Walk parents from path to the first uv-workspace root.
Returns the directory of the first ancestor (path included) whose
pyproject.toml carries a [tool.uv.workspace] section, else None.
Source code in packages/axm-ingot/src/axm_ingot/uv/resolve.py
parse_workspace_members(text)
Extract the raw [tool.uv.workspace].members from pyproject text.
Pure-string helper: parses text with :func:tomllib.loads and returns
the declared members verbatim -- no glob expansion, no filesystem access,
no exclude/require_pyproject filtering. Globs (packages/*) and
literal entries are returned exactly as written. Defensive: malformed TOML
or an absent [tool.uv.workspace] table yields [] rather than raising.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Raw |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
The raw member strings declared under |
list[str]
|
or |
Source code in packages/axm-ingot/src/axm_ingot/uv/resolve.py
resolve_workspace(pyproject_dir)
Resolve the uv workspace rooted at pyproject_dir.
Parses [tool.uv.workspace].members, resolves the globs to directories,
subtracts the exclude globs, keeps only directories that contain a
pyproject.toml (require_pyproject), and returns the members sorted
by name. Returns None when pyproject_dir is not a uv workspace or
its pyproject is missing/malformed.