Skip to content

Commit

Permalink
chore(release): 1.0.5 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicrie authored Jul 31, 2023
2 parents b39bdaf + c95f658 commit 1dc9ce6
Show file tree
Hide file tree
Showing 84 changed files with 11,470 additions and 4,343 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,14 @@ jobs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# This action uses Python Semantic Release v8
- name: Python semantic release
id: release
uses: python-semantic-release/python-semantic-release@v8.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/python-semantic-release@v7.34.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
7 changes: 7 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# Required
version: 2

# Use mamba instead of conda
build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"


# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand Down
2 changes: 2 additions & 0 deletions docs/_autosummary/xeofs.models.ComplexMCA.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
~ComplexMCA.components_amplitude
~ComplexMCA.components_phase
~ComplexMCA.compute
~ComplexMCA.covariance_fraction
~ComplexMCA.fit
~ComplexMCA.get_params
~ComplexMCA.heterogeneous_patterns
Expand All @@ -29,6 +30,7 @@
~ComplexMCA.scores
~ComplexMCA.scores_amplitude
~ComplexMCA.scores_phase
~ComplexMCA.singular_values
~ComplexMCA.squared_covariance
~ComplexMCA.squared_covariance_fraction
~ComplexMCA.transform
Expand Down
2 changes: 2 additions & 0 deletions docs/_autosummary/xeofs.models.ComplexMCARotator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
~ComplexMCARotator.components_amplitude
~ComplexMCARotator.components_phase
~ComplexMCARotator.compute
~ComplexMCARotator.covariance_fraction
~ComplexMCARotator.fit
~ComplexMCARotator.get_params
~ComplexMCARotator.heterogeneous_patterns
Expand All @@ -29,6 +30,7 @@
~ComplexMCARotator.scores
~ComplexMCARotator.scores_amplitude
~ComplexMCARotator.scores_phase
~ComplexMCARotator.singular_values
~ComplexMCARotator.squared_covariance
~ComplexMCARotator.squared_covariance_fraction
~ComplexMCARotator.transform
Expand Down
2 changes: 2 additions & 0 deletions docs/_autosummary/xeofs.models.MCA.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
~MCA.__init__
~MCA.components
~MCA.compute
~MCA.covariance_fraction
~MCA.fit
~MCA.get_params
~MCA.heterogeneous_patterns
~MCA.homogeneous_patterns
~MCA.inverse_transform
~MCA.scores
~MCA.singular_values
~MCA.squared_covariance
~MCA.squared_covariance_fraction
~MCA.transform
Expand Down
2 changes: 2 additions & 0 deletions docs/_autosummary/xeofs.models.MCARotator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
~MCARotator.__init__
~MCARotator.components
~MCARotator.compute
~MCARotator.covariance_fraction
~MCARotator.fit
~MCARotator.get_params
~MCARotator.heterogeneous_patterns
~MCARotator.homogeneous_patterns
~MCARotator.inverse_transform
~MCARotator.scores
~MCARotator.singular_values
~MCARotator.squared_covariance
~MCARotator.squared_covariance_fraction
~MCARotator.transform
Expand Down
37 changes: 7 additions & 30 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,18 @@
API
==================

.. toctree::
:maxdepth: 3
:hidden:

api_core_methods
api_rotation
api_advanced_techniques
api_validation

Models
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.models.EOF
xeofs.models.ComplexEOF
xeofs.models.MCA
xeofs.models.ComplexMCA


Rotators
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.models.EOFRotator
xeofs.models.ComplexEOFRotator
xeofs.models.MCARotator
xeofs.models.ComplexMCARotator
xeofs.models.RotatorFactory



Validation
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.validation.EOFBootstrapper
11 changes: 11 additions & 0 deletions docs/api_advanced_techniques.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Advanced techniques
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.models.ComplexEOF
xeofs.models.ComplexMCA
xeofs.models.ComplexEOFRotator
xeofs.models.ComplexMCARotator
9 changes: 9 additions & 0 deletions docs/api_core_methods.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Core methods
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.models.EOF
xeofs.models.MCA
13 changes: 13 additions & 0 deletions docs/api_rotation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Rotation
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.models.EOFRotator
xeofs.models.MCARotator
xeofs.models.ComplexEOFRotator
xeofs.models.ComplexMCARotator
xeofs.models.RotatorFactory

8 changes: 8 additions & 0 deletions docs/api_validation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Validation
==================
.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

