pdk

this module contains the abstract PDK implementation

class mosaic_orchestrator.pdk.FileBasePdkItem(version: str, name: str, path: Optional[str] = None)[source]

File PdkItem implementation. Contains a path, validation fails if file not exists.

exists() bool[source]

checks if th file exists

path: str = None
class mosaic_orchestrator.pdk.Library(name: str, items: List[PdkItem])[source]

A Library can be used to combine related Items

items: List[PdkItem]
name: str
class mosaic_orchestrator.pdk.PDK[source]

abstract base PDK implementation, use RootPDK for lifecycle dependent PDKs.

Implementation of the task_hash method is mandatory in order to include the PDK in the state representation of a CachableTask.

get_item(name, versions: Optional[str] = None) Result[PdkItem][source]

get a item from the pdk identified by its name and a versions string.

The versions string follows the NPM range specification scheme (https://docs.npmjs.com/about-semantic-versioning). When multiple versions match the newest one is returned.

Returns:

A Result object containing either the item or an error.

abstract get_library(name) Library[source]

implement this method to provide a library for the given name

property name

Return the name of the pdk

abstract supported_items() List[PdkItem][source]

implement this method to provide a list of all items supported by your implementation.

abstract supported_libraries() List[Library][source]

implement this method to provide a list of all libraries supported by your implementation.

task_hash()[source]

represents the state of this PDK. The same function will be used for all PDK items in the task hierarchy.

class mosaic_orchestrator.pdk.PdkItem(name: str, version: str)[source]

Single entry in the PDK, subclass to implement more functionality

name: str
version: str
class mosaic_orchestrator.pdk.RootPDK(*args, **kwargs)[source]

Abstract base class for a PDK.