Skip to content

Commit

Permalink
chore: release 1.2.1 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicrie authored Oct 29, 2023
2 parents 0f46dd6 + 52070d3 commit 2c9b9a3
Show file tree
Hide file tree
Showing 198 changed files with 6,658 additions and 2,518 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: poetry --version

- name: Install Project Dependencies
run: python -m poetry install
run: python -m poetry install --with dev

- name: Lint Codebase with flake8
run: |
Expand Down
134 changes: 134 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[niclasrieger@gmail.com](mailto:niclasrieger@gmail.com).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

58 changes: 29 additions & 29 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,21 @@
Overview
---------------------

``xeofs`` is a Python toolbox designed for methods like **Empirical Orthogonal Function (EOF) analysis**, also known as Principal Component Analysis (PCA),
and **related variants**. The package stands out due to its capacity
to handle multi-dimensional Earth observation data.
``xeofs`` is a dedicated Python package for dimensionality reduction in the realm of climate science,
offering methods like PCA, known as EOF analysis within the field, and related variants.
Seamlessly integrated with ``xarray`` and ``Dask``, it's tailored for easy handling and scalable
computation on large, multi-dimensional datasets, making advanced climate data analysis both accessible and efficient.

Here are the key strengths of ``xeofs``:
- **Multi-Dimensional**: Designed for ``xarray`` objects, it applies dimensionality reduction to multi-dimensional data while maintaining data labels.
- **Dask-Integrated**: Supports large datasets via ``Dask`` xarray objects
- **Extensive Methods**: Offers various dimensionality reduction techniques
- **Adaptable Output**: Provides output corresponding to the type of input, whether single or list of ``xr.DataArray`` or ``xr.Dataset``
- **Missing Values**: Handles ``NaN`` values within the data
- **Bootstrapping**: Comes with a user-friendly interface for model evaluation using bootstrapping
- **Efficient**: Ensures computational efficiency, particularly with large datasets through randomized SVD
- **Modular**: Allows users to implement and incorporate new dimensionality reduction methods

- **Multi-dimensional Analysis**: Execute labeled EOF analysis with the extensive features of ``xarray``.
- **Scalability**: Handle large datasets effectively with ``dask``.
- **Speed**: Enjoy quick EOF analysis using ``scipy``'s randomized SVD.
- **Variety of Methods**: Perform diverse variants of EOF analysis, including **complex and rotated EOF analysis**, along with related techniques such as **Maximum Covariance Analysis (MCA)**.
- **Model Validation**: Validate models through bootstrapping.
- **Modular Code Structure**: Incorporate new EOF variants with ease due to the package's modular structure.
- **Flexible Data Formats**: Accepts a variety of ``xarray`` input types (``DataArray``, ``Dataset``, list of ``DataArray``).

Compared to similar packages like eofs_, pyEOF_, and xMCA_, ``xeofs`` is more comprehensive and flexible, providing unique capabilities like handling fully multidimensional dimensions
(both samples and features) and a simple interface for bootstrapping. This makes ``xeofs`` a powerful one-stop-shop for most of your EOF analysis needs.

.. _pyEOF: https://github.com/zhonghua-zheng/pyEOF
.. _xMCA: https://github.com/Yefee/xMCA
Expand Down Expand Up @@ -142,10 +141,10 @@ In order to get started with ``xeofs``, follow these simple steps:
rot_scores = rotator.scores() # Rotated expansion coefficients (temporal patterns)
To further explore the capabilities of ``xeofs``, check the available documentation_ and examples_.
For a full list of currently available methods, see the methods_ section.
To further explore the capabilities of ``xeofs``, check out the available documentation_ and examples_.
For a full list of currently available methods, see the `Reference API`_.

.. _methods: https://xeofs.readthedocs.io/en/latest/models.html
.. _`Reference API`: https://xeofs.readthedocs.io/en/latest/api.html



Expand All @@ -157,12 +156,13 @@ For a more comprehensive overview and usage examples, visit the documentation_.
Contributing
------------

Contributions are highly welcomed and appreciated. If you're interested in improving ``xeofs`` or fixing issues, please open a Github issue_.
Contributions are highly welcomed and appreciated. If you're interested in improving ``xeofs`` or fixing issues, please read our
`Contributing Guide`_.

