You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hsmodels/schemas/fields.py
+17-10Lines changed: 17 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -286,15 +286,15 @@ class Config:
286
286
title="Variable unit",
287
287
description="A string containing the units for the raster band variable",
288
288
)
289
-
no_data_value: str=Field(
289
+
no_data_value: float=Field(
290
290
default=None,
291
291
title="Nodata value",
292
-
description="A string containing the numeric nodata value for the raster band",
292
+
description="A float containing the numeric nodata value for the raster band",
293
293
)
294
-
maximum_value: str=Field(
294
+
maximum_value: float=Field(
295
295
default=None,
296
296
title="Maximum value",
297
-
description="A string containing the maximum numeric value for the raster band",
297
+
description="A float containing the maximum numeric value for the raster band",
298
298
)
299
299
comment: str=Field(
300
300
default=None, title="Comment", description="A string containing a comment about the raster band"
@@ -304,10 +304,10 @@ class Config:
304
304
title="Method",
305
305
description="A string containing a description of the method used to create the raster band data",
306
306
)
307
-
minimum_value: str=Field(
307
+
minimum_value: float=Field(
308
308
default=None,
309
309
title="Minimum value",
310
-
description="A string containing the minimum numerica value for the raster dataset",
310
+
description="A float containing the minimum numerica value for the raster dataset",
311
311
)
312
312
313
313
@@ -328,11 +328,11 @@ class Config:
328
328
)
329
329
# TODO: What is the "field_type_code"? It's not displayed on the resource landing page, but it's encoded in the
330
330
# aggregation metadata as an integer value.
331
-
field_type_code: str=Field(
331
+
field_type_code: int=Field(
332
332
default=None,
333
333
max_length=50,
334
334
title="Field type code",
335
-
description="A string value containing a code that indicates the field type",
335
+
description="An integer value containing a code that indicates the field type",
336
336
)
337
337
field_width: int=Field(
338
338
default=None, title="Field width", description="An integer value containing the width of the attribute field"
@@ -445,7 +445,7 @@ class Config:
445
445
# TODO: The NoData value for a variable in an ODM2 database is not always an integer.
446
446
# It could be a floating point value. We might want to change this to a string or a floating point value
447
447
# It is an integer in the HydroShare database, so will have to be updated there as well if changed
448
-
no_data_value: int=Field(title="NoData value", description="The NoData value for the variable")
448
+
no_data_value: float=Field(title="NoData value", description="The NoData value for the variable")
449
449
variable_definition: str=Field(
450
450
default=None,
451
451
max_length=255,
@@ -628,15 +628,18 @@ class Config:
628
628
description="A string containing the status of the time series result chosen from the ODM2 Status controlled vocabulary",
629
629
)
630
630
sample_medium: str=Field(
631
+
default=None,
631
632
max_length=255,
632
633
title="Sample medium",
633
634
description="A string containing the sample medium in which the time series result was measured chosen from the ODM2 Medium controlled vocabulary",
634
635
)
635
636
value_count: int=Field(
637
+
default=None,
636
638
title="Value count",
637
639
description="An integer value containing the number of data values contained within the time series result",
638
640
)
639
641
aggregation_statistic: str=Field(
642
+
default=None,
640
643
max_length=255,
641
644
title="Aggregation statistic",
642
645
description="A string containing the aggregation statistic associated with the values of the time series result chosen from the ODM2 Aggregation Statistic controlled vocabulary",
@@ -651,18 +654,22 @@ class Config:
651
654
description="A string containing a label for the time series result",
652
655
)
653
656
site: TimeSeriesSite=Field(
657
+
default=None,
654
658
title="Site",
655
659
description="An object containing metadata about the site at which the time series result was created",
656
660
)
657
661
variable: TimeSeriesVariable=Field(
658
-
title="Variablef",
662
+
default=None,
663
+
title="Variable",
659
664
description="An object containing metadata about the observed variable associated with the time series result values",
660
665
)
661
666
method: TimeSeriesMethod=Field(
667
+
default=None,
662
668
title="Method",
663
669
description="An object containing metadata about the method used to produce the time series result values",
664
670
)
665
671
processing_level: ProcessingLevel=Field(
672
+
default=None,
666
673
title="Processing level",
667
674
description="An object containing metadata about the processing level or level of quality control to which the time series result values have been subjected",
0 commit comments