cleaning
parent
59ce8f1f1b
commit
5491d2f1dd
@ -1,45 +0,0 @@
|
|||||||
"Application entry point"
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
from typing import Dict
|
|
||||||
|
|
||||||
from kedro.framework.context import KedroContext, load_package_context
|
|
||||||
from kedro.pipeline import Pipeline
|
|
||||||
|
|
||||||
from actes_princiers.pipeline_registry import register_pipelines
|
|
||||||
from actes_princiers.actesdataset import XMLDataSet
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ProjectContext(KedroContext):
|
|
||||||
project_name = "actes princiers"
|
|
||||||
project_version = "0.1"
|
|
||||||
package_name = "actes_princiers"
|
|
||||||
|
|
||||||
def _get_pipelines(self) -> Dict[str, Pipeline]:
|
|
||||||
# return create_pipelines()
|
|
||||||
return register_pipelines()
|
|
||||||
|
|
||||||
def _get_catalog(self, *args, **kwargs):
|
|
||||||
catalog = super()._get_catalog(*args, **kwargs)
|
|
||||||
catalog.add(data_set_name="mon_test_de_catalogue",
|
|
||||||
data_set=XMLDataSet(
|
|
||||||
filepath="data/02_intermediate/xml/Anjou/test.dat",
|
|
||||||
),
|
|
||||||
replace=True,
|
|
||||||
)
|
|
||||||
|
|
||||||
return catalog
|
|
||||||
|
|
||||||
def run_package():
|
|
||||||
# Entry point for running a Kedro project packaged with `kedro package`
|
|
||||||
# using `python -m <project_package>.run` command.
|
|
||||||
project_context = load_package_context(
|
|
||||||
project_path=Path.cwd(),
|
|
||||||
package_name=Path(__file__).resolve().parent.name
|
|
||||||
)
|
|
||||||
project_context.run()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
run_package()
|
|
||||||
Loading…
Reference in New Issue