Skip to content

Commit

Permalink
API Fields descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
atanas-balevsky committed Dec 22, 2023
1 parent 19400bc commit aaf852b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
22 changes: 15 additions & 7 deletions terracotta/server/rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ class Meta:
example="[0,1]",
missing=None,
description=(
"Stretch range [min, max] to use for red band as JSON array. Min and max may be "
"numbers to use as absolute range, or strings of the format p<int> "
"with an integer between 0 and 100 to use percentiles of the image instead."
"Stretch range [min, max] to use for the red band as JSON array. "
"Min and max may be numbers to use as absolute range, or strings "
"of the format p<int> with an integer between 0 and 100 to use "
"percentiles of the image instead. "
"Null values indicate global minimum / maximum."
),
)
g_range = fields.List(
Expand All @@ -46,8 +48,11 @@ class Meta:
example="[0,1]",
missing=None,
description=(
"Stretch range [min, max] to use for red band as JSON array, "
"prefix with `p` for percentile"
"Stretch range [min, max] to use for the gren band as JSON array. "
"Min and max may be numbers to use as absolute range, or strings "
"of the format p<int> with an integer between 0 and 100 to use "
"percentiles of the image instead. "
"Null values indicate global minimum / maximum."
),
)
b_range = fields.List(
Expand All @@ -56,8 +61,11 @@ class Meta:
example="[0,1]",
missing=None,
description=(
"Stretch range [min, max] to use for red band as JSON array, "
"prefix with `p` for percentile"
"Stretch range [min, max] to use for the blue band as JSON array. "
"Min and max may be numbers to use as absolute range, or strings "
"of the format p<int> with an integer between 0 and 100 to use "
"percentiles of the image instead. "
"Null values indicate global minimum / maximum."
),
)
tile_size = fields.List(
Expand Down
9 changes: 7 additions & 2 deletions terracotta/server/singleband.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ class Meta:
StringOrNumber(allow_none=True, validate=validate_stretch_range),
validate=validate.Length(equal=2),
example="[0,1]",
description="Stretch range to use as JSON array, uses full range by default. "
"Null values indicate global minimum / maximum.",
description=(
"Stretch range [min, max] to use for the band as JSON array. "
"Min and max may be numbers to use as absolute range, or strings "
"of the format p<int> with an integer between 0 and 100 to use "
"percentiles of the image instead. "
"Null values indicate global minimum / maximum."
),
missing=None,
)

Expand Down

0 comments on commit aaf852b

Please sign in to comment.