Skip to content

Commit

Permalink
Merge branch 'Development'
Browse files Browse the repository at this point in the history
  • Loading branch information
khider committed Jan 11, 2023
2 parents e003cb5 + 82c6c12 commit 8cce337
Show file tree
Hide file tree
Showing 76 changed files with 1,912 additions and 569 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build container image
on:
release:
branches: [ master ]
workflow_dispatch:

jobs:
build:
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/testdev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,30 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:

- name: checkout files in repo
uses: actions/checkout@v2
- name: Checkout files in repo
uses: actions/checkout@v3

- name: Setup Python 3.9
uses: actions/setup-python@v2
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
activate-environment: pyleo
environment-file: environment.yml
python-version: "3.10"
auto-activate-base: false

- name: Install dependencies
- name: Conda list
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda env update --file environment.yml --name base
- name: Lint with flake
run: |
$CONDA/bin/conda install flake8
# stop the build if there are Python syntax errors or undefined names
$CONDA/bin/flake8 . --count --select=E9,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
$CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
conda activate pyleo
conda list
- name: Test with pytest
run: |
conda install pytest
$CONDA/bin/pytest
conda activate pyleo
pytest pyleoclim/tests -svv
39 changes: 18 additions & 21 deletions .github/workflows/testmaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,29 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:

- name: checkout files in repo
uses: actions/checkout@v2
- name: Checkout files in repo
uses: actions/checkout@v3

- name: Setup Python 3.9
uses: actions/setup-python@v2
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.9
activate-environment: pyleo
environment-file: environment.yml
python-version: "3.10"
auto-activate-base: false

- name: Install dependencies
- name: Conda list
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
$CONDA/bin/conda env update --file environment.yml --name base
- name: Lint with flake
run: |
$CONDA/bin/conda install flake8
# stop the build if there are Python syntax errors or undefined names
$CONDA/bin/flake8 . --count --select=E9,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
$CONDA/bin/flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
conda activate pyleo
conda list
- name: Test with pytest
run: |
conda install pytest
$CONDA/bin/pytest
conda activate pyleo
pytest pyleoclim/tests -svv
4 changes: 2 additions & 2 deletions doc_build/anaconda_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Installing Miniconda (Mac, Linux)
=================================

Anaconda is a very large install, containing not only Python, but also R, and a host of other things that are not necessary to run pyleoclim.
Users may find it preferable to install the more minimalist "miniconda" package.
Users may find it preferable to install the minimalist "miniconda" package.

Step 1: Download the installation script for miniconda3
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Expand Down Expand Up @@ -42,6 +42,6 @@ Step 3: Test your Installation

.. code-block:: bash
source ~/.bashrc # assume you are using Bash shell
source ~/.bashrc # assumes you are using Bash shell
which python # should return a path under <base-path>
which conda # should return a path under <base-path>
22 changes: 16 additions & 6 deletions doc_build/citation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Citing Pyleoclim
================

