Skip to content

Commit

Permalink
Better deprecation introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Sep 20, 2024
1 parent 2669301 commit f3b0a56
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
17 changes: 9 additions & 8 deletions argopy/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ class set_options:
Parameters
----------
dataset: str, default: 'phy'
Define the Dataset to work with: ``phy``, ``bgc`` or ``ref``
.. deprecated:: 0.1.17
- Replaced by ``ds`` in versions >= v0.1.18
src: str, default: 'erddap'
Source of fetched data: ``erddap``, ``gdac``, ``argovis``
Expand All @@ -111,6 +114,10 @@ class set_options:
ftp: str, default: 'https://data-argo.ifremer.fr'
Default path to be used by the GDAC fetchers and Argo index stores
.. deprecated:: 0.1.17
- Replaced by ``gdac`` in versions >= v0.1.18
erddap: str, default: 'https://erddap.ifremer.fr/erddap'
Default server address to be used by the data and index erddap fetchers
Expand Down Expand Up @@ -161,13 +168,7 @@ class set_options:
Warns
-----
A DeprecationWarning can be raised when a deprecated option is set.
.. deprecated:: 0.1.7
- ``dataset`` will be removed in 1.0.0, it is replaced by ``ds``
- ``ftp`` will be removed in 1.0.0, it is replaced by ``gdac``
A DeprecationWarning can be raised when a deprecated option is set
"""

Expand Down
5 changes: 1 addition & 4 deletions argopy/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,7 @@ def profile2point(self):
return ds

@deprecated(
"This method action and signature are deprecated and will break your code for versions >= 0.1.18. "
"In versions >= 0.1.18, this method action will be available in the new `transform_data_mode` method while "
"this method will change its signature and behavior to really filter measurements according to DATA_MODE "
"or <PARAM>_DATA_MODE values.",
"This method is deprecated and will break your code for versions >= 0.1.18. ",
ignore_caller="postprocessing",
version="0.1.17",
)
Expand Down
11 changes: 10 additions & 1 deletion docs/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ Coming up next
Features and front-end API
^^^^^^^^^^^^^^^^^^^^^^^^^^

- Introduces deprecation warnings for the upcoming major release v1.0.0.
.. important:: Introduces deprecation warnings before the upcoming major release v1.0.0. (:pr:`389`) by `G. Maze <http://www.github.com/gmaze>`_.

.. currentmodule:: xarray

- Change of signature and action with xarray Argo accessor :meth:`Dataset.argo.filter_data_mode`

.. currentmodule:: argopy

- Refactor option "dataset" into "ds", see :class:`argopy.set_options`
- Refactor option "ftp" into "gdac", see :class:`argopy.set_options`

Internals
^^^^^^^^^
Expand Down

0 comments on commit f3b0a56

Please sign in to comment.