Filter Files with Pattern
Air2phin will only migrate files that pass its filter rule, default is *.py
(include all python files in the given path).
Custom Include Pattern
Migration include files behavior can be overwritten by option argument --include
or -I
, for example
if you want to migrate all python files with the prefix airflow
, you can use a single command
air2phin migrate --include 'airflow*.py' /PATH/TO/DIRECTORY
Custom Exclude Pattern
Migration all files exclude some files or directory can use option argument --exclude
or -E
, for example
if you want to exclude all python files in package utils
, you can use the command
air2phin migrate --exclude 'utils/*.py' /PATH/TO/DIRECTORY
Note
Both include and exclude option argument respect Path.rglob
rule, if you want to include add Python files match dag-*.py
in the directory ~/airflow/dags
expect utils
directory, you can
use air2phin migrate --include 'dag-*.py' --exclude 'utils/*' ~/airflow/dags
For more detail please see CLI.