herman.core¶
Core module for Herman analysis messages and rendering.
Submodules¶
Attributes¶
Classes¶
Message produced during analysis. |
|
Severity levels for analysis messages. |
|
Story configuration model. |
|
Metadata for a story file. |
Functions¶
|
Select a renderer and execute it. |
Package Contents¶
- class herman.core.AnalysisMessage[source]¶
Message produced during analysis.
- file: pathlib.Path[source]¶
- classmethod from_text(file: pathlib.Path, message: str, code: str, severity: Severity = Severity.ERROR) Self[source]¶
Create an AnalysisMessage from plain text inputs.
- classmethod from_pydantic_error(file: pathlib.Path, err: pydantic.ValidationError) list[AnalysisMessage][source]¶
Convert a Pydantic ValidationError into AnalysisMessages.
Extracts line & column if possible.
- herman.core.render_messages(messages: list[herman.core.AnalysisMessage], *, output_format: OutputFormat | None) int[source]¶
Select a renderer and execute it.
If format is provided explicitly, use that.
- Otherwise auto-detect:
If running in CI, use GitHub annotations.
Else fallback to Rich console renderer.
- class herman.core.StoryConfig(/, **data: Any)[source]¶
Bases:
herman.core.story._base.HermanBaseModelStory configuration model.
- class herman.core.StoryFileMetadata(/, **data: Any)[source]¶
Bases:
herman.core.story._base.HermanBaseModelMetadata for a story file.
- date_: datetime.date = None[source]¶