Skip to content

Commit

Permalink
asset check decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Jun 8, 2024
1 parent d173e51 commit 9ae78b6
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,47 @@ def checks():

def inner(fn: MultiAssetCheckFunction) -> AssetChecksDefinition:
op_name = name or fn.__name__
# # upstream_asset_deps= {spec.asset_key for spec in specs} | {dep.asset_key for spec in specs for dep in spec.additional_deps or []},
# upstream_asset_deps: List[AssetDep] = []
# for check_spec in specs:
# upstream_asset_deps.extend(check_spec.additional_deps)

# builder = DecoratorAssetsDefinitionBuilder(
# fn=fn,
# op_name=op_name,
# internal_deps={},
# named_ins_by_asset_key={},
# named_outs_by_asset_key={},
# args=DecoratorAssetsDefinitionBuilderArgs(
# decorator_name="@multi_asset_check",
# name=None,
# description=description,
# required_resource_keys=required_resource_keys,
# config_schema=config_schema,
# retry_policy=retry_policy,
# specs=[],
# check_specs=specs,
# can_subset=can_subset,
# compute_kind=compute_kind,
# op_tags=op_tags,
# op_def_resource_defs=resource_defs,
# assets_def_resource_defs=resource_defs,
# upstream_asset_deps=upstream_asset_deps,
# # unsupported capabiltiies in asset checks
# partitions_def=None,
# code_version=None,
# backfill_policy=None,
# group_name=None,
# # non-sensical args in this context
# asset_deps={},
# asset_in_map={},
# asset_out_map={},
# ),
# )

# builder = DecoratorAssetsDefinitionBuilder.from_specs()
# return builder.create_assets_checks_definition()

op_required_resource_keys = compute_required_resource_keys(
required_resource_keys, resource_defs, fn=fn, decorator_name="@multi_asset_check"
)
Expand Down

0 comments on commit 9ae78b6

Please sign in to comment.