Skip to content

Commit

Permalink
Markdown formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen committed Dec 10, 2023
1 parent 7561064 commit 59ebfcd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
36 changes: 18 additions & 18 deletions docs/user/basics/wflow_syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ 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"

Take a moment to read the Parsl documentation's ["Quick Start"](https://parsl.readthedocs.io/en/stable/quickstart.html) to get a sense of how Parsl works. Namely, you should understand the concept of a [`#!Python python_app`](https://parsl.readthedocs.io/en/stable/1-parsl-introduction.html#Python-Apps) and [`#!Python join_app`](https://parsl.readthedocs.io/en/stable/1-parsl-introduction.html?highlight=join_app#Dynamic-workflows-with-apps-that-generate-other-apps), which describe individual compute tasks and dynamic job tasks, respectively.

<center>

| Quacc | Parsl |
| ------------------ | --------------------- |
| Quacc | Parsl |
| ------------------- | ---------------------- |
| `#!Python @job` | `#!Python @python_app` |
| `#!Python @flow` | No effect |
| `#!Python @flow` | No effect |
| `#!Python @subflow` | `#!Python @join_app` |

</center>
Expand All @@ -28,10 +28,10 @@ To help enable interoperability between workflow engines, quacc offers a unified

<center>

| 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`<br>`#!Python @ct.lattice`</br> |

</center>
Expand All @@ -42,10 +42,10 @@ To help enable interoperability between workflow engines, quacc offers a unified

<center>

| 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()` |

</center>
Expand All @@ -56,8 +56,8 @@ To help enable interoperability between workflow engines, quacc offers a unified

<center>

| Quacc | Redun |
| ------------------ | --------------- |
| Quacc | Redun |
| ------------------- | ---------------- |
| `#!Python @job` | `#!Python @task` |
| `#!Python @flow` | `#!Python @task` |
| `#!Python @subflow` | `#!Python @task` |
Expand All @@ -70,11 +70,11 @@ To help enable interoperability between workflow engines, quacc offers a unified

<center>

| Quacc | Jobflow |
| ------------------ | -------------- |
| Quacc | Jobflow |
| ------------------- | --------------- |
| `#!Python @job` | `#!Python @job` |
| `#!Python @flow` | N/A |
| `#!Python @subflow` | N/A |
| `#!Python @flow` | N/A |
| `#!Python @subflow` | N/A |

</center>

Expand Down
14 changes: 7 additions & 7 deletions src/quacc/wflow_tools/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 59ebfcd

Please sign in to comment.