rs_workflows/adf_flow.md
Adf conversion flow implementation.
AdfConversionConfig
Bases: NamedTuple
Configuration needed to run one ADF conversion type.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
59 60 61 62 63 64 | |
S03OlAdfConfig
Bases: NamedTuple
Configuration specific to one S03 OL ADF type.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
67 68 69 70 71 | |
SafeDict
Bases: dict
Dict subclass that returns {key} if key is missing or its value is None.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
377 378 379 380 381 382 383 384 385 386 387 | |
adf_conversion(adf_input)
async
Prefect flow for ADF conversion.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
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 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
adf_conversion_task(*args, **kwargs)
async
See: adf_conversion
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
572 573 574 575 | |
create_stac_item_from_zarr(zarr_path, generated_prod_type)
Create a STAC Item from a generated ZARR directory or JSON file.
For ZARR directories, metadata is read from .zattrs or zarr.json. For JSON files, the file itself is the metadata and the item ID is taken from stac_discovery.id when present, otherwise it is derived from the filename (minus the .json extension).
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
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 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
extract_datetimes_from_item_id(item_id)
Extract start and end datetime ISO strings from an item_id.
The expected item_id format is
Returns a (start_datetime, end_datetime) tuple on success, or None when the pattern does not match.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
normalize_stac_datetime_value(value)
Normalize a datetime string to an RFC 3339 UTC representation.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
174 175 176 177 178 179 180 181 | |
normalize_stac_properties_datetimes(stac_props)
Normalize STAC datetime-like property values to include an explicit timezone.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
184 185 186 187 188 189 190 191 | |
resolve_collection_name(mappings, product_type)
Resolve a collection name from mappings, preferring an exact match over '*'.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
163 164 165 166 167 168 169 170 171 | |
run_adf_script(script_path, data_dir, working_dir, output_dir)
Run an ADF conversion tool with the given input and output directories.
When script_path is a Path, the corresponding Python script is executed
with the current interpreter. When it equals :data:STB_CONVERT_PRODUCTS,
the stb_convert_products executable is called instead.
Returns the list of generated ZARR product directories and JSON files.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
194 195 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 | |
substitute_values(obj, values)
Recursively substitute values in a nested structure of dicts/lists/strings.
Source code in docs/rs-client-libraries/rs_workflows/adf_flow.py
390 391 392 393 394 395 396 397 398 | |