Schema Converter

class orion_notebook.graph.schema_converter.SchemaConverter(notebook_text: str)

Bases: object

VERSION_KEY = '"orion_version"'
get_converted_notebook(version: str)str

Converts a notebook to the latest version supported by making the transformations defined in the version mappings.

Parameters

version (str) – The version from which to start the conversion

Returns

The converted notebook

Return type

str

get_current_version()str

Retrieves the version of a specific notebook.

Returns

The version of the notebook

Return type

str

version_mappings = {'1.0': {'ProcessEdgeDataWithMd5': 'ProcessEdgeData', 'ProcessEdgeDataWithoutMd5': 'ProcessEdgeData', 'ProcessEdgeWithMd5': 'ProcessEdge', 'ProcessEdgeWithoutMd5': 'ProcessEdge', 'ProcessNodeWithMd5': 'OperationProcessNode', 'ProcessNodeWithoutMd5': 'OperationProcessNode'}}
version_steps = {'0': '1.0'}