diff --git a/docs/user/basics/wflow_syntax.md b/docs/user/basics/wflow_syntax.md index 01bf3d8f40..5ee90dd7a1 100644 --- a/docs/user/basics/wflow_syntax.md +++ b/docs/user/basics/wflow_syntax.md @@ -6,7 +6,7 @@ Here, we provide code snippets for several decorator-based workflow engines. For ## Background -To help enable interoperability between workflow engines, quacc offers a unified set of decorators: [`#!Python @job`](https://quantum-accelerators.github.io/quacc/reference/quacc/utils/wflows.html#quacc.wflow_tools.job), [`#!Python @flow`](https://quantum-accelerators.github.io/quacc/reference/quacc/utils/wflows.html#quacc.wflow_tools.flow), and [`#!Python @subflow`](https://quantum-accelerators.github.io/quacc/reference/quacc/utils/wflows.html#quacc.wflow_tools.subflow). +To help enable interoperability between workflow engines, quacc offers a unified set of decorators: [`#!Python @job`](https://quantum-accelerators.github.io/quacc/reference/quacc/wflow_tools/decorators.html#quacc.wflow_tools.decorators.job), [`#!Python @flow`](https://quantum-accelerators.github.io/quacc/reference/quacc/wflow_tools/decorators.html#quacc.wflow_tools.decorators.flow), and [`#!Python @subflow`](https://quantum-accelerators.github.io/quacc/reference/quacc/wflow_tools/decorators.html#quacc.wflow_tools.decorators.subflow). === "Parsl" @@ -14,10 +14,10 @@ To help enable interoperability between workflow engines, quacc offers a unified
- | Quacc | Parsl | - | ------------------ | --------------------- | + | Quacc | Parsl | + | ------------------- | ---------------------- | | `#!Python @job` | `#!Python @python_app` | - | `#!Python @flow` | No effect | + | `#!Python @flow` | No effect | | `#!Python @subflow` | `#!Python @join_app` |
@@ -28,10 +28,10 @@ To help enable interoperability between workflow engines, quacc offers a unified
- | Quacc | Covalent | - | ------------------ | ---------------------------------- | - | `#!Python @job` | `#!Python @ct.electron` | - | `#!Python @flow` | `#!Python @ct.lattice` | + | Quacc | Covalent | + | ------------------- | ------------------------------------------------------ | + | `#!Python @job` | `#!Python @ct.electron` | + | `#!Python @flow` | `#!Python @ct.lattice` | | `#!Python @subflow` | `#!Python @ct.electron`
`#!Python @ct.lattice`
|
@@ -42,10 +42,10 @@ To help enable interoperability between workflow engines, quacc offers a unified
- | Quacc | Covalent | - | ------------------ | ---------------------------------- | - | `#!Python @job` | `#!Python @delayed` | - | `#!Python @flow` | No effect | + | Quacc | Covalent | + | ------------------- | ---------------------------------| + | `#!Python @job` | `#!Python @delayed` | + | `#!Python @flow` | No effect | | `#!Python @subflow` | `#!Python delayed(...).compute()` |
@@ -56,8 +56,8 @@ To help enable interoperability between workflow engines, quacc offers a unified
- | Quacc | Redun | - | ------------------ | --------------- | + | Quacc | Redun | + | ------------------- | ---------------- | | `#!Python @job` | `#!Python @task` | | `#!Python @flow` | `#!Python @task` | | `#!Python @subflow` | `#!Python @task` | @@ -70,11 +70,11 @@ To help enable interoperability between workflow engines, quacc offers a unified
- | Quacc | Jobflow | - | ------------------ | -------------- | + | Quacc | Jobflow | + | ------------------- | --------------- | | `#!Python @job` | `#!Python @job` | - | `#!Python @flow` | N/A | - | `#!Python @subflow` | N/A | + | `#!Python @flow` | N/A | + | `#!Python @subflow` | N/A |
diff --git a/src/quacc/wflow_tools/decorators.py b/src/quacc/wflow_tools/decorators.py index ebd1d4c277..a49c58c2e6 100644 --- a/src/quacc/wflow_tools/decorators.py +++ b/src/quacc/wflow_tools/decorators.py @@ -17,9 +17,9 @@ def job(_func: Callable | None = None, **kwargs) -> Job: Decorator for individual compute jobs. This is a `#!Python @job` decorator. Think of each `#!Python @job`-decorated function as an individual SLURM job, if that helps. - | Quacc | Covalent | Parsl | Dask | Prefect | Redun | Jobflow | - | ----- | ------------- | ------------ | ---- | ------- | ------ | ------- | - | `job` | `ct.electron` | `python_app` | `delayed` |`task` | `task` | `job` | + | Quacc | Covalent | Parsl | Dask | Prefect | Redun | Jobflow | + | ----- | ------------- | ------------ | --------- | ------- | ------ | ------- | + | `job` | `ct.electron` | `python_app` | `delayed` |`task` | `task` | `job` | All `#!Python @job`-decorated functions are transformed into their corresponding decorator. @@ -202,8 +202,8 @@ def flow( Decorator for workflows, which consist of at least one compute job. This is a `#!Python @flow` decorator. - | Quacc | Covalent | Parsl | Dask | Prefect | Redun | Jobflow | - | ------ | ------------ | --------- | ----- | ------- | ------ | --------- | + | Quacc | Covalent | Parsl | Dask | Prefect | Redun | Jobflow | + | ------ | ------------ | --------- | --------- | ------- | ------ | --------- | | `flow` | `ct.lattice` | No effect | No effect | `flow` | `task` | No effect | All `#!Python @flow`-decorated functions are transformed into their corresponding @@ -351,8 +351,8 @@ def subflow( """ Decorator for (dynamic) sub-workflows. This is a `#!Python @subflow` decorator. - | Quacc | Covalent | Parsl | Dask | Prefect | Redun | Jobflow | - | --------- | ------------------------- | ---------- | ----- |------- | ------ | --------- | + | Quacc | Covalent | Parsl | Dask | Prefect | Redun | Jobflow | + | --------- | ------------------------- | ---------- | --------- | ------- | ------ | --------- | | `subflow` | `ct.electron(ct.lattice)` | `join_app` | `delayed` | `flow` | `task` | No effect | All `#!Python @subflow`-decorated functions are transformed into their corresponding