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

📚 revise docs incl. notebooks #709

Merged
merged 69 commits into from
Dec 18, 2021
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
260f84d
try myst
Dec 13, 2021
33aa1ba
try myst
Dec 13, 2021
dbcc445
all use python3 kernel
Dec 13, 2021
a3f369a
env
Dec 13, 2021
c7e6342
Update docs.yml
aaronspring Dec 13, 2021
46f4971
use sphinx_book_theme
Dec 13, 2021
4137a38
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 13, 2021
fb14f47
use sphinx_book_theme
Dec 13, 2021
dba2762
use sphinx_book_theme
Dec 13, 2021
471e18c
Update CHANGELOG.rst
aaronspring Dec 13, 2021
5d8ec64
quick start
Dec 13, 2021
cd9d8bf
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 13, 2021
1a64289
try using climpred-docs
Dec 13, 2021
6c7920d
climpred-docs in qs
Dec 13, 2021
a522c2d
no nbsphinx_kernel_name
Dec 13, 2021
383a335
links py:class :meth:
Dec 13, 2021
f1319b2
add stars and forks to index
Dec 13, 2021
249feb2
add stars and forks to index
Dec 13, 2021
f3cbc65
add edit botton
Dec 13, 2021
637674e
Update setting-up-data.rst
aaronspring Dec 13, 2021
42476a0
rerun non-example notebooks
Dec 13, 2021
175d811
adapt xclim refs
Dec 13, 2021
ed63452
rename workflows for shorter badges
Dec 13, 2021
3e006cc
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 13, 2021
eedcc87
minor fixes
Dec 13, 2021
cda8629
Apply suggestions from code review
aaronspring Dec 14, 2021
442ac36
Update README.rst
aaronspring Dec 14, 2021
ee402b7
Update index.rst
aaronspring Dec 14, 2021
b7bfaec
Update docs/source/examples/misc/climpred_gpu.ipynb
aaronspring Dec 14, 2021
85a8ef4
Exclude gpu nb
aaronspring Dec 14, 2021
ddffef6
use old gpu nb
Dec 14, 2021
d76e1bf
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 14, 2021
6a5eb5b
Update docs/source/conf.py
aaronspring Dec 14, 2021
f3d95c9
gpu python3 kernel
Dec 14, 2021
8122f31
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 14, 2021
a5dbea3
fix
Dec 14, 2021
1f7eaab
alignment fix
Dec 14, 2021
45a2f0b
intake-esm app connect
Dec 14, 2021
070e6e8
Update conf.py
aaronspring Dec 14, 2021
ec0069c
Update docs/source/conf.py
aaronspring Dec 14, 2021
9f5bc5a
Update docs/source/conf.py
aaronspring Dec 14, 2021
aaf7218
Update docs/source/conf.py
aaronspring Dec 14, 2021
15f6982
fix
Dec 14, 2021
681875a
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 14, 2021
8f55ba8
Update conf.py
aaronspring Dec 14, 2021
2c8789e
Update conf.py
aaronspring Dec 15, 2021
fecdf32
fix
Dec 15, 2021
f0e7344
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 15, 2021
2bc69d5
fix
Dec 15, 2021
50a49d7
decadal notebooks
Dec 15, 2021
5e4584f
ignore np FutureWarning
Dec 15, 2021
a8d2058
fixes
Dec 15, 2021
9f1118e
misc notebooks execute never, else auto
Dec 15, 2021
0b29cde
fix setup.cfg
Dec 15, 2021
ec2842b
monseas example
Dec 15, 2021
da6221a
missing nb
Dec 15, 2021
267c2be
fix
Dec 15, 2021
8cf6336
fix examples.rst
Dec 15, 2021
8288371
fix
Dec 16, 2021
05ed755
misc notebooks
Dec 17, 2021
435e83d
fixes
Dec 17, 2021
126e6f7
plot api
Dec 17, 2021
dd6f885
binder link
Dec 17, 2021
3424383
Update docs/source/conf.py
aaronspring Dec 17, 2021
d484dbe
Update ci/requirements/docs.yml
aaronspring Dec 17, 2021
2960781
final
Dec 18, 2021
bc5e308
Merge branch 'docu' of https://github.com/aaronspring/climpred into docu
Dec 18, 2021
591b7da
api
Dec 18, 2021
ef61422
fix links api
Dec 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linting
name: Linting

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/climpred_installs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: climpred installs
name: install

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/climpred_testing.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: climpred testing # based on https://github.com/pydata/xarray/blob/master/.github/workflows/ci.yaml
name: CI # based on https://github.com/pydata/xarray/blob/master/.github/workflows/ci.yaml

on:
push:
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
run: |
python -m pytest --doctest-modules climpred --ignore climpred/tests

docs_notebooks: # Checks that pre-compiled notebooks in docs still work.
notebooks: # Checks that pre-compiled notebooks in docs still work.
runs-on: ubuntu-latest
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: Linting

on: pull_request

Expand Down
232 changes: 116 additions & 116 deletions CHANGELOG.rst

Large diffs are not rendered by default.

28 changes: 25 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Verification of weather and climate forecasts.
* - license
- |license|
* - community
- |gitter| |contributors|
- |gitter| |contributors| |forks| |stars| |issues| |PRs|
* - tutorials
- |gallery| |workshop| |cloud|

Expand All @@ -40,7 +40,7 @@ Verification of weather and climate forecasts.

