-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature dagster check results (#271)
* Added dagster helper functions * bump version to dagster checks utilities
- Loading branch information
Showing
7 changed files
with
79 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[metadata] | ||
name = cuallee | ||
version = 0.11.1 | ||
version = 0.12.0 | ||
[options] | ||
packages = find: |
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,11 +1,27 @@ | ||
from cuallee.dagster import make_dagster_checks | ||
from cuallee.dagster import make_dagster_checks, make_check_specs, yield_check_results | ||
from cuallee import Check, CheckLevel | ||
import pandas as pd | ||
|
||
from typing import Iterator | ||
|
||
def test_make_checks(): | ||
df = pd.DataFrame({"id": [1, 2, 3, 4, 5]}) | ||
check = Check(CheckLevel.WARNING, "Dagster") | ||
check.is_complete("id") | ||
result = make_dagster_checks(check, "AssetName", df) | ||
assert isinstance(result, list) | ||
|
||
|
||
def test_make_check_specs(): | ||
df = pd.DataFrame({"id": [1, 2, 3, 4, 5]}) | ||
check = Check(CheckLevel.WARNING, "Dagster") | ||
check.is_complete("id") | ||
specs = make_check_specs(check, "test_asset") | ||
assert isinstance(specs, list) | ||
|
||
|
||
def test_yield_check_specs(): | ||
df = pd.DataFrame({"id": [1, 2, 3, 4, 5]}) | ||
check = Check(CheckLevel.WARNING, "Dagster") | ||
check.is_complete("id") | ||
results = yield_check_results(check, df) | ||
assert isinstance(results, Iterator) |
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