Skip to content

Commit

Permalink
export AssetChecksDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
johannkm committed Nov 3, 2023
1 parent f837660 commit 5299f24
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/sphinx/sections/api/apidocs/asset-checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ Dagster allows you to define and execute checks on your software-defined assets.

.. autofunction:: load_asset_checks_from_package_module

.. autofunction:: load_asset_checks_from_package_name
.. autofunction:: load_asset_checks_from_package_name

.. autoclass:: AssetChecksDefinition
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
from typing import Any, Mapping, Sequence

from dagster import AssetCheckResult, Definitions, asset, asset_check
from dagster import (
AssetCheckResult,
AssetChecksDefinition,
Definitions,
asset,
asset_check,
)


@asset
Expand All @@ -13,7 +19,9 @@ def items():
...


def make_checks(check_blobs: Sequence[Mapping[str, str]]):
def make_checks(
check_blobs: Sequence[Mapping[str, str]]
) -> Sequence[AssetChecksDefinition]:
checks = []
for check_blob in check_blobs:

Expand Down
1 change: 1 addition & 0 deletions python_modules/dagster/dagster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
AssetCheckSeverity as AssetCheckSeverity,
AssetCheckSpec as AssetCheckSpec,
)
from dagster._core.definitions.asset_checks import AssetChecksDefinition as AssetChecksDefinition
from dagster._core.definitions.asset_dep import AssetDep as AssetDep
from dagster._core.definitions.asset_in import AssetIn as AssetIn
from dagster._core.definitions.asset_out import AssetOut as AssetOut
Expand Down

0 comments on commit 5299f24

Please sign in to comment.