orangeqs.juice.reporting.data.schemas#

Schemas used in the reporting tool.

Device-related configs are copied over from orangeqs-juice.

Module Contents#

Classes#

Status

Different allowed status for elements and parameters.

StatusColor

Enum to map different element statuses to colors.

Figure

Pydantic model for a figure.

Figures

Pydantic model for the figures used in the reporting tool.

OutputDirectories

Pydantic Model to describe output folder structure.

Data#

T

API#

orangeqs.juice.reporting.data.schemas.T#

‘TypeVar(…)’

class orangeqs.juice.reporting.data.schemas.Status#

Bases: str, enum.Enum

Different allowed status for elements and parameters.

GOOD#

‘good’

OUT_OF_SPEC#

‘out of spec’

BAD#

‘bad’

UNKNOWN#

‘unknown’

class orangeqs.juice.reporting.data.schemas.StatusColor#

Bases: str, enum.Enum

Enum to map different element statuses to colors.

Uses the OQS colormap by default.

GOOD#

‘#7DB85E’

OUT_OF_SPEC#

‘#FCBF0D’

BAD#

‘#E72E28’

UNKNOWN#

‘#F4F4F4’

exception orangeqs.juice.reporting.data.schemas.ReportImportError#

Bases: ImportError

Custom exception for reporting import errors in reporting module imports.

class orangeqs.juice.reporting.data.schemas.Figure(/, **data: Any)#

Bases: pydantic.BaseModel

Pydantic model for a figure.

Figures can be any store figure (e.g., .svg, .html, .png etc.) that is stored in a particular URL (directory), and has an optional caption. These figures are displayed in the generated report.

url: str#

None

Path of the figure. Must be path relative to the output directory.

caption: str = <Multiline-String>#

Caption of the figure.

class orangeqs.juice.reporting.data.schemas.Figures(/, **data: Any)#

Bases: pydantic.BaseModel

Pydantic model for the figures used in the reporting tool.

Supports many dict-like functions for backwards compatibility.

logo_tagline: orangeqs.juice.reporting.data.schemas.Figure#

None

placeholder_figure: orangeqs.juice.reporting.data.schemas.Figure#

None

A placeholder figure to be displayed when the figure generation and display pipeline fails.

add(name: str, figure: orangeqs.juice.reporting.data.schemas.Figure) None#

Add a figure to this model.

remove(name: str) None#

Remove a figure from this model.

get(name: str) orangeqs.juice.reporting.data.schemas.Figure#

Get a figure by name.

items() collections.abc.ItemsView[str, orangeqs.juice.reporting.data.schemas.Figure]#

Get all figures as items.

class orangeqs.juice.reporting.data.schemas.OutputDirectories(/, **data: Any)#

Bases: pydantic.BaseModel

Pydantic Model to describe output folder structure.

classmethod make_absolute(v: str) str#

Ensure the output_dir is an absolute path, rooted in the current directory if not already absolute.

output_dir: str#

None

The top level folder for output directory. All other paths are computed from this one.

property figs_dir: str#

The directory where figures are located to put in the report.

Figures are located in {self.output_dir}/figures.

property theme_figs_dir: str#

The directory where figures are located to put in the report.

Figures are located in {self.output_dir}/theme/figs.

property bokeh_figs_dir: str#

Returns the bokeh figures directory.

Figures are located in {self.output_dir}/bokeh/figs.

property figs_dir_relative: str#

Returns the figures directory, relative to the output dir.

This is required for the built HTML version of the docs, which uses relative paths to figures.

property theme_figs_dir_relative: str#

Returns the theme figures directory, relative to the output dir.

This is required for the built HTML version of the docs, which uses relative paths to figures.

property bokeh_figs_dir_relative: str#

Returns the bokeh figures directory, relative to the output dir.

This is required for the built HTML version of the docs, which uses relative paths to figures.