xeofs.validation.EOFBootstrapper
Binary file modified docs/auto_examples/1eof/images/sphx_glr_plot_rotated_eof_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion docs/auto_examples/1eof/plot_rotated_eof.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -15,7 +26,7 @@
},
"outputs": [],
"source": [
"import xarray as xr\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom matplotlib.gridspec import GridSpec\nfrom cartopy.crs import Robinson, PlateCarree\n\nfrom xeofs.models import EOF, EOFRotator\n\n\nsns.set_context('paper')\n\nsst = xr.tutorial.open_dataset('ersstv5')['sst']\n\n# There are some grid points with have constant values only.\n# Standardization of these time series cannot work since\n# the standard deviation is zero.\n# Remove these grid points prior to the analysis:\n# minimum_std_dev = 1e-5\n# valid_x = sst.stack(x=['lat', 'lon']).std('time') > minimum_std_dev\n# sst = sst.stack(x=['lat', 'lon']).sel(x=valid_x).unstack()"
"import xarray as xr\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom matplotlib.gridspec import GridSpec\nfrom cartopy.crs import Robinson, PlateCarree\n\nfrom xeofs.models import EOF, EOFRotator\n\n\nsns.set_context('paper')\n\nsst = xr.tutorial.open_dataset('ersstv5')['sst']"
]
},
{
Expand Down
7 changes: 0 additions & 7 deletions docs/auto_examples/1eof/plot_rotated_eof.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@

sst = xr.tutorial.open_dataset('ersstv5')['sst']

# There are some grid points with have constant values only.
# Standardization of these time series cannot work since
# the standard deviation is zero.
# Remove these grid points prior to the analysis:
# minimum_std_dev = 1e-5
# valid_x = sst.stack(x=['lat', 'lon']).std('time') > minimum_std_dev
# sst = sst.stack(x=['lat', 'lon']).sel(x=valid_x).unstack()

#%%
# Perform the actual analysis
Expand Down
2 changes: 1 addition & 1 deletion docs/auto_examples/1eof/plot_rotated_eof.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0d0961206dea757d52a99005d46ceb42
77cafc244aaaaff78ba2f3e809fbedf5
36 changes: 16 additions & 20 deletions docs/auto_examples/1eof/plot_rotated_eof.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.. note::
:class: sphx-glr-download-link-note

:ref:`Go to the end <sphx_glr_download_auto_examples_1eof_plot_rotated_eof.py>`
Click :ref:`here <sphx_glr_download_auto_examples_1eof_plot_rotated_eof.py>`
to download the full example code

.. rst-class:: sphx-glr-example-title
Expand Down Expand Up @@ -40,7 +40,7 @@ without regularization, (2) with Varimax rotation, and (3) with Promax rotation.

We'll start by loading the necessary packages and data:

.. GENERATED FROM PYTHON SOURCE LINES 24-45
.. GENERATED FROM PYTHON SOURCE LINES 24-38
.. code-block:: default
Expand All @@ -57,13 +57,6 @@ We'll start by loading the necessary packages and data:
sst = xr.tutorial.open_dataset('ersstv5')['sst']
# There are some grid points with have constant values only.
# Standardization of these time series cannot work since
# the standard deviation is zero.
# Remove these grid points prior to the analysis:
# minimum_std_dev = 1e-5
# valid_x = sst.stack(x=['lat', 'lon']).std('time') > minimum_std_dev
# sst = sst.stack(x=['lat', 'lon']).sel(x=valid_x).unstack()
Expand All @@ -72,11 +65,11 @@ We'll start by loading the necessary packages and data:
.. GENERATED FROM PYTHON SOURCE LINES 46-47
.. GENERATED FROM PYTHON SOURCE LINES 39-40
Perform the actual analysis

.. GENERATED FROM PYTHON SOURCE LINES 47-67
.. GENERATED FROM PYTHON SOURCE LINES 40-60
.. code-block:: default
Expand Down Expand Up @@ -107,15 +100,15 @@ Perform the actual analysis
.. GENERATED FROM PYTHON SOURCE LINES 68-73
.. GENERATED FROM PYTHON SOURCE LINES 61-66
Create figure showing the first 6 modes for all 3 cases. While the first mode
is very similar in all three cases the subsequent modes of the standard
solution exhibit dipole and tripole-like patterns. Under Varimax and Promax
rotation, these structures completely disappear suggesting that these patterns
were mere artifacts due to the orthogonality.

.. GENERATED FROM PYTHON SOURCE LINES 73-103
.. GENERATED FROM PYTHON SOURCE LINES 66-96
.. code-block:: default
Expand Down Expand Up @@ -164,25 +157,28 @@ were mere artifacts due to the orthogonality.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 17.504 seconds)
**Total running time of the script:** ( 0 minutes 17.020 seconds)


.. _sphx_glr_download_auto_examples_1eof_plot_rotated_eof.py:

.. only:: html

.. container:: sphx-glr-footer sphx-glr-footer-example
.. only :: html
.. container:: sphx-glr-footer
:class: sphx-glr-footer-example
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download Python source code: plot_rotated_eof.py <plot_rotated_eof.py>`
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download Python source code: plot_rotated_eof.py <plot_rotated_eof.py>`
.. container:: sphx-glr-download sphx-glr-download-jupyter
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download Jupyter notebook: plot_rotated_eof.ipynb <plot_rotated_eof.ipynb>`
:download:`Download Jupyter notebook: plot_rotated_eof.ipynb <plot_rotated_eof.ipynb>`
.. only:: html
Expand Down
Binary file modified docs/auto_examples/1eof/plot_rotated_eof_codeobj.pickle
Binary file not shown.
15 changes: 7 additions & 8 deletions docs/auto_examples/1eof/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@

.. _sphx_glr_auto_examples_1eof_sg_execution_times:


Computation times
=================
**00:40.990** total execution time for **auto_examples_1eof** files:
**00:17.020** total execution time for **auto_examples_1eof** files:

+--------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_1eof_plot_rotated_eof.py` (``plot_rotated_eof.py``) | 00:17.504 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_1eof_plot_rotated_eof.py` (``plot_rotated_eof.py``) | 00:17.020 | 0.0 MB |
+--------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_1eof_plot_mreof.py` (``plot_mreof.py``) | 00:06.262 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_1eof_plot_eof-smode.py` (``plot_eof-smode.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_1eof_plot_eof-smode.py` (``plot_eof-smode.py``) | 00:05.117 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_1eof_plot_eof-tmode.py` (``plot_eof-tmode.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_1eof_plot_weighted-eof.py` (``plot_weighted-eof.py``) | 00:04.978 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_1eof_plot_mreof.py` (``plot_mreof.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_1eof_plot_eof-tmode.py` (``plot_eof-tmode.py``) | 00:04.957 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_1eof_plot_multivariate-eof.py` (``plot_multivariate-eof.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_1eof_plot_multivariate-eof.py` (``plot_multivariate-eof.py``) | 00:02.172 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_1eof_plot_weighted-eof.py` (``plot_weighted-eof.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------+-----------+--------+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 1dc9ce6

Please sign in to comment.