Skip to content

Commit

Permalink
add placeholder for renamed parser functions for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JessyBarrette committed Oct 4, 2024
1 parent a629c52 commit 044aab0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ocean_data_parser/parsers/star_oddi.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
}


def DAT(path: str, encoding: str = "cp1252") -> xarray.Dataset: # noqa
"""Deprecated Star-Oddi DAT files parser."""
logger.warning("Function name DAT is deprecated, use dat instead.")
return dat(path, encoding)


def dat(path: str, encoding: str = "cp1252") -> xarray.Dataset:
"""Parse Star-Oddi DAT files.
Expand Down
12 changes: 12 additions & 0 deletions ocean_data_parser/parsers/sunburst.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def _format_variables(name):
return name


def superCO2(path: str, output: str = None) -> xarray.Dataset: # noqa
"""Deprecated name for super_co2 function."""
logger.warning("Function name superCO2 is deprecated, use super_co2 instead.")
return super_co2(path, output)


def super_co2(path: str, output: str = None) -> xarray.Dataset:
"""Parse superCO2 output file txt file."""
header = []
Expand Down Expand Up @@ -134,6 +140,12 @@ def super_co2(path: str, output: str = None) -> xarray.Dataset:
return standardize_dataset(ds)


def superCO2_notes(path: str) -> xarray.Dataset: # noqa
"""Deprecated name for super_co2 function."""
logger.warning("Function name superCO2 is deprecated, use super_co2 instead.")
return super_co2_notes(path)


def super_co2_notes(path: str) -> xarray.Dataset:
"""Parse superCO2 notes files and return an xarray Dataset.
Expand Down

0 comments on commit 044aab0

Please sign in to comment.