refact: move Transformation to flux model
This commit is contained in:
@@ -4,9 +4,8 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
from plesna.dataplatform import DataPlateform
|
||||
from plesna.graph.graph import Node
|
||||
from plesna.models.flux import Flux
|
||||
from plesna.models.transformation import Transformation
|
||||
from plesna.models.graphs import Node
|
||||
from plesna.models.flux import Flux, Transformation
|
||||
from plesna.storage.repository.fs_repository import FSRepository
|
||||
|
||||
FIXTURE_DIR = Path(__file__).parent.parent / Path("raw_datas")
|
||||
@@ -55,7 +54,7 @@ def copy_flux(repository: FSRepository) -> Flux:
|
||||
raw_brz_copy_username = Flux(
|
||||
sources=raw_username,
|
||||
targets=bronze_username,
|
||||
transformation=Transformation(function=copy, extra_kwrds=extra_kwrds),
|
||||
transformation=Transformation(name="copy", function=copy, extra_kwrds=extra_kwrds),
|
||||
)
|
||||
return raw_brz_copy_username
|
||||
|
||||
@@ -76,7 +75,7 @@ def foo_flux(repository: FSRepository) -> Flux:
|
||||
flux = Flux(
|
||||
sources=src,
|
||||
targets=targets,
|
||||
transformation=Transformation(function=foo, extra_kwrds=extra_kwrds),
|
||||
transformation=Transformation(name="foo", function=foo, extra_kwrds=extra_kwrds),
|
||||
)
|
||||
return flux
|
||||
|
||||
|
||||
Reference in New Issue
Block a user