Skip to main content

scientific_workflow/
task.rs

1//! Generic application workloads behind one uniform runtime definition.
2//!
3//! Application authors import [`basic`], implement [`basic::ExecutionUnit`],
4//! and register the implementation with
5//! `#[scientific_workflow::execution_unit("key")]`.
6//! Study creates model tasks from registered models plus resolved constants and
7//! creates program tasks directly from declarative executable paths. Python
8//! declarations are lowered by Config to the same program boundary. All use
9//! one internal Task definition. [`advanced`] retains the same supported
10//! public surface; adapters and execution ports remain crate-private.
11
12mod catalog;
13mod definition;
14mod execution;
15mod result;
16mod unit;
17
18#[cfg(test)]
19#[path = "task/tests/task_workflow.rs"]
20mod task_workflow_tests;
21
22/// Ordinary application-facing task API.
23pub mod basic {
24    pub use super::result::TaskResult;
25    pub use super::unit::{ExecutionUnit, ModelView};
26}
27
28/// Supported task API for advanced users and Workflow peer subsystems.
29pub mod advanced {
30    #[allow(unused_imports)]
31    pub use super::basic::*;
32    #[doc(hidden)]
33    pub use super::catalog::ModelRegistration;
34    pub(crate) use super::catalog::{ModelCatalog, ModelCatalogError};
35    pub(crate) use super::definition::{ModelTaskProvenance, Task, TaskKind};
36    pub(crate) use super::execution::{ProgramTaskInvocation, TaskDefinition, TaskExecutionHost};
37}