Skip to content

Commit

Permalink
Add docs signposts to install experimental extra for decorators (#1137
Browse files Browse the repository at this point in the history
)

Adds installation instructions to README, advanced-hera-features and the
decorators user guide.

Signed-off-by: Elliot Gunton <[email protected]>
  • Loading branch information
elliotgunton authored Jul 25, 2024
1 parent 4912b86 commit 25dd8ee
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ w.create()

### Optional dependencies

#### yaml
#### `yaml`

- Install via `hera[yaml]`
- [PyYAML](https://pypi.org/project/PyYAML/) is required for the `yaml` output format, which is accessible via
`hera.workflows.Workflow.to_yaml(*args, **kwargs)`. This enables GitOps practices and easier debugging.

#### cli
#### `cli`

- Install via `hera[cli]`. The `[cli]` option installs the extra dependency [Cappa](https://github.com/DanCardin/cappa)
required for the CLI
Expand All @@ -155,6 +155,9 @@ w.create()
- **_The CLI is an experimental feature and subject to change!_** At the moment it only supports generating YAML files
from workflows via `hera generate yaml`. See `hera generate yaml --help` for more information.

#### `experimental`
- Install via `hera[experimental]`. The `[experimental]` option adds dependencies required for experimental features that have not yet graduated into stable features.

## Presentations

- [KubeCon/ArgoCon EU 2024 - Orchestrating Python Functions Natively in Argo Using Hera](https://www.youtube.com/watch?v=4G3Q6VMBvfI&list=PLj6h78yzYM2NA4NbSC6_mQNza2r3WV87h&index=4)
Expand Down
7 changes: 5 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ w.create()

### Optional dependencies

#### yaml
#### `yaml`

- Install via `hera[yaml]`
- [PyYAML](https://pypi.org/project/PyYAML/) is required for the `yaml` output format, which is accessible via
`hera.workflows.Workflow.to_yaml(*args, **kwargs)`. This enables GitOps practices and easier debugging.

#### cli
#### `cli`

- Install via `hera[cli]`. The `[cli]` option installs the extra dependency [Cappa](https://github.com/DanCardin/cappa)
required for the CLI
Expand All @@ -155,6 +155,9 @@ w.create()
- **_The CLI is an experimental feature and subject to change!_** At the moment it only supports generating YAML files
from workflows via `hera generate yaml`. See `hera generate yaml --help` for more information.

#### `experimental`
- Install via `hera[experimental]`. The `[experimental]` option adds dependencies required for experimental features that have not yet graduated into stable features.

## Presentations

- [KubeCon/ArgoCon EU 2024 - Orchestrating Python Functions Natively in Argo Using Hera](https://www.youtube.com/watch?v=4G3Q6VMBvfI&list=PLj6h78yzYM2NA4NbSC6_mQNza2r3WV87h&index=4)
Expand Down
6 changes: 6 additions & 0 deletions docs/user-guides/decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ If you want to declare inputs and outputs in your templates, you must use the sp
classes from `hera.workflows` so that Hera can deduce the inputs and outputs of your templates from the fields declared
in the classes.

You must also install the optional extras under `experimental` to enable the full feature set for decorators

```bash
pip install hera[experimental]
```

## `dag` and `steps`

The `dag` and `steps` decorator bring brand-new functionality to Hera, as they allow you to run and test your dag and
Expand Down
8 changes: 7 additions & 1 deletion docs/walk-through/advanced-hera-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ Read the full guide on script pydantic IO in [the script user guide](../user-gui

Decorators for dags, steps and containers are provided alongside a new script decorator, letting your declare Workflows via Python functions alone.

To enable the decorators, you must set the `experimental_feature` flag `decorator_syntax`
To enable the decorators, you must install the optional extras under `experimental`

```bash
pip install hera[experimental]
```

You can then set the `experimental_feature` flag `decorator_syntax` in your code

```py
global_config.experimental_features["decorator_syntax"] = True
Expand Down

0 comments on commit 25dd8ee

Please sign in to comment.