Skip to content

Commit

Permalink
Merge pull request #174 from martindurant/references
Browse files Browse the repository at this point in the history
Add reference HDF recipe type
  • Loading branch information
rabernat authored Aug 31, 2021
2 parents c7b6562 + 84d8bb2 commit 690594a
Show file tree
Hide file tree
Showing 22 changed files with 4,688 additions and 134 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Setup Python
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ sphinx:

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
version: 3.8
install:
- requirements: docs/requirements.txt
37 changes: 0 additions & 37 deletions ci/py3.7.yml

This file was deleted.

4 changes: 4 additions & 0 deletions ci/py3.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ dependencies:
- h5netcdf
- h5py
- hdf5
- intake
- intake-xarray
- lxml
- netcdf4
- numcodecs
- numpy
- pandas
- pip
Expand All @@ -37,3 +40,4 @@ dependencies:
- pip
- pip:
- pytest-timeout
- fsspec-reference-maker
4 changes: 4 additions & 0 deletions ci/py3.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ dependencies:
- h5netcdf
- h5py
- hdf5
- intake
- intake-xarray
- lxml # Optional dep of pydap
- netcdf4
- numcodecs
- numpy
- pandas
- pip
Expand All @@ -36,3 +39,4 @@ dependencies:
- zarr>=2.6.0
- pip:
- pytest-timeout
- fsspec-reference-maker
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# we always have to manually run the notebooks because they are slow / expensive
jupyter_execute_notebooks = "auto"
execution_excludepatterns = ["tutorials/*"]
execution_excludepatterns = ["tutorials/xarray_zarr/*", "tutorials/hdf_reference/*"]

# -- Options for HTML output -------------------------------------------------

Expand Down
31 changes: 27 additions & 4 deletions docs/recipe_user_guide/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ The target Zarr dataset will conform to the

The best way to really understand how recipes work is to go through the relevant
tutorials for this recipe class. These are, in order of increasing complexity
- {doc}`../tutorials/netcdf_zarr_sequential`
- {doc}`../tutorials/multi_variable_recipe`
- {doc}`../tutorials/terraclimate`

Below we give a very basic overview of how recipes are used.
- {doc}`../tutorials/xarray_zarr/netcdf_zarr_sequential`
- {doc}`../tutorials/xarray_zarr/cmip6-recipe`
- {doc}`../tutorials/xarray_zarr/multi_variable_recipe`
- {doc}`../tutorials/xarray_zarr/terraclimate`
- {doc}`../tutorials/xarray_zarr/opendap_subset_recipe`

Below we give a very basic overview of how this recipe is used.

First you must define a {doc}`file pattern <file_patterns>`.
Once you have a {class}`file pattern <pangeo_forge_recipes.patterns.FilePattern>` object,
Expand Down Expand Up @@ -82,6 +85,26 @@ move on to {doc}`execution`.
The API documentation below explains all of the possible options for `XarrayZarrRecipe`.
Many of these options are explored further in the {doc}`../tutorials/index`.

#### API Documentation

```{eval-rst}
.. autoclass:: pangeo_forge_recipes.recipes.XarrayZarrRecipe
```

### HDF Reference Recipe

Like the `XarrayZarrRecipe`, this recipe allows us to more efficiently access data from a bunch of NetCDF / HDF files.
However, this recipe does not actually copy the original source data.
Instead, it generates metadata files which reference and index the original data, allowing it to be accessed more quickly and easily.
For more background, see [this blog post](https://medium.com/pangeo/fake-it-until-you-make-it-reading-goes-netcdf4-data-on-aws-s3-as-zarr-for-rapid-data-access-61e33f8fe685).

There is currently one tutorial for this recipe:

- - {doc}`../tutorials/hdf_reference/reference_cmip6`

#### API Documentation


```{eval-rst}
.. autoclass:: pangeo_forge_recipes.recipes.HDFReferenceRecipe
```
13 changes: 5 additions & 8 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
sphinx
pangeo-sphinx-book-theme>=0.1.1
myst-parser
myst-nb>=0.12.3
sphinx-copybutton
sphinx==3.5.4
pangeo-sphinx-book-theme==0.1.1
myst-parser==0.13.6
myst-nb==0.12.3
sphinx-copybutton==0.3.1
sphinx-autodoc-typehints
fsspec
prefect
rechunker>=0.4.2
-e .
Loading

0 comments on commit 690594a

Please sign in to comment.