Skip to content

Commit

Permalink
Merge pull request #52 from chriscardillo/v0.17.0
Browse files Browse the repository at this point in the history
v0.17.0
  • Loading branch information
chriscardillo authored Feb 7, 2023
2 parents 88304ef + 44fb8db commit 043a567
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ While `METADATA.yml` will always be the primary source of truth for a DAG or Tas
Here's an example using `create_dag`, where instead of metadata we use `create_dag` arguments:

```py
import airflow
from datetime import timedelta
from airflow.utils.dates import days_ago
from gusty import create_dag
Expand Down Expand Up @@ -192,7 +191,6 @@ If you have multiple gusty DAGs located inside of a single directory, you can co
Let's adjust the above `create_dag` example to use `create_dags` instead:

```py
import airflow
from datetime import timedelta
from airflow.utils.dates import days_ago
from gusty import create_dags
Expand Down
1 change: 0 additions & 1 deletion gusty/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import airflow # noqa
from gusty.building import GustyBuilder


Expand Down
8 changes: 4 additions & 4 deletions gusty/building.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os, inspect, airflow
from airflow import DAG
import os, inspect
from airflow.models import BaseOperator, DAG
from absql import Runner
from functools import partial
from gusty.errors import NonexistentDagDirError
Expand Down Expand Up @@ -150,7 +150,7 @@ def build_task(spec, level_id, schematic):
k: v
for k, v in spec.items()
if k
in inspect.signature(airflow.models.BaseOperator.__init__).parameters.keys()
in inspect.signature(BaseOperator.__init__).parameters.keys()
or k in _get_operator_parameters(operator)
or k in _get_operator_parameters(operator.__base__)
}
Expand Down Expand Up @@ -289,7 +289,7 @@ def __init__(self, dag_dir, **kwargs):
if k in AVAILABLE_WAIT_FOR_PARAMS
or k
in inspect.signature(
airflow.models.BaseOperator.__init__
BaseOperator.__init__
).parameters.keys()
}
self.wait_for_defaults.update(user_wait_for_defaults)
Expand Down
5 changes: 3 additions & 2 deletions gusty/importing.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import os, sys, pkgutil, itertools, airflow, importlib
import os, sys, pkgutil, itertools, importlib
from airflow.version import version as _airflow_version
from inflection import underscore

############
## Params ##
############

airflow_version = int(str(airflow.__version__).split(".")[0])
airflow_version = int(_airflow_version.split(".")[0])

###########################
## Operator Import Logic ##
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="gusty",
version="0.16.0",
version="0.17.0",
author="Chris Cardillo, Michael Chow, David Robinson",
author_email="cfcardillo23@gmail.com",
description="Making DAG construction easier",
Expand Down

0 comments on commit 043a567

Please sign in to comment.