.. |upstream| image:: https://github.com/pangeo-data/climpred/actions/workflows/upstream-dev-ci.yml/badge.svg
:target: https://github.com/pangeo-data/climpred/actions/workflows/upstream-dev-ci.yml
:alt: upstream
:alt: CI upstream

.. |codecov| image:: https://codecov.io/gh/pangeo-data/climpred/branch/main/graph/badge.svg
:target: https://codecov.io/gh/pangeo-data/climpred
Expand Down Expand Up @@ -86,6 +86,22 @@ Verification of weather and climate forecasts.
:alt: climpred cloud demo
:target: https://github.com/aaronspring/climpred-cloud-demo

.. |forks| image:: https://img.shields.io/github/forks/pangeo-data/climpred
:alt: GitHub forks
:target: https://github.com/pangeo-data/climpred/network/members

.. |stars| image:: https://img.shields.io/github/stars/pangeo-data/climpred
:alt: GitHub stars
:target: https://github.com/pangeo-data/climpred/stargazers

.. |issues| image:: https://img.shields.io/github/issues/pangeo-data/climpred
:alt: GitHub issues
:target: https://github.com/pangeo-data/climpred/issues

.. |PRs| image:: https://img.shields.io/github/issues-pr/pangeo-data/climpred
:alt: GitHub PRs
:target: https://github.com/pangeo-data/climpred/pulls

..

.. note::
Expand Down Expand Up @@ -117,7 +133,13 @@ You can install the latest release of ``climpred`` using ``pip`` or ``conda``:
conda install -c conda-forge climpred

You can also install the bleeding edge (pre-release versions) by cloning this
repository and running ``pip install . --upgrade`` in the main directory or
repository or installing directly from GitHub:

.. code-block:: bash

git clone https://github.com/pangeo-data/climpred.git
cd climpred
pip install . --upgrade

.. code-block:: bash

Expand Down
5 changes: 3 additions & 2 deletions ci/requirements/climpred-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ channels:
dependencies:
- python>=3.7
# Documentation
- nbsphinx
- myst-nb
- nbstripout
- sphinx_rtd_theme
- sphinx
- sphinxcontrib-napoleon
# IDE
Expand Down Expand Up @@ -49,10 +48,12 @@ dependencies:
- eofs
- esmtools>=1.1.3
- xskillscore>=0.0.19
- xrft
# Visualization
- matplotlib-base
- nc-time-axis>=1.4.0
- pip
- pip:
- pytest-lazy-fixture
- nb_black # notebook linting
- sphinx_book_theme
11 changes: 7 additions & 4 deletions ci/requirements/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ channels:
- nodefaults
dependencies:
- python=3.8
- importlib_metadata
- matplotlib-base
- nbsphinx
- myst-nb
- esmpy=*=mpi* # Ensures MPI works with version of esmpy.
- xesmf
aaronspring marked this conversation as resolved.
Show resolved Hide resolved
- nc-time-axis>=1.4.0
- netcdf4
- sphinx
- sphinxcontrib-napoleon
- sphinx_rtd_theme
- sphinx-copybutton
- toolz
- xarray>=0.19.0
- xskillscore>=0.0.18
- numba>=0.52
- xclim
- xrft
- bias_correction
- pip
- pip:
# Install latest version of climpred.
# Install latest version of climpred
- -e ../..
- nb_black
- sphinx_book_theme
8 changes: 4 additions & 4 deletions ci/requirements/docs_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ channels:
- nodefaults
dependencies:
- python>=3.7
- importlib_metadata
#- ipykernel
- jupyterlab
- matplotlib-base
- nbsphinx
- myst-nb
- nbstripout
- netcdf4
- numpy
Expand All @@ -16,7 +16,6 @@ dependencies:
- dask-core
- sphinx
- sphinxcontrib-napoleon
- sphinx_rtd_theme
- sphinx-copybutton
- toolz
- xarray>=0.19.0
Expand All @@ -28,9 +27,10 @@ dependencies:
- esmpy
- bottleneck
- nc-time-axis>=1.4.0
- xrft # used for varweighted_mean_period
- xrft
- pip
- pip:
# Install latest version of climpred.
- -e ../..
- nb_black
- sphinx_book_theme
6 changes: 4 additions & 2 deletions climpred/bias_removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def leave_one_out_drop(bias, dim):
"""
bias_nan = []
for i in range(bias[dim].size):
bias_nan.append(bias.drop_isel({dim: i}).rename({dim: "sample"}).drop("sample"))
bias_nan.append(
bias.drop_isel({dim: i}).rename({dim: "sample"}).drop_vars("sample")
)
bias_nan = xr.concat(bias_nan, dim).assign_coords(
{dim: bias[dim], "sample": np.arange(bias[dim].size - 1)}
)
Expand Down Expand Up @@ -361,7 +363,7 @@ def gaussian_bias_removal(
dim="member",
alignment=alignment,
)
bias = bias.drop("skill")
bias = bias.drop_vars("skill")

# how to remove bias
if "mean" in how:
Expand Down
2 changes: 1 addition & 1 deletion climpred/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def resample_uninitialized_from_initialized(init, resample_dim=["init", "member"
# take time dim and overwrite with sorted
resampled_uninit = (
resampled_uninit.swap_dims({"init": "valid_time"})
.drop("init")
.drop_vars("init")
.rename({"valid_time": "time"})
)
resampled_uninit = resampled_uninit.assign_coords(
Expand Down
Loading