Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit 287441b

Browse files
committed
🎨 improve forms for cube builder parameters
1 parent f006dc1 commit 287441b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

cube_builder/forms.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ class CustomMaskDefinition(Schema):
108108
bits = fields.Boolean(required=False, allow_none=False, dump_default=False)
109109

110110

111+
class CustomScaleSchema(Schema):
112+
"""Represent the Band attribute scale factor and scale mult."""
113+
114+
add = fields.Float(required=True, allow_none=False, allow_nan=False)
115+
mult = fields.Float(required=True, allow_none=False, allow_nan=False)
116+
117+
111118
class CubeParametersSchema(Schema):
112119
"""Represent the data cube parameters used to be attached to the cube execution."""
113120

@@ -116,6 +123,15 @@ class CubeParametersSchema(Schema):
116123
histogram_matching = fields.Bool(required=False, allow_none=False)
117124
no_post_process = fields.Bool(required=False, allow_none=False)
118125
band_map = fields.Dict(required=False, allow_none=False)
126+
channel_limits = fields.List(
127+
fields.List(fields.Float, many=True, validate=fields.Length(equal=2)),
128+
required=False,
129+
allow_none=False,
130+
validate=fields.Length(min=1, max=3)
131+
)
132+
combined = fields.Boolean(required=False, allow_none=False)
133+
resampling = fields.String(required=False, allow_none=False, default="nearest")
134+
scale = fields.Nested(CustomScaleSchema, required=False, allow_none=False)
119135

120136

121137
class DataCubeForm(Schema):

0 commit comments

Comments
 (0)