Index
core
AXM Core package.
WorkspaceIdentity
dataclass
A workspace's name, and where its repository and documentation live.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Root |
repository |
str
|
GitHub |
site_url |
str
|
Root URL of the workspace documentation site, without a
trailing slash; each member is published under |
Source code in packages/axm-init/src/axm_init/core/scaffolder.py
on_github(name, repository)
classmethod
Identity of a repository documented on its GitHub Pages site.
Source code in packages/axm-init/src/axm_init/core/scaffolder.py
build_member_data(member_name, workspace=None, scaffold_data=None, *, license_holder=None, private=None, **legacy)
Build copier template variables for a workspace member scaffold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
member_name
|
str
|
Name of the new member package. |
required |
workspace
|
str | WorkspaceIdentity | None
|
Parent workspace, as resolved by
:func: |
None
|
scaffold_data
|
Mapping[str, str] | None
|
Caller identity fields — |
None
|
license_holder
|
str | None
|
Explicit LICENSE holder; falls back to |
None
|
private
|
bool | None
|
Publication guard forwarded to Copier when provided. |
None
|
**legacy
|
Unpack[_LegacyMemberKeywords]
|
|
{}
|
Returns:
| Type | Description |
|---|---|
dict[str, object]
|
The template-variable dict passed verbatim to copier. Identical inputs |
dict[str, object]
|
yield a byte-identical dict whatever the calling interface. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If scaffold_data or the workspace is missing, if both
workspace and |
Source code in packages/axm-init/src/axm_init/core/scaffolder.py
read_workspace_identity(workspace_root, org)
Resolve a workspace's name, repository and documentation site.
The root mkdocs.yml (repo_url, site_url) wins, since it is what
the published site uses; then the root [project.urls] (Repository
or Homepage, Documentation); then org/<checkout directory> on
GitHub Pages. The root [project].name is never used: workspaces often
name their root project <repository>-workspace.
Source code in packages/axm-init/src/axm_init/core/scaffolder.py
read_workspace_name(workspace_root)
Read the workspace name from pyproject.toml or fall back to dir name.
Source code in packages/axm-init/src/axm_init/core/scaffolder.py
resolve_workspace_root(target_path)
Resolve the workspace root for target_path, or None.
Returns target_path itself when it is a workspace root, the parent
workspace root when target_path is a member, and None otherwise.