Skip to content

Add workr::RunProject for multi-phase workflow orchestration #10

@jwildfire

Description

Summary
Implement workr::RunProject() to run multiple workflow phase folders in sequence while sharing one lData object.

Proposed signature
RunProject(strPath, lData = NULL, lConfig = NULL, strPhases = NULL, bRecursive = FALSE, bReturnResult = TRUE, bKeepInputData = FALSE, strResultNames = c("Type", "ID"))

Implementation plan

  1. Validate strPath exists and discover phase folders.
  2. Resolve phase order: use strPhases when provided, otherwise sorted subdirectories.
  3. For each phase: load workflows via MakeWorkflowList(strPath = file.path(strPath, phase), strPackage = NULL, bRecursive = bRecursive).
  4. Run each phase via RunWorkflows() using current lData.
  5. Carry forward outputs to downstream phases and keep per-phase results.
  6. Return either final result or structured object with phase results and final lData; document behavior clearly.

Error handling and logging

  • Fatal on missing strPath or missing requested phases.
  • Warn on empty phase folder.
  • Log phase start/end with workflow counts.

Tests

  • Phase execution order.
  • strPhases subset and custom order.
  • Data handoff between phases.
  • Return contract for bReturnResult and bKeepInputData.
  • Empty/missing phase behavior.

Acceptance criteria

  • Exported RunProject() with roxygen docs and man page.
  • Unit tests pass.
  • README RunProject section updated after implementation.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions