Skip to content

Commit

Permalink
[toys] squelch warnings (#7419)
Browse files Browse the repository at this point in the history
at least for these toy repo i think its best to keep this off

we should also consider making the default behavior `once` for our messages since repeating the error isn't very useful

## Test Plan

run `dagit` in the root, see no more warning spam
  • Loading branch information
alangenfeld committed Apr 13, 2022
1 parent cb642cb commit e615623
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import os
import random
import string
import warnings

import pandas as pd

from dagster import (
Array,
AssetKey,
ExperimentalWarning,
Field,
MetadataEntry,
MetadataValue,
Expand All @@ -23,8 +21,6 @@
from dagster.core.storage.fs_io_manager import PickledObjectFilesystemIOManager
from dagster.core.storage.io_manager import io_manager

warnings.filterwarnings("ignore", category=ExperimentalWarning)


def get_date_partitions():
"""Every day in 2020"""
Expand Down Expand Up @@ -177,5 +173,3 @@ def asset_lineage():


asset_lineage_job = asset_lineage.to_job(resource_defs={"my_db_io_manager": my_db_io_manager})

warnings.resetwarnings()
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import warnings

from dagster import ExperimentalWarning

# squelch experimental warnings since we often include experimental things in toys for development
warnings.filterwarnings("ignore", category=ExperimentalWarning)

import pendulum
from dagster_test.graph_job_op_toys.asset_lineage import (
asset_lineage_job,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import os
import random
import string
import warnings

import pandas as pd

from dagster import (
Array,
AssetKey,
ExperimentalWarning,
Field,
MetadataEntry,
MetadataValue,
Expand All @@ -24,8 +22,6 @@
from dagster.core.storage.fs_io_manager import PickledObjectFilesystemIOManager
from dagster.core.storage.io_manager import io_manager

warnings.filterwarnings("ignore", category=ExperimentalWarning)


def get_date_partitions():
"""Every day in 2020"""
Expand Down Expand Up @@ -187,6 +183,3 @@ def daily_top_action(_, df1, df2):
def asset_lineage_pipeline():
reviews, comments = split_action_types(download_data())
daily_top_action(top_10_reviews(reviews), top_10_comments(comments))


warnings.resetwarnings()

0 comments on commit e615623

Please sign in to comment.