License
-------

This project is licensed under the terms of the MIT license.
This project is licensed under the terms of the MIT_ license.

Contact
-------
Expand All @@ -172,31 +172,31 @@ For questions or support, please open a Github issue_.


.. _issue: https://github.com/nicrie/xeofs/issues
.. _`Contributing Guide`: https://xeofs.readthedocs.io/en/latest/overview_3_contributing.html
.. _documentation: https://xeofs.readthedocs.io/en/latest/
.. _examples: https://xeofs.readthedocs.io/en/latest/auto_examples/index.html

.. _MIT: https://github.com/nicrie/xeofs/blob/main/LICENSE


Credits
----------------------

I want to acknowledge

- Andrew Dawson_, for his foundational Python package for EOF analysis.
- Yefee_, whose work provided useful references for implementing MCA in ``xeofs``.
- James Chapman_, creator of a Python package for Canonical Correlation Analysis.
- Diego Bueso_, for his open-source ROCK-PCA implementation in Matlab.
- The developers of NumPy_, pandas_, and xarray_ for their indispensable tools for scientific computations in Python.
- Randomized PCA: scikit-learn_
- EOF analysis: Python package eofs_ by Andrew Dawson
- MCA: Python package xMCA_ by Yefee
- CCA: Python package CCA-Zoo_ by James Chapman
- ROCK-PCA: Matlab implementation by Diego Bueso_



.. _NumPy: https://www.numpy.org
.. _pandas: https://pandas.pydata.org
.. _xarray: https://xarray.pydata.org
.. _Chapman: https://github.com/jameschapman19/cca_zoo
.. _scikit-learn: https://scikit-learn.org/stable/
.. _CCA-Zoo: https://github.com/jameschapman19/cca_zoo
.. _Bueso: https://github.com/DiegoBueso/ROCK-PCA
.. _Dawson: https://github.com/ajdawson/eofs
.. _Yefee: https://github.com/Yefee/xMCA
.. _eofs: https://github.com/ajdawson/eofs
.. _xMCA: https://github.com/Yefee/xMCA


How to cite?
Expand Down
39 changes: 39 additions & 0 deletions docs/_autosummary/xeofs.models.CCA.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
xeofs.models.CCA
================

.. currentmodule:: xeofs.models

.. autoclass:: CCA
:members:
:show-inheritance:
:inherited-members:


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~CCA.__init__
~CCA.components
~CCA.explained_covariance
~CCA.explained_covariance_ratio
~CCA.explained_variance
~CCA.explained_variance_ratio
~CCA.fit
~CCA.get_metadata_routing
~CCA.get_params
~CCA.scores
~CCA.set_fit_request
~CCA.set_params
~CCA.set_transform_request
~CCA.transform
~CCA.weights






36 changes: 36 additions & 0 deletions docs/_autosummary/xeofs.models.ExtendedEOF.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
xeofs.models.ExtendedEOF
========================

.. currentmodule:: xeofs.models

.. autoclass:: ExtendedEOF
:members:
:show-inheritance:
:inherited-members:


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~ExtendedEOF.__init__
~ExtendedEOF.components
~ExtendedEOF.compute
~ExtendedEOF.explained_variance
~ExtendedEOF.explained_variance_ratio
~ExtendedEOF.fit
~ExtendedEOF.fit_transform
~ExtendedEOF.get_params
~ExtendedEOF.inverse_transform
~ExtendedEOF.scores
~ExtendedEOF.singular_values
~ExtendedEOF.transform






36 changes: 36 additions & 0 deletions docs/_autosummary/xeofs.models.GWPCA.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
xeofs.models.GWPCA
==================

.. currentmodule:: xeofs.models

.. autoclass:: GWPCA
:members:
:show-inheritance:
:inherited-members:


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~GWPCA.__init__
~GWPCA.components
~GWPCA.compute
~GWPCA.explained_variance
~GWPCA.explained_variance_ratio
~GWPCA.fit
~GWPCA.fit_transform
~GWPCA.get_params
~GWPCA.inverse_transform
~GWPCA.largest_locally_weighted_components
~GWPCA.scores
~GWPCA.transform






Loading

0 comments on commit 2c9b9a3

Please sign in to comment.