From 044aab0de1498abe4e67d0415d885d6815c64a45 Mon Sep 17 00:00:00 2001 From: Jessy Barrette <30420025+JessyBarrette@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:45:28 -0400 Subject: [PATCH] add placeholder for renamed parser functions for backward compatibility --- ocean_data_parser/parsers/star_oddi.py | 6 ++++++ ocean_data_parser/parsers/sunburst.py | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ocean_data_parser/parsers/star_oddi.py b/ocean_data_parser/parsers/star_oddi.py index c194bc9a..c67c4b6d 100644 --- a/ocean_data_parser/parsers/star_oddi.py +++ b/ocean_data_parser/parsers/star_oddi.py @@ -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. diff --git a/ocean_data_parser/parsers/sunburst.py b/ocean_data_parser/parsers/sunburst.py index c1eed383..05775125 100644 --- a/ocean_data_parser/parsers/sunburst.py +++ b/ocean_data_parser/parsers/sunburst.py @@ -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 = [] @@ -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.