Skip to content

Commit

Permalink
chore: delete deprecated functions (#152)
Browse files Browse the repository at this point in the history
Delete some deprecated functions
  • Loading branch information
renaudjester committed Oct 28, 2024
1 parent 6027088 commit 4df57fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 42 deletions.
2 changes: 0 additions & 2 deletions copernicusmarine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@
from copernicusmarine.python_interface.get import get
from copernicusmarine.python_interface.login import login
from copernicusmarine.python_interface.open_dataset import (
load_xarray_dataset, # depracated
open_dataset,
)
from copernicusmarine.python_interface.read_dataframe import (
load_pandas_dataframe, # depracated
read_dataframe,
)
from copernicusmarine.python_interface.subset import subset
22 changes: 2 additions & 20 deletions copernicusmarine/python_interface/open_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import xarray

from copernicusmarine.catalogue_parser.request_structure import LoadRequest
from copernicusmarine.core_functions.deprecated import (
deprecated_python_option,
log_deprecated_message,
)
from copernicusmarine.core_functions.deprecated import deprecated_python_option
from copernicusmarine.core_functions.deprecated_options import (
DEPRECATED_OPTIONS,
)
Expand Down Expand Up @@ -37,22 +34,7 @@
from copernicusmarine.python_interface.utils import homogenize_datetime


@log_exception_and_exit
def load_xarray_dataset(*args, **kwargs):
"""
Deprecated function, use 'open_dataset' instead.
"""
log_deprecated_message(
"load_xarray_dataset",
"open_dataset",
deleted_for_v2=True,
deprecated_for_v2=False,
only_for_v2=False,
)
return open_dataset(*args, **kwargs)


@deprecated_python_option(DEPRECATED_OPTIONS)
@deprecated_python_option(**DEPRECATED_OPTIONS.dict_old_names_to_new_names)
@log_exception_and_exit
def open_dataset(
dataset_id: str,
Expand Down
22 changes: 2 additions & 20 deletions copernicusmarine/python_interface/read_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import pandas

from copernicusmarine.catalogue_parser.request_structure import LoadRequest
from copernicusmarine.core_functions.deprecated import (
deprecated_python_option,
log_deprecated_message,
)
from copernicusmarine.core_functions.deprecated import deprecated_python_option
from copernicusmarine.core_functions.deprecated_options import (
DEPRECATED_OPTIONS,
)
Expand Down Expand Up @@ -37,22 +34,7 @@
from copernicusmarine.python_interface.utils import homogenize_datetime


@log_exception_and_exit
def load_pandas_dataframe(*args, **kwargs):
"""
Deprecated function, use 'read_dataframe' instead.
"""
log_deprecated_message(
"load_pandas_dataframe",
"read_dataframe",
deleted_for_v2=True,
deprecated_for_v2=False,
only_for_v2=False,
)
return read_dataframe(*args, **kwargs)


@deprecated_python_option(DEPRECATED_OPTIONS)
@deprecated_python_option(**DEPRECATED_OPTIONS.dict_old_names_to_new_names)
@log_exception_and_exit
def read_dataframe(
dataset_id: str,
Expand Down

0 comments on commit 4df57fb

Please sign in to comment.