diff --git a/docs/source/_static/glider.jpg b/docs/source/_static/glider.jpg deleted file mode 100644 index a69e0e4..0000000 Binary files a/docs/source/_static/glider.jpg and /dev/null differ diff --git a/docs/source/_static/glider.png b/docs/source/_static/glider.png new file mode 100644 index 0000000..537498e Binary files /dev/null and b/docs/source/_static/glider.png differ diff --git a/docs/source/conf.py b/docs/source/conf.py index f771370..4107c15 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,7 +11,7 @@ # General information about the project. project = 'glidertest' -author = 'Callum Rollo' +author = 'Eleanor Frajka-Williams, Chiara Monforte, Callum Rollo' copyright = f"{year}, {author}" release = 'v0.0.1' @@ -39,3 +39,5 @@ html_static_path = ['_static'] source_suffix = [".rst", ".md"] + +html_logo = "_static/glider.png" diff --git a/docs/source/glidertest.rst b/docs/source/glidertest.rst index 2504071..e2742c8 100644 --- a/docs/source/glidertest.rst +++ b/docs/source/glidertest.rst @@ -4,4 +4,7 @@ .. automodule:: glidertest.tools :members: :undoc-members: - :show-inheritance: + +.. automodule:: glidertest.fetchers + :members: + :undoc-members: diff --git a/glidertest/fetchers.py b/glidertest/fetchers.py index a7c0ce7..0c58422 100644 --- a/glidertest/fetchers.py +++ b/glidertest/fetchers.py @@ -15,9 +15,20 @@ def load_sample_dataset(dataset_name="sea076_20230906T0852_delayed.nc"): + """Download sample datasets for use with glidertest + + Args: + dataset_name (str, optional): _description_. Defaults to "sea076_20230906T0852_delayed.nc". + + Raises: + ValueError: If the requests dataset is not known, raises a value error + + Returns: + xarray.Dataset: Requested sample dataset + """ if dataset_name in data_source_og.registry.keys(): file_path = data_source_og.fetch(dataset_name) return xr.open_dataset(file_path) else: - msg = f"Requested sample dataset {dataset_name} not known" + msg = f"Requested sample dataset {dataset_name} not known. Specify one of the following available datasets: {list(data_source_og.registry.keys())}" raise ValueError(msg)