-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from zbrookle/add_py_typed
Add py typed
- Loading branch information
Showing
16 changed files
with
112 additions
and
46 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
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
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
Empty file.
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,43 @@ | ||
import pytest | ||
|
||
from avionix_airflow import AirflowOptions | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"local_mode,worker_image,worker_image_tag,master_image,master_image_tag", | ||
[ | ||
(True, "", "", "", ""), | ||
(False, "", "", "", ""), | ||
(True, "test-image", "oldest", "", ""), | ||
(False, "test-image", "oldest", "", ""), | ||
], | ||
) | ||
def test_airflow_options_images( | ||
local_mode: bool, | ||
worker_image: str, | ||
worker_image_tag: str, | ||
master_image: str, | ||
master_image_tag: str, | ||
): | ||
options = AirflowOptions( | ||
"busybox", | ||
["test"], | ||
"* * * * *", | ||
local_mode=local_mode, | ||
worker_image=worker_image, | ||
worker_image_tag=worker_image_tag, | ||
master_image=master_image, | ||
master_image_tag=master_image_tag, | ||
) | ||
|
||
# Assert expected master image behavior | ||
if master_image: | ||
assert options.master_image == (master_image if master_image else "") | ||
if not master_image and local_mode: | ||
assert options.master_image == "airflow-image" | ||
assert options.master_image_tag == ( | ||
master_image_tag if master_image_tag else "latest" | ||
) | ||
assert options.worker_image_tag == ( | ||
worker_image_tag if worker_image_tag else "latest" | ||
) |
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,3 +1,3 @@ | ||
avionix>=0.4.2 | ||
avionix>=0.4.3 | ||
python-hosts==1.0.0 | ||
cryptography==3.0 |
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