LineaLabs / lineapy

Move fast from data science prototype to pipeline. Capture, analyze, and transform messy notebooks into data pipelines with just two lines of code.
https://lineapy.org
Apache License 2.0
662 stars 58 forks source link

Add export dir to python cli airflow slice #817

Closed andycui97 closed 1 year ago

andycui97 commented 1 year ago

Description

Add export-dir cli option to lineapy cli. This allows the user to specify a directory to export their slices to. Defaults to "."

Please delete options that are not relevant.

How Has This Been Tested?

lineapy python --slice p\ value --slice y --airflow sliced_housing_dag --export-dir /tmp tests/housing.py
lineapy python --slice p\ value --export-slice p_value_housing --slice y  --export-slice y_housing --export-dir /tmp tests/housing.py

And ensure sliced files are visible in /tmp.

Also ensure no behavior change if export_dir not specified.