Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing robustness functions in docs #1630

Merged
merged 9 commits into from
Jan 29, 2024
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Bug fixes
* Fix wrong `window` attributes in ``xclim.indices.standardized_precipitation_index``, ``xclim.indices.standardized_precipitation_evapotranspiration_index``. (:issue:`1552` :pull:`1554`).
* Fix the daily case `freq='D'` of ``xclim.stats.preprocess_standardized_index`` (:issue:`1602` :pull:`1607`).
* Several spelling mistakes have been corrected within the documentation and codebase. (:pull:`1576`).
* Added missing ``xclim.ensembles.robustness_fractions`` and ``xclim.ensembles.robistness_categoris`` in api doc section. (:pull:`1630`).

Internal changes
^^^^^^^^^^^^^^^^
Expand Down
6 changes: 6 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ Ensembles Module
.. automodule:: xclim.ensembles._robustness
:noindex:

.. autofunction:: xclim.ensembles.robustness_fractions
:noindex:

.. autofunction:: xclim.ensembles.robustness_categories
:noindex:

.. autofunction:: xclim.ensembles.change_significance
:noindex:

Expand Down
4 changes: 2 additions & 2 deletions xclim/ensembles/_robustness.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def robustness_fractions( # noqa: C901
pvals :
The p-values estimated by the significance tests. Only returned if the test uses `pvals`. Has the `realization` dimension.

Notes
-----
The table below shows the coefficient needed to retrieve the number of members
that have the indicated characteristics, by multiplying it by the total
number of members (`fut.realization.size`) and by `valid_frac`, assuming uniform weights.
Expand All @@ -116,8 +118,6 @@ def robustness_fractions( # noqa: C901
| Negative change | (cf - cpf) | 1 - pf - (cf -cpf) | 1 - pf |
+-----------------+--------------------+------------------------+------------+

Notes
-----
Available statistical tests are :

{tests_doc}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are some tests missing on purpose @aulemahal ? I see ipcc-ar6-c in the example notebook but I can't find it in the code?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woups, the automatic tests doc generation was done on the wrong method. I think I came up with the mechanism before changing the function name.

Expand Down
Loading