-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
131 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
from airflow.models import DagBag | ||
|
||
CONST_DAG_DIRECTORY = "dags" | ||
|
||
CONST_AIRFLOW_HOME = os.environ.get("AIRFLOW_HOME", Path(__file__).parent.parent) | ||
|
||
|
||
def test_no_import_errors() -> None: | ||
dag_folder = f"{CONST_AIRFLOW_HOME}/{CONST_DAG_DIRECTORY}" | ||
dag_bag = DagBag(dag_folder=dag_folder, include_examples=False) | ||
assert len(dag_bag.import_errors) == 0, "No Import Failures" | ||
|
||
|
||
def test_retries_present() -> None: | ||
dag_folder = f"{CONST_AIRFLOW_HOME}/{CONST_DAG_DIRECTORY}" | ||
dag_bag = DagBag(dag_folder=dag_folder, include_examples=False) | ||
for dag in dag_bag.dags: | ||
retries = dag_bag.dags[dag].default_args.get("retries", []) | ||
error_msg = f"Retries are set for DAG {dag}" | ||
assert retries >= 1, error_msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
[mypy] | ||
|
||
mypy_path=./dags:./dbts | ||
python_version=3.11 | ||
mypy_path=./dags:./dbts:./dags-test | ||
|
||
strict=True | ||
ignore_missing_imports=True | ||
disallow_untyped_decorators=False | ||
show_error_codes = True | ||
show_error_context = True | ||
show_column_numbers = True | ||
warn_no_return = false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[pytest] | ||
filterwarnings = | ||
ignore::DeprecationWarning | ||
|
||
log_cli=true | ||
log_level=INFO | ||
log_cli_level=INFO |