-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add methods to API docs and use typehints Closes #160 #161 * Use the Pydata theme for docs Closes #164 * Add methods to API docs and use typehints Closes #160 #161 * Use the Pydata theme for docs Closes #164 * Hide the top menu navigation from the index page * Docs revamp Start of a big revamp of the docs. - Uses Pydata theme - Enables MyST markdown and converts a lot of the docs to it (rst heading levels and git conflict formatting conflict, which was a fun discovery) - Re-arranges things along the Diátaxis framework lines, or at least how they are being used in the PyData space - Adds the vision or 'Why Xpublish' page - Breaks the tutorial into sections and scaffolds sections for use of plugins Closes #163 #165 #162 #166 * Update xarray-contrib to xpublish-community * Pre-commit format markdown and docs code snippets * Dataset router plugin tutorial and other doc tweaks * Use literalinclude rather than duplicating doc code * Remove some under-construction alerts
- Loading branch information
Showing
31 changed files
with
1,090 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ sphinx-autosummary-accessors | |
pydata-sphinx-theme | ||
sphinx-autodoc-typehints | ||
autodoc_pydantic | ||
myst-nb | ||
sphinx-design |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Ecosystem | ||
|
||
Xpublish's ecosystem is made up of plugins and servers, and the folks who build and run them. | ||
|
||
## Connect | ||
|
||
We have two main venues for discussing Xpublish and it's ecosystem, Github Discussions and Slack. | ||
|
||
### Github Discussions | ||
|
||
For longer form discussions, we can be found in [Github Discussions](https://github.com/xpublish-community/community/discussions?discussions_q=). | ||
|
||
### Slack | ||
|
||
Xpublish has a channel (`#xpublish`) on [ESIP](https://www.esipfed.org/)'s (Earth Science Information Partners) Slack. (Insert Rich's justification here about ESIP being the biggest unbrella that he can find) [Join here](https://join.slack.com/t/esip-all/shared_invite/zt-1omjufm9z-iH8Gf7gmmsm2SiS5Xh6BlQ) | ||
|
||
## Server distributions | ||
|
||
- [XREDS](https://github.com/asascience-open/xreds) from RPS | ||
- [Xpublish Host](https://github.com/axiom-data-science/xpublish-host) from Axiom Data Science | ||
|
||
## Plugins | ||
|
||
- [OGC EDR](https://github.com/xpublish-community/xpublish-edr/) | ||
- [OpenDAP](https://github.com/xpublish-community/xpublish-opendap/) | ||
- [WMS](https://github.com/xpublish-community/xpublish-wms) | ||
- [Intake](https://github.com/axiom-data-science/xpublish-intake) | ||
|
||
## Experiments | ||
|
||
We have a separate Github organization ([xpublish-experiments](https://github.com/xpublish-experiments)) for things that you've tried and want to share with the community, but don't necessarily want to maintain. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Getting started | ||
|
||
The getting started guide aims to get you using Xpublish productively as quickly as possible. | ||
It is designed as an entry point for new users, and it provided an introduction to Xpublish’s main concepts. | ||
|
||
```{toctree} | ||
--- | ||
hidden: | ||
--- | ||
why-xpublish | ||
installation | ||
tutorial/index | ||
``` |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
docs/source/getting-started/tutorial/dataset-provider-plugin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Building a dataset provider plugin | ||
|
||
So far, we've been eagerly loading datasets for Xpublish to serve, but this tends not to scale well between memory needs and slow startup. Xpublish plugins can also be __Dataset Providers__ and handle loading of datasets on request. | ||
|
||
This also allows organizations to quickly be able to adapt Xpublish to work in their own environment, rather than needing Xpublish to explicitly support it. | ||
|
||
```{literalinclude} dataset-provider-plugin.py | ||
``` | ||
|
||
With this plugin, Xpublish can serve the same datasets as we explictly defined and loaded in [serving multiple datasets](./serving-multiple-datasets.md), as well as any others supported by [`xr.tutorial`](https://github.com/pydata/xarray/blob/main/xarray/tutorial.py) | ||
|
||
```{note} | ||
For more details on building dataset provider plugins, please see the [plugin user guide](../../user-guide/plugins.md#dataset-provider-plugins) | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/source/getting-started/tutorial/dataset-provider-plugin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import xarray as xr | ||
from requests import HTTPError | ||
|
||
from xpublish import Plugin, Rest, hookimpl | ||
|
||
|
||
class TutorialDataset(Plugin): | ||
name = 'xarray-tutorial-dataset' | ||
|
||
@hookimpl | ||
def get_datasets(self): | ||
return list(xr.tutorial.file_formats) | ||
|
||
@hookimpl | ||
def get_dataset(self, dataset_id: str): | ||
try: | ||
return xr.tutorial.open_dataset(dataset_id) | ||
except HTTPError: | ||
return None | ||
|
||
|
||
rest = Rest({}) | ||
rest.register_plugin(TutorialDataset()) | ||
rest.serve() |
Oops, something went wrong.