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