If Pyleoclim played an important part in your research, please add us to your reference list by using one of the citations below:
If Pyleoclim played any role in your research, please add us to your reference list by using at least one of the citations below (two if you're really grateful):

BibTeX entry
"""""""""""""
Expand All @@ -13,16 +13,26 @@ For example (please check for version updates on Zenodo)
@misc{Pyleoclim,
DOI= {10.5281/zenodo.1205661},
url = {https://doi.org/10.5281/zenodo.1205661},
year = {2021},
type = {Computer Program}
year = {2022},
type = {Computer Program},
title = {Pyleoclim: A Python package for the analysis of paleoclimate data},
authors = {Deborah Khider and Feng Zhu and Julien Emile-Geay and Jun Hu and Alexander James and Pratheek Athreya and Myron Kwan and Daniel Garijo}
}


@article{Pyleoclim:PP2022,
author = {Khider, Deborah and Emile-Geay, Julien and Zhu, Feng and James, Alexander and Landers, Jordan and Ratnakar, Varun and Gil, Yolanda},
journal = {Paleoceanography and Paleoclimatology},
number = {10},
pages = {e2022PA004509},
title = {Pyleoclim: Paleoclimate Timeseries Analysis and Visualization With Python},
volume = {37},
year = {2022},
doi = {10.1029/2022PA004509},
}


AGU style entry
"""""""""""""""

Khider, D. et al (2021). Pyleoclim: A Python package for the analysis of paleoclimate data. Retrieved from https://doi.org/10.5281/zenodo.1205661

A manuscript describing Pyleoclim is currently in preprint on the `Earth and Space Science Open Archive <https://www.essoar.org/doi/abs/10.1002/essoar.10511883.1>`_.
Khider, D., Emile-Geay, J., Zhu, F., James, A., Landers, J., Ratnakar, V., & Gil, Y. (2022). Pyleoclim: Paleoclimate timeseries analysis and visualization with Python. Paleoceanography and Paleoclimatology, 37, e2022PA004509. doi:10.1029/2022PA004509
21 changes: 15 additions & 6 deletions doc_build/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.. note::

Pyleoclim requires the use of Python 3.8 or 3.9.
Pyleoclim requires the use of Python 3.9 or above

Installing Pyleoclim
====================
Expand All @@ -20,11 +20,11 @@ Click :ref:`here <anaconda_installation>` for a quick tutorial on MacOs and Linu
Creating a new conda environment
"""""""""""""""""""""""""""""""""""

To create a new environment using Python 3.9 via command line:
To create a new environment using Python 3.10 via command line:

.. code-block:: bash
conda create -n pyleo python=3.9
conda create -n pyleo python=3.10
To view a list of available environment:

Expand Down Expand Up @@ -60,8 +60,9 @@ First install Cartopy:

.. code-block:: bash
conda install -c conda-forge cartopy
conda install -c conda-forge cartopy=0.21
(note: under Python 3.10, cartopy>=0.21 will be installed by default, so specifying this version is unnecessary).
Then install Pyleoclim through Pypi, which contains the most stable version of Pyleoclim:

.. code-block:: bash
Expand Down Expand Up @@ -121,10 +122,18 @@ Again, unless you are planning to make heavy use of the WWZ functionality, we re

Docker Container
""""""""""""""""
Docker containers with various versions of Pyleoclim are available at: `https://quay.io/repository/2i2c/paleohack-2021?tab=tags <https://quay.io/repository/2i2c/paleohack-2021?tab=tags>`_.
Docker containers with various versions of Pyleoclim are available `on quay.io <https://quay.io/repository/linkedearth/pyleoclim?tab=tags>`_.

To pull an image:

.. code-block:: bash
docker pull quay.io/2i2c/paleohack-2021:latest
docker pull quay.io/linkedearth/pyleoclim:latest
To run the image:

.. code-block:: bash
docker run -it -p 8888:8888 quay.io/linkedearth/pyleoclim:latest
The container will start a Jupyter server automatically. You need to copy the link to the server (localhost) into your web browser on your machine (the command -p 8888:8888 opens the communication port between your machine and the container). You can then create notebook and upload notebook and data using the Jupyter interface. Remember that the container will not save any of your work if you close it. So make sure you donwload your work before closing the container.
6 changes: 3 additions & 3 deletions doc_build/rtd_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.9
- python=3.10
- numpy
- cartopy>=0.19.0
- cartopy=0.21
- pip:
- sphinx
- pylint
Expand All @@ -14,4 +14,4 @@ dependencies:
- nbsphinx
- IPython
- readthedocs-sphinx-search>=0.1.0
- pyleoclim==0.9.1
- git+https://github.com/LinkedEarth/Pyleoclim_util.git@Development
Binary file removed doc_build/savefig/coh.png
Binary file not shown.
Binary file removed doc_build/savefig/mapallarchive.png
Binary file not shown.
Binary file removed doc_build/savefig/mapallarchive_marker.png
Binary file not shown.
Binary file removed doc_build/savefig/mapone.png
Binary file not shown.
Binary file removed doc_build/savefig/mts_stackplot.png
Binary file not shown.
Binary file removed doc_build/savefig/random_series.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_ls.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_ls_freq.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_ls_n50.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_mtm.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_perio.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_welch.png
Binary file not shown.
Binary file removed doc_build/savefig/spec_wwz.png
Binary file not shown.
Binary file removed doc_build/savefig/ssa_recon.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_air.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_dashboard.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_dist.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_filter1.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_filter2.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_filter3.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_filter4.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_filter5.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_nino.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_plot.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_plot2.png
Binary file not shown.
Binary file removed doc_build/savefig/ts_plot4.png
Diff not rendered.
Binary file removed doc_build/savefig/ts_plot5.png
Diff not rendered.
Binary file removed doc_build/savefig/ts_sg.png
Diff not rendered.
Binary file removed doc_build/savefig/wwa_wwz.png
Diff not rendered.
Binary file modified doc_build/ts_plot3.png
1 change: 0 additions & 1 deletion doc_build/utils/causality.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/correlation.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/decomposition.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/filter.rst

This file was deleted.

48 changes: 32 additions & 16 deletions doc_build/utils/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,82 +14,98 @@ to values more appropriate for paleoclimate datasets.
Causality
"""""""""
.. automodule:: pyleoclim.utils.causality
:members: liang_causality, granger_causality
:members:
:ignore-module-all: True


Correlation
"""""""""""

.. automodule:: pyleoclim.utils.correlation
:members: fdr, corr_sig
:members:
:ignore-module-all: True

Decomposition
"""""""""""""

.. automodule:: pyleoclim.utils.decomposition
:members: ssa
:members:
:ignore-module-all: True

Filter
""""""

.. automodule:: pyleoclim.utils.filter
:members: butterworth, savitzky_golay, firwin, lanczos
:members:
:ignore-module-all: True

Mapping
"""""""

.. automodule:: pyleoclim.utils.mapping
:members: map, compute_distance
:members:
:ignore-module-all: True

Plotting
""""""""

.. automodule:: pyleoclim.utils.plotting
:members: set_style, closefig, savefig
:members:
:ignore-module-all: True

Spectral
""""""""

.. automodule:: pyleoclim.utils.spectral
:members: wwz_psd, cwt_psd, mtm, lomb_scargle, welch, periodogram
:members:
:ignore-module-all: True


Tsmodel
"""""""

.. automodule:: pyleoclim.utils.tsmodel
:members: ar1_sim, ar1_fit, colored_noise, colored_noise_2regimes, gen_ar1_evenly
:members:
:ignore-module-all: True



Wavelet
"""""""

.. automodule:: pyleoclim.utils.wavelet
:members: cwt, cwt_coherence, wwz, wwz_coherence
:members:
:ignore-module-all: True


Tsutils
"""""""

.. automodule:: pyleoclim.utils.tsutils
:members: simple_stats, bin, interp, gkernel, standardize, ts2segments, annualize, gaussianize, gaussianize_1d, detrend, remove_outliers
:members:
:ignore-module-all: True



Tsbase
""""""

.. automodule:: pyleoclim.utils.tsbase
:members: clean_ts, dropna, sort_ts, is_evenly_spaced, reduce_duplicated_timestamps
:members:
:ignore-module-all: True



Lipdutils
"""""""""

Utilities to manipulate LiPD files and automate data transformation whenever possible.
These functions are used throughout Pyleoclim but are not meant for direct interaction by users.
Also handles integration with the LinkedEarth wiki and the LinkedEarth Ontology.

.. automodule:: pyleoclim.utils.lipdutils
:members:
:ignore-module-all: True

jsonutils
"""""""""

.. automodule:: pyleoclim.utils.jsonutils
:members: PyleoObj_to_json, json_to_PyleoObj, isPyleoclim
:members:
:ignore-module-all: True
1 change: 0 additions & 1 deletion doc_build/utils/jsonutils.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/lipdutils.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/mapping.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/plotting.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/spectral.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/tsbase.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/tsmodel.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/tsutils.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc_build/utils/wavelet.rst

This file was deleted.

Loading

0 comments on commit 8cce337

Please sign in to comment.