From 9e01aa2271587c47f3316c09eaab26d1ea76bfe3 Mon Sep 17 00:00:00 2001 From: Felix K Jose Date: Thu, 20 Aug 2020 21:07:58 -0400 Subject: [PATCH] Fixed the integration with 'Read the Docs' and added some useful print statements. --- airflowdaggenerator/airflowdaggenerator.py | 4 +++- docs/conf.py | 4 ++++ tests/data/output/output.txt | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/data/output/output.txt diff --git a/airflowdaggenerator/airflowdaggenerator.py b/airflowdaggenerator/airflowdaggenerator.py index 627557e..da25638 100644 --- a/airflowdaggenerator/airflowdaggenerator.py +++ b/airflowdaggenerator/airflowdaggenerator.py @@ -86,12 +86,14 @@ def main(): :raises ValueError: when the user provided input is invalid. For example, if the output dag file name provided is not a .py file or the input YAML config file doesn't contain any parameters or is invalid :raises AssertionError: when there is validation error on the generated DAG files """ - print(sys.argv) runtime_args = __get_args__(sys.argv[1:]) + print("Starting the Airflow DAG file Generation") generate_dag(runtime_args.input_config_yaml_path, runtime_args.input_config_yaml_file_name, runtime_args.input_template_path, runtime_args.input_template_file_name, runtime_args.output_dag_path, runtime_args.output_dag_file_name) + print("Successfully Generated the Airflow DAG Python file under '{0}'".format(runtime_args.output_dag_path)) validate_dag(runtime_args.output_dag_path) + print("Successfully Validated the generated Airflow DAG Python file") diff --git a/docs/conf.py b/docs/conf.py index 7140e3b..afa24ba 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,3 +57,7 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] + +# The document name of the “master” document, that is, the document that contains the root toctree directive to get it +# working with Read the Docs +master_doc = 'index' diff --git a/tests/data/output/output.txt b/tests/data/output/output.txt new file mode 100644 index 0000000..585f4b4 --- /dev/null +++ b/tests/data/output/output.txt @@ -0,0 +1 @@ +# Output from the tests will be saved to this folder!!! \ No newline at end of file