Skip to content

Commit

Permalink
doc strings, some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Sep 6, 2023
1 parent 9c7ac93 commit 658e8c4
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docs/content/api/modules.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/content/api/searchindex.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/content/api/sections.json

Large diffs are not rendered by default.

Binary file modified docs/next/public/objects.inv
Binary file not shown.
332 changes: 311 additions & 21 deletions python_modules/dagster/dagster/_core/execution/context/compute.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,10 @@ def asset_partitions_time_window_for_asset(
asset_layer = self.job_def.asset_layer
asset_key = AssetKey.from_coercible(asset)

if not asset_layer.has_assets_def_for_asset(asset_key):
if (
not asset_layer.has_assets_def_for_asset(asset_key)
and asset_layer.source_assets_by_key.get(asset_key, None) is None
):
raise ValueError("The provided asset key does not correspond to an asset.")

asset_partitions_def = asset_layer.partitions_def_for_asset(asset_key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
from dagster._core.types.dagster_type import resolve_dagster_type


# @pytest.fixture(autouse=True)
# def error_on_warning():
# # turn off any outer warnings filters, e.g. ignores that are set in pyproject.toml
# warnings.resetwarnings()
@pytest.fixture(autouse=True)
def error_on_warning():
# turn off any outer warnings filters, e.g. ignores that are set in pyproject.toml
warnings.resetwarnings()

# warnings.filterwarnings("error")
warnings.filterwarnings("error")


def test_asset_no_decorator_args():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
from dagster._core.test_utils import ignore_warning, instance_for_test


# @pytest.fixture(autouse=True)
# def error_on_warning():
# # turn off any outer warnings filters, e.g. ignores that are set in pyproject.toml
# warnings.resetwarnings()
@pytest.fixture(autouse=True)
def error_on_warning():
# turn off any outer warnings filters, e.g. ignores that are set in pyproject.toml
warnings.resetwarnings()

# warnings.filterwarnings("error")
warnings.filterwarnings("error")


def test_basic_materialize():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
from dagster._seven.compat.pendulum import create_pendulum_time


# @pytest.fixture(autouse=True)
# def error_on_warning():
# # turn off any outer warnings filters, e.g. ignores that are set in pyproject.toml
# warnings.resetwarnings()
@pytest.fixture(autouse=True)
def error_on_warning():
# turn off any outer warnings filters, e.g. ignores that are set in pyproject.toml
warnings.resetwarnings()

# warnings.filterwarnings("error")
warnings.filterwarnings("error")


def get_upstream_partitions_for_partition_range(
Expand Down

0 comments on commit 658e8c4

Please sign in to comment.