rs_workflows/flow_utils.md
Utility module for the Prefect flows.
AuxiliaryProductMapping
Bases: BaseModel
Represents mapping for auxiliary products.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
206 207 208 209 210 211 212 213 214 | |
items()
Helper method to return the model fields as items, useful for logging.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
212 213 214 | |
DprProcessIn
Bases: BaseModel
Input parameters for executing the 'dpr-process' flow.
This model defines all the configuration needed to run a DPR processor, including input datasets, generated outputs, auxiliary data mapping, processing modes, and scheduling parameters.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | |
check_model()
Ensure mutual exclusivity between pipeline and unit.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
348 349 350 351 352 353 354 355 356 357 | |
normalize_processor_name(v)
classmethod
Normalize processor name to string.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
336 337 338 339 340 | |
normalize_satellite_name(v)
classmethod
Normalize satellite name to string.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
342 343 344 345 346 | |
DprProcessOut
dataclass
Output parameters for the 'dpr-process' flow
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
360 361 362 363 364 365 366 367 | |
DprProcessedItemMetadata
dataclass
Metadata for a DPR processed item.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
370 371 372 373 374 375 376 | |
FlowEnv
Prefect flow environment and reusable objects.
Attributes:
| Name | Type | Description |
|---|---|---|
owner_id |
str
|
User/owner ID |
calling_span |
SpanContext | None
|
OpenTelemetry span of the calling flow, if any. |
this_span |
SpanContext | None
|
Current OpenTelemetry span. |
rs_client |
RsClient
|
RsClient instance |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
__init__(args)
Constructor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
serialize()
Serialize this object with Pydantic.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
138 139 140 141 142 143 144 145 146 147 148 149 150 | |
start_span(instrumenting_module_name, name)
Context manager for creating a new main or child OpenTelemetry span and set it as the current span in this tracer's context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instrumenting_module_name
|
str
|
Caller module name, just pass name |
required |
name
|
str
|
The name of the span to be created (use a custom name) |
required |
Yields:
| Type | Description |
|---|---|
Span
|
The newly-created span. |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | |
FlowEnvArgs
Bases: BaseModel
Prefect flow environment arguments.
Attributes:
| Name | Type | Description |
|---|---|---|
owner_id |
str
|
User/owner ID (necessary to retrieve the user info: API key and OAuth2 cookie) |
from |
the right Prefect block. NOTE
|
may be useless after each user has their own prefect |
calling_span |
tuple
|
Serialized OpenTelemetry span of the calling flow, if any. |
service_name |
str
|
OpenTelemetry service name |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
FlowGeneratedProduct
Bases: BaseModel
Represents one generated output product.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
191 192 193 194 195 196 197 198 199 200 201 202 203 | |
items()
Helper method to return the model fields as items, useful for logging.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
201 202 203 | |
FlowInputProduct
Bases: BaseModel
Represents one input product for the processor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
179 180 181 182 183 184 185 186 187 188 | |
items()
Helper method to return the model fields as items, useful for logging.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
186 187 188 | |
Priority
Bases: str, Enum
Priority for the cluster dask to be able to prioritise task execution.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
35 36 37 38 39 40 41 42 | |
ProcessingMode
Bases: str, Enum
List of mode to be applied when calling the DPR processor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
55 56 57 58 59 60 61 62 63 64 | |
RetryConfig
Bases: BaseModel
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
staging_retries
|
Number of retry attempts for staging operations |
required | |
staging_retry_delay
|
Delay in seconds between retry attempts. |
required |
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
379 380 381 382 383 384 385 386 387 | |
SentinelSatellite
Bases: str, Enum
Sentinel satellite name
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
67 68 69 70 71 72 73 74 75 76 77 78 | |
WorkflowType
Bases: str, Enum
Workflow type.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
45 46 47 48 49 50 51 52 | |