From 6d1ee5f5c907b4acf339afa0755163ec69d9fdda Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Tue, 13 Jul 2021 16:40:28 -0700 Subject: [PATCH] Show `jfk_schema_dict` in the Dataset example (#261) --- pydax/_dataset.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pydax/_dataset.py b/pydax/_dataset.py index 1435dee..a32eb67 100644 --- a/pydax/_dataset.py +++ b/pydax/_dataset.py @@ -51,9 +51,19 @@ class Dataset: Example: >>> from tempfile import TemporaryDirectory + >>> import pprint >>> import pydax >>> dataset_schemata = pydax.schema.DatasetSchemaCollection('./tests/schemata/datasets.yaml') >>> jfk_schema_dict = dataset_schemata.export_schema('datasets', 'noaa_jfk', '1.1.4') + >>> pprint.pprint(jfk_schema_dict) + {'description': ... + 'download_url': '...noaa-weather-data-jfk-airport.tar.gz', + ... + 'subdatasets': {'jfk_weather_cleaned': {... + 'format': {'id': 'table/csv', + ...}}, + ... + 'path': 'noaa-weather-data-jfk-airport/jfk_weather_cleaned.csv'}}} >>> jfk_data_dir = TemporaryDirectory() >>> jfk_dataset = Dataset(schema=jfk_schema_dict, data_dir=jfk_data_dir.name) >>> jfk_dataset.download()