Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 0 additions & 12 deletions swvo/io/dst/read_dst_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from __future__ import annotations

import logging
import warnings
from collections.abc import Sequence
from datetime import datetime, timezone

Expand All @@ -27,7 +26,6 @@ def read_dst_from_multiple_models(
model_order: Sequence[DSTModel] | None = None,
historical_data_cutoff_time: datetime | None = None,
*,
synthetic_now_time: datetime | None = None, # deprecated
download: bool = False,
) -> pd.DataFrame:
"""
Expand Down Expand Up @@ -57,16 +55,6 @@ def read_dst_from_multiple_models(
:class:`pandas.DataFrame`
A data frame containing data for the requested period.
"""
if synthetic_now_time is not None:
warnings.warn(
"`synthetic_now_time` is deprecated and will be removed in a future version. "
"Use `historical_data_cutoff_time` instead.",
DeprecationWarning,
stacklevel=2,
)
if historical_data_cutoff_time is None:
historical_data_cutoff_time = synthetic_now_time

if historical_data_cutoff_time is None:
historical_data_cutoff_time = min(datetime.now(timezone.utc), end_time)

Expand Down
12 changes: 0 additions & 12 deletions swvo/io/f10_7/read_f107_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from __future__ import annotations

import logging
import warnings
from collections.abc import Sequence
from datetime import datetime, timezone

Expand All @@ -27,7 +26,6 @@ def read_f107_from_multiple_models(
model_order: Sequence[F107Model] | None = None,
historical_data_cutoff_time: datetime | None = None,
*,
synthetic_now_time: datetime | None = None, # deprecated
download: bool = False,
) -> pd.DataFrame:
"""
Expand Down Expand Up @@ -58,16 +56,6 @@ def read_f107_from_multiple_models(
A data frame containing data for the requested
period.
"""
if synthetic_now_time is not None:
warnings.warn(
"`synthetic_now_time` is deprecated and will be removed in a future version. "
"Use `historical_data_cutoff_time` instead.",
DeprecationWarning,
stacklevel=2,
)
if historical_data_cutoff_time is None:
historical_data_cutoff_time = synthetic_now_time

if historical_data_cutoff_time is None:
historical_data_cutoff_time = min(datetime.now(timezone.utc), end_time)

Expand Down
12 changes: 0 additions & 12 deletions swvo/io/hp/read_hp_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from __future__ import annotations

import logging
import warnings
from collections.abc import Sequence
from datetime import datetime, timedelta, timezone
from typing import Literal
Expand All @@ -32,7 +31,6 @@ def read_hp_from_multiple_models( # noqa: PLR0913
reduce_ensemble: Literal["mean", "median"] | None = None,
historical_data_cutoff_time: datetime | None = None,
*,
synthetic_now_time: datetime | None = None, # deprecated
download: bool = False,
) -> pd.DataFrame | list[pd.DataFrame]:
"""
Expand Down Expand Up @@ -63,16 +61,6 @@ def read_hp_from_multiple_models( # noqa: PLR0913
Union[:class:`pandas.DataFrame`, list[:class:`pandas.DataFrame`]]
A data frame or a list of data frames containing data for the requested period.
"""
if synthetic_now_time is not None:
warnings.warn(
"`synthetic_now_time` is deprecated and will be removed in a future version. "
"Use `historical_data_cutoff_time` instead.",
DeprecationWarning,
stacklevel=2,
)
if historical_data_cutoff_time is None:
historical_data_cutoff_time = synthetic_now_time

if historical_data_cutoff_time is None:
historical_data_cutoff_time = min(datetime.now(timezone.utc), end_time)

