topmark.toml.parse¶
Split-parse helpers for TopMark TOML sources.
This module defines the per-source parse result used when reading a single TopMark TOML document. A parsed source may contribute three distinct semantic channels:
- layered configuration tables that later deserialize into
MutableConfig - non-layered writer preferences from
[writer] - discovery/config-loading metadata from
[config]
This module is intentionally pure and TOML-facing:
- no file I/O
- no merge or precedence resolution
- no deserialization into MutableConfig
SourceConfigLoadingOptions
dataclass
¶
Config-loading behaviour parsed from the [config] table.
This is a pure per-source metadata carrier for config-loading toggles. It does not participate in layered config merging.
Attributes:
| Name | Type | Description |
|---|---|---|
strict |
bool | None
|
Per-source strictness preference for later
staged config-loading validation. If |
SourceTomlOptions
dataclass
¶
Discovery metadata parsed from the [config] table.
This is a pure per-source metadata carrier. These options do not participate in layered config merging.
Attributes:
| Name | Type | Description |
|---|---|---|
root |
bool | None
|
If |
ParsedTopmarkToml
dataclass
¶
ParsedTopmarkToml(
*,
config_loading_options,
layered_config,
writer_options,
source_options,
toml_fragment,
validation_issues=(),
)
Per-source split parse result for a TopMark TOML document.
This is not a merged or resolved result.
Attributes:
| Name | Type | Description |
|---|---|---|
config_loading_options |
SourceConfigLoadingOptions
|
Config-loading behaviour parsed from the
|
layered_config |
TomlTable
|
Layered TOML fragment extracted from the source. This fragment participates in normal config-layer deserialization and merging. |
writer_options |
WriterOptions | None
|
Non-layered writer preferences parsed from the
|
source_options |
SourceTomlOptions
|
Discovery metadata parsed from the |
toml_fragment |
TomlTable
|
Full source-local TopMark TOML fragment. |
validation_issues |
tuple[TomlValidationIssue, ...]
|
TOML schema validation issues encountered. |
parse_topmark_toml_table ¶
Split a TopMark TOML table into its semantic domains.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
TomlTable
|
A TopMark TOML table, already normalized to plain-Python TOML structures. |
required |
validation_issues
|
tuple[TomlValidationIssue, ...]
|
The list of TOML schema validaiton issues. |
required |
Returns:
| Type | Description |
|---|---|
ParsedTopmarkToml
|
The per-source split parse result. |