Skip to content

Commit 9901236

Browse files
committed
Merge branch 'main' into rajeeja/zonal-mean-analytic-band
2 parents bfe2c2b + d7431d7 commit 9901236

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1992
-1662
lines changed

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ test/dask-worker-space/
141141
/dask-worker-space/
142142
.vscode/
143143
generated/
144+
.ipynb_checkpoints/
144145

145146
# Test grid files.
146147
test/meshfiles/*.g
@@ -150,9 +151,13 @@ test/write_*
150151

151152
# Autogenerated docs
152153
docs/user_api/_autosummary/
153-
154154
docs/notebook-examples.txt
155-
155+
docs/*-examples-gallery.txt
156+
docs/user-guide/oQU120.data.nc
157+
docs/user-guide/oQU120.grid.nc
158+
docs/user-guide/oQU480.data.nc
159+
docs/user-guide/oQU480.grid.nc
160+
docs/user-guide/psi_healpix.nc
156161

157162
# benchmarking
158163
benchmarks/env

docs/api.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,16 @@ Constructors
176176
UxDataArray.from_xarray
177177
UxDataArray.from_healpix
178178

179+
Selection & Indexing
180+
~~~~~~~~~~~~~~~~~~~~
181+
182+
.. autosummary::
183+
:toctree: generated/
184+
185+
UxDataArray.isel
186+
179187
Grid Accessor
180-
~~~~~~~~~~~
188+
~~~~~~~~~~~~~
181189

182190
.. autosummary::
183191
:toctree: generated/
@@ -200,13 +208,21 @@ Constructors
200208
UxDataset.from_healpix
201209

202210
Grid Accessor
203-
~~~~~~~~~~~
211+
~~~~~~~~~~~~~
204212

205213
.. autosummary::
206214
:toctree: generated/
207215

208216
UxDataset.uxgrid
209217

218+
Selection & Indexing
219+
~~~~~~~~~~~~~~~~~~~~
220+
221+
.. autosummary::
222+
:toctree: generated/
223+
224+
UxDataset.isel
225+
210226

211227
Conversion Methods
212228
------------------

docs/conf.py

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def __getattr__(cls, name):
6161
"sphinx_copybutton",
6262
]
6363

64+
suppress_warnings = [
65+
# mystnb doesn't recognize MIME type 'application/vnd.holoviews_load.v0+json'
66+
# from the holoviews plots and otherwise spams the build with warnings
67+
"mystnb.unknown_mime_type",
68+
]
6469

6570
# nbsphinx_execute = "never"
6671
# jupyter_execute_notebooks = "off"
@@ -74,17 +79,18 @@ def __getattr__(cls, name):
7479

7580
intersphinx_mapping = {
7681
"python": ("https://docs.python.org/3/", None),
77-
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
78-
"iris": ("https://scitools-iris.readthedocs.io/en/latest", None),
79-
"numpy": ("https://numpy.org/doc/stable", None),
80-
"scipy": ("https://docs.scipy.org/doc/scipy", None),
81-
"numba": ("https://numba.pydata.org/numba-doc/latest", None),
82+
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
83+
"iris": ("https://scitools-iris.readthedocs.io/en/stable/", None),
84+
"numpy": ("https://numpy.org/doc/stable/", None),
85+
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
86+
"numba": ("https://numba.readthedocs.io/en/stable/", None),
8287
"matplotlib": ("https://matplotlib.org/stable/", None),
83-
"dask": ("https://docs.dask.org/en/latest", None),
84-
"cftime": ("https://unidata.github.io/cftime", None),
85-
"rasterio": ("https://rasterio.readthedocs.io/en/latest", None),
86-
"sparse": ("https://sparse.pydata.org/en/latest/", None),
87-
"xarray": ("http://xarray.pydata.org/en/stable/", None),
88+
"dask": ("https://docs.dask.org/en/stable/", None),
89+
"cftime": ("https://unidata.github.io/cftime/", None),
90+
"rasterio": ("https://rasterio.readthedocs.io/en/stable/", None),
91+
"sparse": ("https://sparse.pydata.org/en/stable/", None),
92+
"xarray": ("https://docs.xarray.dev/en/stable/", None),
93+
"cartopy": ("https://cartopy.readthedocs.io/stable/", None),
8894
}
8995

9096

@@ -136,7 +142,15 @@ def __getattr__(cls, name):
136142
# List of patterns, relative to source directory, that match files and
137143
# directories to ignore when looking for source files.
138144
# This pattern also affects html_static_path and html_extra_path.
139-
exclude_patterns = []
145+
exclude_patterns = [
146+
"_build",
147+
"**.ipynb_checkpoints",
148+
# Not included (yet)
149+
"examples/template.ipynb",
150+
"user-guide/custom-grid.ipynb",
151+
"user-guide/spatial-hashing.ipynb",
152+
"user-guide/template.ipynb",
153+
]
140154

141155
# The name of the Pygments (syntax highlighting) style to use.
142156
pygments_style = "sphinx"
@@ -172,7 +186,7 @@ def __getattr__(cls, name):
172186
"use_repository_button": True,
173187
"use_issues_button": True,
174188
"home_page_in_toc": False,
175-
"navbar_footer_text": "",
189+
# "navbar_footer_text": "",
176190
# "extra_footer": "<p></p>",
177191
"logo": {
178192
"image_light": "_static/images/logos/uxarray_logo_h_dark.svg",

docs/contributing.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ Some important UXarray resources are as follows:
6969

7070
* `UXarray documentation <https://uxarray.readthedocs.io/>`_
7171
houses significant documentation such as :ref:`quickstart`, :ref:`installation`,
72-
:ref:`contributing` (i.e. this document), :ref:`examples`, :ref:`tutorials`,
73-
and :ref:`api`.
72+
:ref:`contributing` (i.e. this document),
73+
examples (:ref:`gallery` or :ref:`userguide`),
74+
:ref:`tutorials`, and :ref:`api`.
7475

7576
* `UXarray Milestones <https://github.com/UXARRAY/uxarray/milestones>`_ and
7677
`UXarray Roadmap <https://github.com/orgs/UXARRAY/projects/2/views/17>`_ shows
@@ -515,24 +516,24 @@ as follows:
515516
into your Conda environment for UXarray development).
516517

517518
* Test scripts themselves are not intended to use ``pytest`` through implementation.
518-
Instead, ``pytest`` should be used only for running test scripts as follows::
519+
Instead, ``pytest`` should be used only for running test scripts as follows::
519520

520521
$ pytest test/<test_script_name>.py
521522

522-
, or::
523+
, or::
523524

524525
$ python -m pytest test/<test_script_name>.py
525526

526-
, the latter of which will also add the current directory to ``sys.path``.
527+
, the latter of which will also add the current directory to ``sys.path``.
527528

528-
Not using ``pytest`` for implementation allows the unit tests to be also run
529-
by using (a number of benefits/conveniences coming from using ``pytest`` can be
530-
seen `here <https://docs.pytest.org/en/7.1.x/how-to/unittest.html#how-to-use-unittest-based-tests-with-pytest>`_
531-
though)::
529+
Not using ``pytest`` for implementation allows the unit tests to be also run
530+
by using (a number of benefits/conveniences coming from using ``pytest`` can be
531+
seen `here <https://docs.pytest.org/en/7.1.x/how-to/unittest.html#how-to-use-unittest-based-tests-with-pytest>`_
532+
though)::
532533

533534
$ python -m unittest test/<test_script_name>.py
534535

535-
Also, all of the test scripts can be run at once with the following command::
536+
Also, all of the test scripts can be run at once with the following command::
536537

537538
$ pytest test
538539

@@ -541,7 +542,7 @@ Also, all of the test scripts can be run at once with the following command::
541542
the test scripts.
542543

543544
* Reference results (i.e. expected output or ground truth for not all but the most cases)
544-
should not be magic values (i.e. they need to be justified and/or documented).
545+
should not be magic values (i.e. they need to be justified and/or documented).
545546

546547
* Recommended, but not mandatory, implementation approach is as follows:
547548

@@ -602,7 +603,7 @@ The docstrings must contain:
602603
~~~~~~~~~~~~~~~~~~~~~~
603604

604605
As we mentioned a few times throughout this guide, UXarray has a static `documentation
605-
<https://uxarray.readthedocs.io/>`_ :ref:`index` page that is being generated automatically from the
606+
<https://uxarray.readthedocs.io/>`_ page that is being generated automatically from the
606607
repository's code structure. However, there needs to be some manual additions to the
607608
proper documentation index file(s) for the automation to work.
608609

docs/gallery.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.. currentmodule:: uxarray
22

3-
.. _examples:
4-
5-
.. math::
3+
.. _gallery:
64

75
Gallery
86
=======

docs/getting-started/quick-overview.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"collapsed": false
5353
},
5454
"source": [
55-
"## Opening a Dataset|"
55+
"## Opening a Dataset"
5656
]
5757
},
5858
{
@@ -322,7 +322,7 @@
322322
"mimetype": "text/x-python",
323323
"name": "python",
324324
"nbconvert_exporter": "python",
325-
"pygments_lexer": "ipython2",
325+
"pygments_lexer": "ipython3",
326326
"version": "2.7.6"
327327
}
328328
},

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ around the `UGRID <http://ugrid-conventions.github.io/ugrid-conventions/>`_ conv
112112
GitHub Discussions <https://github.com/UXARRAY/uxarray/discussions>
113113
GitHub Issues <https://github.com/UXARRAY/uxarray/issues>
114114
UGRID Conventions <https://ugrid-conventions.github.io/ugrid-conventions/>
115+
contributing
115116

116117
.. raw:: html
117118

docs/user-guide/advanced-plotting.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"mimetype": "text/x-python",
4949
"name": "python",
5050
"nbconvert_exporter": "python",
51-
"pygments_lexer": "ipython2",
51+
"pygments_lexer": "ipython3",
5252
"version": "2.7.6"
5353
}
5454
},

docs/user-guide/area_calc.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,7 @@
18431843
"cell_type": "markdown",
18441844
"metadata": {},
18451845
"source": [
1846-
"# 7. Demonstrate the Need for Area Correction During Zonal Averaging Calculations Etc.\n",
1846+
"## 7. Demonstrate the Need for Area Correction During Zonal Averaging Calculations Etc.\n",
18471847
"\n",
18481848
"When performing zonal averaging, it is common practice to calculate the intersection of faces with lines of constant latitude and longitude. \n",
18491849
"\n",

docs/user-guide/data-structures.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@
410410
"\n",
411411
"The `UxDataset` class is used for pairing one or more data variables with an unstructured grid. It operates similarly to a `xarrary.Dataset`, with the addition of unstructured-grid specific functionality and is linked to an instance of a `Grid`.\n",
412412
"\n",
413-
"```{info}\n",
413+
"```{tip}\n",
414414
"More information about `xarray.Dataset` can be found [here](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html).\n",
415415
"```\n"
416416
]
@@ -544,7 +544,7 @@
544544
"\n",
545545
"While a `UxDataset` represents one or more data variables linked to some unstructured grid, a `UxDataArray` represent a single data variable. Alternatively, one can think of a `UxDataset` as a collection of one or more `UxDataArray` instances.\n",
546546
"\n",
547-
"```{info}\n",
547+
"```{tip}\n",
548548
"More information about `xarray.DataArray` can be found [here](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html).\n",
549549
"```\n",
550550
"\n",

0 commit comments

Comments
 (0)