Interdisciplinary Workflow
Interdisciplinary Workflow Documentation sub-package for MaRDMO.
Provides everything needed to document interdisciplinary research workflows within RDMO:
- :mod:
~MaRDMO.workflow.models— Dataclasses for ProcessStep, Method, Software, Hardware, and DataSet entities from MaRDI Portal / Wikidata, as well as Variables and Parameters. - :mod:
~MaRDMO.workflow.handlers— Signal handlers that populate the questionnaire when a software, hardware, instrument, data set, method, or process-step ID is saved. - :mod:
~MaRDMO.workflow.providers— RDMO optionset providers for searching software, hardware, instruments, data sets, methods, process steps, disciplines, and workflow tasks in external knowledge graphs. - :mod:
~MaRDMO.workflow.worker— Background worker for generating workflow previews and exporting workflow entries to the MaRDI Portal. - :mod:
~MaRDMO.workflow.utils— Helpers for partitioning disciplines, extracting data-set size, reference, and archive metadata. - :mod:
~MaRDMO.workflow.constants— URI-prefix maps, property lists, and reproducibility vocabulary for the workflow catalog.
Handlers
Module containing Handlers for the Interdisciplinary Workflow Documentation.
Information inherits _entry, _collect_existing_ids, _hydrate_relatants, and _fill from BaseInformation (MaRDMO/handler_base.py).
Information
Bases: BaseInformation
Handlers for the Workflow Documentation questionnaire.
Source code in MaRDMO/workflow/handlers.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 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 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 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 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 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
__init__()
Load workflow questions, base URI, RDMO options, and MathAlgoDB registry.
Source code in MaRDMO/workflow/handlers.py
31 32 33 34 35 36 37 | |
algorithm(instance)
Handle Algorithm ID save: hydrate basics and SPARQL data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
101 102 103 104 105 106 107 | |
data_set(instance)
Handle Data Set ID save: hydrate basics and SPARQL data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
93 94 95 96 97 98 99 | |
hardware(instance)
Handle Hardware ID save: hydrate basics and SPARQL data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
59 60 61 62 63 64 65 | |
model(instance)
Handle Workflow Model ID save: add linked Tasks from the MaRDI Portal.
Queries the MaRDI Portal for computational tasks linked to the selected model and adds any not yet present as Task values. Already-present tasks are left untouched so tasks from previously selected models are preserved.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
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 | |
process_step(instance)
Handle Process Step ID save: hydrate basics and cascade to all related entities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
109 110 111 112 113 114 115 | |
processor_cores(instance)
Handle CPU ID save: query and write number of processor cores.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
software(instance)
Handle Software ID save: hydrate basics and SPARQL data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
51 52 53 54 55 56 57 | |
workflow(instance)
Handle Workflow ID save: hydrate basics and SPARQL data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
instance
|
RDMO :class: |
required |
Source code in MaRDMO/workflow/handlers.py
43 44 45 46 47 48 49 | |
Models
Dataclasses that represent entities in the Interdisciplinary Workflow documentation catalog.
Each class maps to one entity type collected from MaRDI Portal and Wikidata during workflow documentation. Instances are populated from SPARQL query results and carry the fields needed to render questionnaire answers and export entries.
Provides:
- :class:
ProcessStepUsage— algorithm/method usage within a process step - :class:
ProcessStep— process steps associated with a workflow - :class:
Software— software associated with a workflow - :class:
Hardware— hardware associated with a workflow - :class:
DataSet— data sets associated with a workflow
Cpu
dataclass
Number of processor cores for a CPU entity.
Source code in MaRDMO/workflow/models.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
from_query_batch(raw_data)
classmethod
Parse a batch SPARQL result into {external_id: instance} dict.
Source code in MaRDMO/workflow/models.py
153 154 155 156 157 158 159 160 161 162 | |
CpuEntry
dataclass
One CPU type on a hardware entity, with count information.
Source code in MaRDMO/workflow/models.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | |
from_query(raw)
classmethod
Parse a 4-field ||-delimited string into a CpuEntry instance.
Source code in MaRDMO/workflow/models.py
134 135 136 137 138 139 140 141 142 143 144 145 | |
DataSet
dataclass
Metadata and relations of a Data Set entity from MaRDI/Wikidata.
Source code in MaRDMO/workflow/models.py
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 | |
from_query(raw_data)
classmethod
Parse a single-item SPARQL result (backward-compatible).
Source code in MaRDMO/workflow/models.py
285 286 287 288 | |
from_query_batch(raw_data)
classmethod
Parse a batch SPARQL result into {external_id: instance} dict.
Source code in MaRDMO/workflow/models.py
290 291 292 293 294 295 296 297 | |
from_query_single(data)
classmethod
Parse one SPARQL result row into a DataSet instance.
Source code in MaRDMO/workflow/models.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
Hardware
dataclass
Node/core counts and CPU relations of a Hardware entity.
Source code in MaRDMO/workflow/models.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
from_query(raw_data)
classmethod
Parse a single-item SPARQL result (backward-compatible).
Source code in MaRDMO/workflow/models.py
173 174 175 176 | |
from_query_batch(raw_data)
classmethod
Parse a batch SPARQL result into {external_id: instance} dict.
Source code in MaRDMO/workflow/models.py
178 179 180 181 182 183 184 185 | |
from_query_single(data)
classmethod
Parse one SPARQL result row into a Hardware instance.
Source code in MaRDMO/workflow/models.py
187 188 189 190 191 192 193 194 195 196 | |
ProcessStep
dataclass
Relations of a Process Step entity from MaRDI/Wikidata.
Source code in MaRDMO/workflow/models.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
from_query(raw_data)
classmethod
Parse a single-item SPARQL result (backward-compatible).
Source code in MaRDMO/workflow/models.py
87 88 89 90 | |
from_query_batch(raw_data)
classmethod
Parse a batch SPARQL result into {external_id: instance} dict.
Source code in MaRDMO/workflow/models.py
92 93 94 95 96 97 98 99 | |
from_query_single(data)
classmethod
Parse one SPARQL result row into a ProcessStep instance.
Source code in MaRDMO/workflow/models.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
ProcessStepUsage
dataclass
Usage of an algorithm or method in a process step.
Covers both algorithm-in-process-step (qualifier=software, hardware=hardware)
and method-in-process-step (qualifier=instrument, hardware always empty).
Parsed from a fixed-position 11-field ||-delimited main block followed
by an optional >|<-separated parameters section.
Source code in MaRDMO/workflow/models.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
from_query(raw)
classmethod
Parse id||label||desc||q||ql||qd||hw||hwl||hwd||doi||url >|< params.
Source code in MaRDMO/workflow/models.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
Workflow
dataclass
Top-level metadata of an Interdisciplinary Workflow entity from MaRDI Portal.
Source code in MaRDMO/workflow/models.py
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 | |
from_query_batch(raw_data)
classmethod
Parse a batch SPARQL result into {external_id: instance} dict.
Source code in MaRDMO/workflow/models.py
223 224 225 226 227 228 229 230 | |
from_query_single(data)
classmethod
Parse one SPARQL result row into a Workflow instance.
Source code in MaRDMO/workflow/models.py
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 | |
Providers
RDMO optionset providers for the Workflow documentation catalog.
Each provider class implements get_options and is referenced from the
workflow catalog configuration. Providers query MaRDI Portal and Wikidata
for entity suggestions covering research disciplines, methods, tasks, hardware,
instruments, data sets, process steps, and related mathematical models.
Provides:
- :class:
MainMathematicalModel— look up the main mathematical model for a workflow - :class:
Method— numerical/analytical method lookup; refresh on select - :class:
RelatedMethod— method lookup with optional user creation - :class:
WorkflowTask— task lookup; refresh on save (depends on selected model) - :class:
Hardware— hardware platform lookup; refresh on select - :class:
Instrument— scientific instrument lookup; refresh on select - :class:
DataSet— data set lookup; refresh on select - :class:
RelatedInstrument— instrument lookup with optional user creation - :class:
RelatedDataSet— data-set lookup with optional user creation - :class:
ProcessStep— workflow process-step lookup; refresh on select - :class:
Discipline— research discipline lookup sourced from questionnaire answers
DataSet
Bases: Provider
Data Set Provider (MaRDI Portal / Wikidata), No User Creation, Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | |
Hardware
Bases: Provider
Hardware Provider (MaRDI Portal / Wikidata), No User Creation, Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
Instrument
Bases: Provider
Instrument Provider (MaRDI Portal / Wikidata), No User Creation, Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
MathematicalModel
Bases: Provider
Main Mathematical Model Provider (MaRDI Portal), No User Creation, Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
ProcessStep
Bases: Provider
Process Step Provider (MaRDI Portal / Wikidata), No User Creation, Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | |
RelatedAlgorithmWithCreation
Bases: Provider
Algorithm Provider (MaRDI Portal / Wikidata), No User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
RelatedCPUModelWithCreation
Bases: Provider
CPU Model Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
101 102 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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
RelatedDataSetWithCreation
Bases: Provider
Data Set Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
RelatedHardwareOrSoftwareWithoutCreation
Bases: Provider
Hardware, Software Provider (MaRDI Portal), No User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 | |
RelatedHardwareWithCreation
Bases: Provider
Hardware Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
RelatedInstrumentWithCreation
Bases: Provider
Instrument Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
RelatedMethodWithCreation
Bases: Provider
Method Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
RelatedProgrammingLanguageWithCreation
Bases: Provider
Method Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
RelatedStepWithCreation
Bases: Provider
Step Provider (MaRDI Portal / Wikidata), User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
RelatedWorkflowEntityWithoutCreation
Bases: Provider
Interdisciplinary Workflow, Process Step, and Data Set Provider (MaRDI Portal / Wikidata), No User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | |
get_options(project, search=None, user=None, site=None)
Query the MathModDB ontology and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | |
RelatedWorkflowWithoutCreation
Bases: Provider
Workflow Provider (MaRDI Portal), No User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
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 | |
Task
Bases: Provider
Computational Task Provider (MaRDI Portal), No User Creation, No Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
Workflow
Bases: Provider
Workflow Provider (MaRDI Portal / Wikidata), No User Creation, Refresh Upon Selection
Source code in MaRDMO/workflow/providers.py
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 | |
get_options(project, search=None, user=None, site=None)
Query external knowledge-graph source(s) and return matching options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
RDMO project instance (used for user-entry lookups when applicable). |
required | |
search
|
Search string entered by the user; returns empty list when fewer than 3 characters. |
None
|
|
user
|
Requesting user (unused). |
None
|
|
site
|
Current site (unused). |
None
|
Returns:
| Type | Description |
|---|---|
|
List of |
Source code in MaRDMO/workflow/providers.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
Workers
Worker module for Interdisciplinary Workflow preview and export.
Provides :class:PrepareWorkflow, which assembles RDMO questionnaire answers
into a :class:~MaRDMO.payload.GeneratePayload ready for submission to the
MaRDI Portal Wikibase instance.
PrepareWorkflow
Bases: PublicationExport
Prepare interdisciplinary workflow answers for preview and export.
Inherits publication export helpers from
:class:~MaRDMO.publication.worker.PublicationExport and extends them
with workflow-specific relation mapping and Wikibase payload generation.
Source code in MaRDMO/workflow/worker.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 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 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 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 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 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | |
__init__()
Initialise with Wikibase vocabulary and ontology registries.
Source code in MaRDMO/workflow/worker.py
40 41 42 43 44 45 | |
export(data, url)
Assemble and return the complete Wikibase payload for a Workflow documentation export.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Top-level workflow answers dict produced by |
required | |
url
|
Target Wikibase API URL for the upload. |
required |
Returns:
| Type | Description |
|---|---|
|
Tuple |
|
|
meth: |
Source code in MaRDMO/workflow/worker.py
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 375 376 377 378 379 380 381 382 383 384 385 | |
preview(answers)
Enrich the answers dict with derived display structures for the preview template.
First iterates over :data:~MaRDMO.workflow.constants.preview_relations and calls
:func:~MaRDMO.helpers.entity_relations for each entry to resolve cross-entity
relation labels (e.g. Workflow → Process Step) into the answers dict — the same
pattern used by the model and algorithm preview workers.
Then builds model_task_pairs — an ordered list of dicts with keys model,
tasks, has_model, and has_tasks — for every workflow in the project
and stores it directly on each workflow's sub-dict
(answers['workflow'][i]['model_task_pairs']) so the template can access it as
values.model_task_pairs inside the {% for values in answers.workflow.values %}
loop without integer-key lookups. Indices from both models and tasks are unioned
so that a task with no matching model (or vice versa) still produces a row with the
appropriate validation flags set.
Similarly builds algorithm_software_pairs and method_instrument_pairs —
ordered lists of dicts with generic keys primary, qualifier,
has_primary, and has_qualifier — for every process step. Index i
pairs algorithm i with software i (and method i with instrument i);
a missing partner raises a validation flag rendered as a red warning via the
_relation_block_single_with_qualifier.html include.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
answers
|
Top-level answers dict produced by |
required |
Returns:
| Type | Description |
|---|---|
|
The same answers dict with relation labels and |
Source code in MaRDMO/workflow/worker.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 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 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 254 255 256 257 258 259 260 261 262 263 264 | |
Constants
Compile-time constants and configuration builders for the Workflow catalog.
Centralises the property URIs, question/item mappings, and publication-order
definitions used by the workflow documentation sub-package at runtime.
Values are loaded once from the RDMO database via the getters helpers
and then referenced by handlers, providers, and workers.
Provides:
get_uri_prefix_map()— returns the{prefix: URI}map used to expand compact IDsorder_to_publish()— returns the ordered list of workflow attributes for portal export- Module-level constants built from the above
get_relations()
Return the workflow relation mapping.
Extends the shared publication-role mapping with the workflow intra-class relations (contains / contained in) from MathModDB.
Source code in MaRDMO/workflow/constants.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
get_uri_prefix_map()
Build the attribute-URI → section config mapping for the Workflow Documentation.
Maps each relation attribute URI to the corresponding questionnaire section metadata needed to add or hydrate the related entity.
Returns:
| Type | Description |
|---|---|
|
Dict mapping full RDMO attribute URI strings to dicts with keys |
|
|
|
Source code in MaRDMO/workflow/constants.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
order_to_publish()
Build an ordered mapping of publishing option keys to (rank, option_value) tuples.
Returns:
| Type | Description |
|---|---|
|
Dict |
|
|
where values are resolved RDMO option strings. |
Source code in MaRDMO/workflow/constants.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
Utils
Utility functions for extracting and normalising workflow-related data.
Provides helpers that read structured answers from the RDMO questionnaire and derive derived values (data-set sizes, references, archive URLs) needed by the workflow worker and handler layers.
Provides:
get_size— extract the data-set size value from answer optionsget_option_text_pair— resolve an option label and paired text value from a SPARQL result
get_option_text_pair(data, options, opt_key, *value_keys)
Resolve an option label and the first available text value from a SPARQL result dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
SPARQL result row dict with nested |
required | |
options
|
Options dict mapping RDMO option URIs to string values. |
required | |
opt_key
|
Key whose resolved option URI is looked up in options. |
required | |
*value_keys
|
One or more keys tried left-to-right for the text value; the first non-empty one is used. |
()
|
Returns:
| Type | Description |
|---|---|
|
|
Source code in MaRDMO/workflow/utils.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
get_size(data, options)
Extract the size unit and value from a data-set answer dict.
Resolves the unit from either size_unit (RDMO option URI) or falls
back to items when a record count is given.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Answer sub-dict for the data-set size questions. |
required | |
options
|
Options dict mapping RDMO option URIs to string values. |
required |
Returns:
| Type | Description |
|---|---|
|
|
Source code in MaRDMO/workflow/utils.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |