2424
2525router = APIRouter (prefix = "/collections/observations" )
2626
27- env = Environment (
28- loader = FileSystemLoader (os .getenv ("JINJA2_TEMPLATES" , "templates" )),
29- autoescape = select_autoescape (),
30- )
27+ env = Environment (loader = FileSystemLoader (os .getenv ("JINJA2_TEMPLATES" , "templates" )), autoescape = select_autoescape ())
3128
3229
3330@router .get (
@@ -64,32 +61,21 @@ async def search_timeseries(
6461 ] = None ,
6562 institution : Annotated [
6663 str | None ,
67- Query (
68- description = "Institution that published the data" ,
69- openapi_examples = openapi_examples .institution ,
70- ),
64+ Query (description = "Institution that published the data" , openapi_examples = openapi_examples .institution ),
7165 ] = None ,
7266 platform : Annotated [
7367 str | None ,
74- Query (
75- description = "Platform ID, WIGOS or WIGOS equivalent." ,
76- openapi_examples = openapi_examples .wigos_id ,
77- ),
68+ Query (description = "Platform ID, WIGOS or WIGOS equivalent." , openapi_examples = openapi_examples .wigos_id ),
7869 ] = None ,
7970 standard_name : Annotated [
8071 str | None ,
8172 Query (
82- alias = "standard-name" ,
83- description = "CF 1.9 standard name" ,
84- openapi_examples = openapi_examples .standard_name ,
73+ alias = "standard-name" , description = "CF 1.9 standard name" , openapi_examples = openapi_examples .standard_name
8574 ),
8675 ] = None ,
8776 unit : Annotated [
8877 str | None ,
89- Query (
90- description = "Unit of observed physical property" ,
91- openapi_examples = openapi_examples .unit ,
92- ),
78+ Query (description = "Unit of observed physical property" , openapi_examples = openapi_examples .unit ),
9379 ] = None ,
9480 instrument : Annotated [str | None , Query (description = "Instrument Id" )] = None ,
9581 level : Annotated [
@@ -101,16 +87,12 @@ async def search_timeseries(
10187 ] = None ,
10288 period : Annotated [
10389 str | None ,
104- Query (
105- description = "Duration of collection period in ISO8601" ,
106- openapi_examples = openapi_examples .period ,
107- ),
90+ Query (description = "Duration of collection period in ISO8601" , openapi_examples = openapi_examples .period ),
10891 ] = None ,
10992 method : Annotated [
11093 str | None ,
11194 Query (
112- description = "Aggregation method used to sample observed property" ,
113- openapi_examples = openapi_examples .method ,
95+ description = "Aggregation method used to sample observed property" , openapi_examples = openapi_examples .method
11496 ),
11597 ] = None ,
11698 f : Annotated [
@@ -168,8 +150,7 @@ async def get_time_series_by_id(
168150 ] = formatters .Metadata_Formats .geojson ,
169151):
170152 obs_request = dstore .GetObsRequest (
171- filter = dict (timeseries_id = dstore .Strings (values = [item_id ])),
172- temporal_latest = True ,
153+ filter = dict (timeseries_id = dstore .Strings (values = [item_id ])), temporal_latest = True
173154 )
174155 time_series = await get_obs_request (obs_request )
175156
0 commit comments