rs_workflows/flow_utils.md¶
Utility module for the Prefect flows.
AdfProcessIn
¶
Bases: BaseModel
Input parameters for executing the 'adf_conversion' flow.
This model defines all the configuration needed to run an ADF conversion script.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
AdfType
¶
Bases: str, Enum
ADF type
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
AuxiliaryProductMapping
¶
Bases: BaseModel
Represents mapping for auxiliary products.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
AuxiliarySource
¶
Bases: str, Enum
STAC source for auxiliary product search.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
ConversionIn
¶
Bases: BaseModel
Input parameters for the 'convert-safe' Prefect flow, implemented by 'on_demand_conversion'.
Defines the configuration needed to convert a legacy SAFE product to its EOPF (Zarr) counterpart on demand, including the input product, output collection, Dask cluster, and output Zarr format.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
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
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | |
DprProcessOut
dataclass
¶
Output parameters for the 'dpr-process' flow
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
DprProcessedItemMetadata
dataclass
¶
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
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 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 | |
__init__(args)
¶
Constructor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
serialize()
¶
Serialize this object with Pydantic.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
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
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
FlowGeneratedProduct
¶
Bases: BaseModel
Represents one generated output product.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
FlowInputProduct
¶
Bases: BaseModel
Represents one input product for the processor.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
InstrumentMode
¶
LoggingLevel
¶
Bases: str, Enum
Logging level allowed by eopf.logging module
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
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
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
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
SentinelSatellite
¶
Bases: str, Enum
Sentinel satellite name
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
WorkflowType
¶
Bases: str, Enum
Workflow type.
Source code in docs/rs-client-libraries/rs_workflows/flow_utils.py
of_run(force_systematic)
classmethod
¶
Workflow of a run started by a user (on-demand), or by an automation of the systematic processing
(force_systematic): the automations start the next processing of the chain only from a systematic one.