Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ repos:
language_version: python3

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.770
# rev: v0.982
# hooks:
# - id: mypy
# additional_dependencies: [types-setuptools, types-PyYAML]
# exclude: docs/source/conf.py
# args: [--ignore-missing-imports]

Expand Down
5 changes: 5 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ build:
tools:
python: "mambaforge-4.10"

python:
install:
- method: pip
path: ./

conda:
environment: docs/environment.yml

Expand Down
6 changes: 3 additions & 3 deletions ci/environment-py3.10-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ dependencies:
- cf_xarray>=0.6
- dask
- netcdf4
- numpy
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- pip
- requests
- scikit-learn # used by xoak for tree
- xarray
# - xoak
- xoak
- pytest
- pytest-benchmark
- pip:
- codecov
- pytest-cov
- coverage[toml]
- git+https://github.com/kthyng/xoak@include_distances
# - git+https://github.com/kthyng/xoak@include_distances
6 changes: 3 additions & 3 deletions ci/environment-py3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ dependencies:
- cf_xarray>=0.6
- dask <=2022.05.0 # for xESMF, https://github.com/axiom-data-science/extract_model/issues/49
- netcdf4
- numpy
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- pip
- requests
- scikit-learn # used by xoak for tree
- xarray
- xesmf
# - xoak
- xoak
- pytest
- pytest-benchmark
- pip:
- codecov
- pytest-cov
- coverage[toml]
- git+https://github.com/kthyng/xoak@include_distances
# - git+https://github.com/kthyng/xoak@include_distances
6 changes: 3 additions & 3 deletions ci/environment-py3.8-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ dependencies:
- cf_xarray>=0.6
- dask
- netcdf4
- numpy
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- pip
- requests
- scikit-learn # used by xoak for tree
- xarray
# - xoak
- xoak
- pytest
- pytest-benchmark
- pip:
- codecov
- pytest-cov
- coverage[toml]
- git+https://github.com/kthyng/xoak@include_distances
# - git+https://github.com/kthyng/xoak@include_distances
6 changes: 3 additions & 3 deletions ci/environment-py3.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ dependencies:
- cf_xarray>=0.6
- dask <=2022.05.0 # for xESMF, https://github.com/axiom-data-science/extract_model/issues/49
- netcdf4
- numpy
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- pip
- requests
- scikit-learn # used by xoak for tree
- xarray
- xesmf
# - xoak
- xoak
- pytest
- pytest-benchmark
- pip:
- codecov
- pytest-cov
- coverage[toml]
- git+https://github.com/kthyng/xoak@include_distances
# - git+https://github.com/kthyng/xoak@include_distances
6 changes: 3 additions & 3 deletions ci/environment-py3.9-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ dependencies:
- cf_xarray>=0.6
- dask
- netcdf4
- numpy
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- pip
- requests
- scikit-learn # used by xoak for tree
- xarray
# - xoak
- xoak
- pytest
- pytest-benchmark
- pip:
- codecov
- pytest-cov
- coverage[toml]
- git+https://github.com/kthyng/xoak@include_distances
# - git+https://github.com/kthyng/xoak@include_distances
6 changes: 3 additions & 3 deletions ci/environment-py3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ dependencies:
- cf_xarray>=0.6
- dask <=2022.05.0 # for xESMF, https://github.com/axiom-data-science/extract_model/issues/49
- netcdf4
- numpy
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- pip
- requests
- scikit-learn # used by xoak for tree
- xarray
- xesmf
# - xoak
- xoak
- pytest
- pytest-benchmark
- pip:
- codecov
- pytest-cov
- coverage[toml]
- git+https://github.com/kthyng/xoak@include_distances
# - git+https://github.com/kthyng/xoak@include_distances
23 changes: 14 additions & 9 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
:mod:`API`
----------------------------
API
===

`extract_model` Python API
==========================
.. currentmodule:: extract_model


.. automodule:: extract_model.extract_model
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
.. autosummary::
:toctree: generated/
:recursive:

extract_model
utils
accessor
sorting
model_type
grids.triangular_mesh
xr.triangular_mesh_netcdf
15 changes: 12 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,25 @@
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"nbsphinx",
# "nbsphinx",
"recommonmark",
"sphinx.ext.mathjax",
"sphinx.ext.autosummary",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"numpydoc",
"nbsphinx",
# "nbsphinx",
"IPython.sphinxext.ipython_directive",
"IPython.sphinxext.ipython_console_highlighting",
"sphinxcontrib.srclinks",
"myst_nb",
]

# for compiling notebooks with mystnb
# https://docs.readthedocs.io/en/stable/guides/jupyter.html#using-notebooks-in-other-formats
nb_custom_formats = {
".md": ["jupytext.reads", {"fmt": "mystnb"}],
}
# packages that I don't want to install for docs but package depends on
# autodoc_mock_imports = [
# "cf_xarray",
Expand Down Expand Up @@ -93,7 +99,10 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "pangeo"
# html_theme = "pangeo"
html_theme = "furo"

html_title = "extract_model documentation"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
18 changes: 18 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,31 @@ channels:
dependencies:
- python=3.8
# If your docs code examples depend on other packages add them here
- cf_xarray
- cmocean
- dask <=2022.05.0 # for xESMF, https://github.com/axiom-data-science/extract_model/issues/49
- extract_model
- matplotlib
- netcdf4
- numpy <1.24 # https://github.com/numba/numba/issues/8615#issuecomment-1360792615
- numba # required by xesmf
- pip
- pooch
- requests
- scikit-learn # used by xoak for tree
- xarray
- xcmocean
- xesmf # don't install if on windows
- xoak
# These are needed for the docs themselves
- furo
- jupytext
- numpydoc
- sphinx
- sphinx_rtd_theme
- ipython
- jinja2 #<3.1
- myst-nb
- nbconvert
- nbformat
- ipykernel
Expand Down
34 changes: 25 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,36 @@

Use `extract_model` to read select output from model output files by time and/or space. Output will be selected using `xarray` by a combination of interpolation and index selection. Horizontal interpolation is accomplished using `xESMF` and time interpolation is done with `xarray`'s native 1D interpolation. Currently vertical interpolation is only possible using `xarray`'s 1D interpolation too and is not set up to interpolate in 4D as would be required for ROMS output if not simply selecting the surface layer.

To install from conda-forge:

>>> conda install -c conda-forge ocean-model-skill-assessor

To install from PyPI:

>>> pip install cf-pandas

.. toctree::
:maxdepth: 2
:hidden:
:caption: Examples and demos

models
unstructured_subsetting
ts_work
whats_new
models.md
unstructured_subsetting.md
ts_work.md
api

.. toctree::
:maxdepth: 2
:hidden:
:caption: Develop docs

whats_new



Indices and tables
==================
.. Indices and tables
.. ==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. * :ref:`genindex`
.. * :ref:`modindex`
.. * :ref:`search`
Loading