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.
- path: str = None
- class mosaic_orchestrator.pdk.Library(name: str, items: List[PdkItem])[source]
A Library can be used to combine related Items
- 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.