Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent overflowing logs #149

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions timely_beliefs/beliefs/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,15 +2211,17 @@ def set_columns_and_indices_for_empty_frame(df, columns, indices, default_types)
def assign_sensor_and_event_resolution(df, sensor, event_resolution):
"""Set the Sensor metadata (including timing properties of the sensor)."""

if not isinstance(sensor, Sensor):
import warnings

warnings.warn(
"'sensor' field needs to be of type 'Sensor'. This constraint will be enforced in an upcoming version.",
FutureWarning,
)

# TODO: raise ValueError(...)
# https://github.com/SeitaBV/timely-beliefs/issues/145
# if not isinstance(sensor, Sensor):
# import warnings
#
# warnings.warn(
# "'sensor' field needs to be of type 'Sensor'. This constraint will be enforced in an upcoming version.",
# FutureWarning,
# # stacklevel=6,
# )
#
# # TODO: raise ValueError(...)

df.sensor = sensor
df.event_resolution = (
Expand Down