nbprint.config.core.Outputs

pydantic model nbprint.config.core.Outputs[source]

Bases: ResultBase, BaseModel

field root: Path = PosixPath('/home/runner/work/nbprint/nbprint/outputs')
field naming: str = '{{name}}-{{date}}'
field tags: Annotated[list[str], SerializeAsAny()] [Optional]
field role: Role = Role.OUTPUTS
field ignore: bool = True
field embedded: bool = False

Whether this output is expected to run from its embedding inside the notebook.

field hook: PyObjectPath | None = None

A callable hook that is called after generation of the notebook. It is passed the config instance. If it returns something non-None, that value is returned by run instead of the output path.

field postprocess: PyObjectPath | None = None

A callable hook that is called after all processing completes. It is passed the config instance/s. NOTE: It may receive multiple Configuration instances, if a parameterized run was performed.

property notebook: Path
property executed_notebook: Path
property output: Path
run(config: Configuration, gen: NotebookNode) Path[source]
generate(metadata: dict, **kwargs) NotebookNode[source]

Generate a notebook node for this model. This will be called before the runtime of the notebook, use it for code generation.

Args:

metadata (dict): common cell metadata

Returns:

NotebookNode: the content of the notebook node