mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-29 03:50:04 +00:00
19 lines
523 B
Python
19 lines
523 B
Python
from typing import ClassVar, List, Optional
|
|
|
|
import yaml
|
|
from pydantic import Field
|
|
|
|
from open_notebook.domain.base import RecordModel
|
|
|
|
|
|
class Transformation:
|
|
@classmethod
|
|
def get_all(cls):
|
|
with open("transformations.yaml", "r") as file:
|
|
transformations = yaml.safe_load(file)
|
|
return transformations
|
|
|
|
|
|
class DefaultTransformations(RecordModel):
|
|
record_id: ClassVar[str] = "open_notebook:default_transformations"
|
|
source_insights: Optional[List[str]] = Field(default_factory=list)
|