Expand Down
11 changes: 0 additions & 11 deletions swvo/io/kp/read_kp_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def read_kp_from_multiple_models( # noqa: PLR0913
reduce_ensemble: Literal["mean", "median"] | None = None,
historical_data_cutoff_time: datetime | None = None,
*,
synthetic_now_time: datetime | None = None, # deprecated
download: bool = False,
recurrence: bool = False,
rec_model_order: Sequence[KpOMNI | KpNiemegk] | None = None,
Expand Down Expand Up @@ -73,16 +72,6 @@ def read_kp_from_multiple_models( # noqa: PLR0913
A data frame or a list of data frames containing data for the requested period.

"""
if synthetic_now_time is not None:
warnings.warn(
"`synthetic_now_time` is deprecated and will be removed in a future version. "
"Use `historical_data_cutoff_time` instead.",
DeprecationWarning,
stacklevel=2,
)
if historical_data_cutoff_time is None:
historical_data_cutoff_time = synthetic_now_time

if historical_data_cutoff_time is None:
historical_data_cutoff_time = min(datetime.now(timezone.utc), end_time)

Expand Down
12 changes: 0 additions & 12 deletions swvo/io/solar_wind/read_solar_wind_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from __future__ import annotations

import logging
import warnings
from collections.abc import Sequence
from datetime import datetime, timedelta, timezone
from typing import Literal, Optional
Expand All @@ -32,7 +31,6 @@ def read_solar_wind_from_multiple_models( # noqa: PLR0913
reduce_ensemble: Optional[Literal["mean", "median"]] = None,
historical_data_cutoff_time: datetime | None = None,
*,
synthetic_now_time: datetime | None = None, # deprecated
download: bool = False,
recurrence: bool = False,
rec_model_order: list[DSCOVR | SWACE | SWOMNI] | None = None,
Expand Down Expand Up @@ -83,16 +81,6 @@ def read_solar_wind_from_multiple_models( # noqa: PLR0913

assert reduce_ensemble in (None, "mean", "median"), "reduce_ensemble must be None, `mean` or `median`"

if synthetic_now_time is not None:
warnings.warn(
"`synthetic_now_time` is deprecated and will be removed in a future version. "
"Use `historical_data_cutoff_time` instead.",
DeprecationWarning,
stacklevel=2,
)
if historical_data_cutoff_time is None:
historical_data_cutoff_time = synthetic_now_time

if historical_data_cutoff_time is None:
historical_data_cutoff_time = min(datetime.now(timezone.utc), end_time)

Expand Down
8 changes: 0 additions & 8 deletions tests/io/dst/test_read_dst_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,6 @@ def test_data_consistency(self, sample_times):

pd.testing.assert_frame_equal(data1, data2)

def test_synthetic_now_time_deprecation_with_message(self, sample_times):
with pytest.warns(DeprecationWarning, match="synthetic_now_time.*deprecated"):
read_dst_from_multiple_models(
start_time=sample_times["past_start"],
end_time=sample_times["future_end"],
synthetic_now_time=sample_times["test_time_now"],
)

def test_model_check_with_wrong_class(self, sample_times):
class FakeModel:
pass
Expand Down
8 changes: 0 additions & 8 deletions tests/io/f10_7/test_read_f107_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,6 @@ def test_data_consistency(self, sample_times):

pd.testing.assert_frame_equal(data1, data2)

def test_synthetic_now_time_deprecation_with_message(self, sample_times):
with pytest.warns(DeprecationWarning, match="synthetic_now_time.*deprecated"):
read_f107_from_multiple_models(
start_time=sample_times["past_start"],
end_time=sample_times["future_end"],
synthetic_now_time=sample_times["test_time_now"],
)

def test_model_check_with_wrong_class(self, sample_times):
class FakeModel:
pass
Expand Down
10 changes: 0 additions & 10 deletions tests/io/hp/test_read_hp_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,6 @@ def test_data_consistency(self, sample_times, hp_index, models):

pd.testing.assert_frame_equal(data1, data2)

def test_synthetic_now_time_deprecation_with_message(self, sample_times, hp_index, models):
with pytest.warns(DeprecationWarning, match="synthetic_now_time.*deprecated"):
read_hp_from_multiple_models(
start_time=sample_times["past_start"],
end_time=sample_times["future_end"],
synthetic_now_time=sample_times["test_time_now"],
hp_index=hp_index,
model_order=[models[0]()],
)

def test_model_check_with_wrong_class(self, sample_times, hp_index, models):
_ = models

Expand Down
8 changes: 0 additions & 8 deletions tests/io/kp/test_read_kp_from_multiple_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,6 @@ def test_data_consistency(self, sample_times):

pd.testing.assert_frame_equal(data1, data2)

def test_synthetic_now_time_deprecation_with_message(self, sample_times):
with pytest.warns(DeprecationWarning, match="synthetic_now_time.*deprecated"):
read_kp_from_multiple_models(
start_time=sample_times["past_start"],
end_time=sample_times["future_end"],
synthetic_now_time=sample_times["test_time_now"],
)

def test_model_check_with_wrong_class(self, sample_times):
class FakeModel:
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,6 @@ def test_data_consistency(self, sample_times):
for d1, d2 in zip(data1, data2):
pd.testing.assert_frame_equal(d1, d2)

def test_synthetic_now_time_deprecation_with_message(self, sample_times):
with pytest.warns(DeprecationWarning, match="synthetic_now_time.*deprecated"):
read_solar_wind_from_multiple_models(
start_time=sample_times["past_start"],
end_time=sample_times["future_end"],
synthetic_now_time=sample_times["test_time_now"],
)

def test_model_check_with_wrong_class(self, sample_times):
class FakeModel:
pass
Expand Down
Loading