From f99cbd1bd3fd5d2acbb46761f41d6e0d62864892 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 7 Mar 2024 10:23:09 -0500 Subject: [PATCH] pin rasterio and fiona (#321) --- msc_pygeoapi/provider/msc_dms.py | 11 ++++++----- requirements.txt | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/msc_pygeoapi/provider/msc_dms.py b/msc_pygeoapi/provider/msc_dms.py index 43c0ba17..63a069d8 100644 --- a/msc_pygeoapi/provider/msc_dms.py +++ b/msc_pygeoapi/provider/msc_dms.py @@ -144,7 +144,7 @@ def get_fields(self): elif isinstance(v, dict): type_ = 'object' - fields_[k] = {'type': type_} + fields_[k] = {'type': type_, 'title': k} fields_ = dict(sorted(fields_.items())) return fields_ @@ -401,9 +401,7 @@ def __init__(self, provider_def): MSCDMSCoreAPIProvider.__init__(self, provider_def) def get_fields(self): - new_fields = { - 'field': [] - } + new_fields = {} fields_ = MSCDMSCoreAPIProvider.get_fields(self) @@ -412,6 +410,7 @@ def get_fields(self): continue uom = None + units = None unit_field = f'{key}-uom' if unit_field in fields_: @@ -426,6 +425,8 @@ def get_fields(self): field_def = { 'id': key, 'name': key, + 'title': key, + 'x-ogc-unit': units, 'type': 'Quantity', 'encodingInfo': { 'dataType': f"http://www.opengis.net/def/dataType/OGC/0/{value['type']}" # noqa @@ -435,7 +436,7 @@ def get_fields(self): if uom is not None: field_def['uom'] = uom - new_fields['field'].append(field_def) + new_fields[key] = field_def return new_fields diff --git a/requirements.txt b/requirements.txt index f6d114f7..14e7984e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ click elasticsearch>=8,<9 -fiona +fiona<1.10 gdal lxml netcdf4 @@ -10,7 +10,7 @@ pygeometa pyproj<3.5 python-slugify pyyaml -rasterio +rasterio<1.4 requests sqlalchemy unicodecsv