diff --git a/docs/conf.py b/docs/conf.py index 4854c59..fa0b391 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,6 +36,7 @@ "sphinx.ext.autodoc", "sphinx.ext.napoleon", "autoapi.extension", + "sphinx_issues", ] # autodoc configuration @@ -62,6 +63,9 @@ napoleon_numpy_docstring = True napoleon_preprocess_types = True +# Path to GitHub repo {group}/{project} (note that `group` is the GitHub user or organization) +issues_github_path = "ecmwf/earthkit-meteo" + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/docs/release_notes/index.rst b/docs/release_notes/index.rst index 37ca6f6..3e54796 100644 --- a/docs/release_notes/index.rst +++ b/docs/release_notes/index.rst @@ -4,4 +4,5 @@ Release notes .. toctree:: :maxdepth: 1 + version_0.2_updates version_0.1_updates diff --git a/docs/release_notes/version_0.2_updates.rst b/docs/release_notes/version_0.2_updates.rst new file mode 100644 index 0000000..70dc830 --- /dev/null +++ b/docs/release_notes/version_0.2_updates.rst @@ -0,0 +1,15 @@ +Version 0.2 Updates +///////////////////////// + + +Version 0.2.0 +=============== + +New features ++++++++++++++++ + +- Added the ``eps`` and ``out`` keywords arguments to control zero humidity in the following methods (:pr:`23`): + + - :py:meth:`dewpoint_from_specific_humidity ` + - :py:meth:`dewpoint_from_relative_humidity ` + - :py:meth:`temperature_from_saturation_vapour_pressure ` diff --git a/docs/requirements.txt b/docs/requirements.txt index bcfdc7d..ae01e54 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,3 +7,4 @@ sphinx-rtd-theme nbsphinx setuptools sphinx-autoapi +sphinx-issues diff --git a/environment.yml b/environment.yml index ec9248d..6511388 100644 --- a/environment.yml +++ b/environment.yml @@ -17,6 +17,7 @@ dependencies: - sphinx-autoapi - sphinx_rtd_theme - sphinxcontrib-apidoc +- sphinx-issues - nbformat - nbconvert - nbsphinx diff --git a/src/earthkit/meteo/thermo/array/thermo.py b/src/earthkit/meteo/thermo/array/thermo.py index 690f5e7..4155d1a 100644 --- a/src/earthkit/meteo/thermo/array/thermo.py +++ b/src/earthkit/meteo/thermo/array/thermo.py @@ -582,10 +582,11 @@ def temperature_from_saturation_vapour_pressure(es, eps=1e-8, out=None): eps: number If ``out`` is not None, return ``out`` when ``es`` < ``eps``. If out is None, ``eps`` is ignored and return np.nan for ``es`` values very - close to zero. + close to zero. *New in version 0.2.0* out: number or None If not None, return ``out`` when ``es`` < ``eps``. If None, ``eps`` is ignored and return np.nan for ``es`` values very close to zero. + *New in version 0.2.0* Returns @@ -786,10 +787,11 @@ def dewpoint_from_relative_humidity(t, r, eps=1e-8, out=None): eps: number If ``out`` is not None, return ``out`` when ``r`` < ``eps``. If out is None, ``eps`` is ignored and return np.nan for ``r`` - values very close to zero. + values very close to zero. *New in version 0.2.0* out: number or None If not None, return ``out`` when ``r`` < ``eps``. If None, ``eps`` is ignored and return np.nan for ``r`` values very close to zero. + *New in version 0.2.0* Returns ------- @@ -831,7 +833,7 @@ def dewpoint_from_relative_humidity(t, r, eps=1e-8, out=None): def dewpoint_from_specific_humidity(q, p, eps=1e-8, out=None): - r"""Computes the dewpoint temperature from specific humidity. + r"""Compute the dewpoint temperature from specific humidity. Parameters ---------- @@ -842,10 +844,11 @@ def dewpoint_from_specific_humidity(q, p, eps=1e-8, out=None): eps: number If ``out`` is not None, return ``out`` when ``q`` < ``eps``. If out is None, ``eps`` is ignored and return np.nan for ``q`` - values very close to zero. + values very close to zero. *New in version 0.2.0* out: number or None If not None, return ``out`` when ``q`` < ``eps``. If None, ``eps`` is ignored and return np.nan for ``q`` values very close to zero. + *New in version 0.2.0* Returns ------- diff --git a/tests/environment-unit-tests.yml b/tests/environment-unit-tests.yml index 17eefa1..78e3148 100644 --- a/tests/environment-unit-tests.yml +++ b/tests/environment-unit-tests.yml @@ -16,6 +16,7 @@ dependencies: - sphinx-autoapi - sphinx_rtd_theme - sphinxcontrib-apidoc +- sphinx-issues - nbformat - nbconvert - nbsphinx