Skip to content

Commit

Permalink
Merge branch 'main' into remove-parameter-default
Browse files Browse the repository at this point in the history
Signed-off-by: Elliot Gunton <elliotgunton@gmail.com>
  • Loading branch information
elliotgunton authored Sep 13, 2024
2 parents 69782ae + ca94176 commit 47f2a67
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 281 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Hera

<img src =docs/assets/hera-logo.svg width="30%">
<img src=https://raw.githubusercontent.com/argoproj-labs/hera/main/docs/assets/hera-logo.svg width="30%" alt="Hera mascot">

Hera is a Python framework for constructing and submitting Argo Workflows. The main goal of Hera is to make the Argo
ecosystem accessible by simplifying workflow construction and submission.
Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and
submit your Workflows entirely in Python.

[See the Quick Start guide](https://hera.readthedocs.io/en/stable/walk-through/quick-start/) to start using Hera to
orchestrate your Argo Workflows!
Expand All @@ -13,9 +13,9 @@ The Argo was constructed by the shipwright Argus,
and its crew were specially protected by the goddess Hera.
```

### PyPi stats
### PyPI stats

[![Pypi](https://img.shields.io/pypi/v/hera.svg)](https://pypi.python.org/pypi/hera)
[![PyPI](https://img.shields.io/pypi/v/hera.svg)](https://pypi.python.org/pypi/hera)
[![Versions](https://img.shields.io/pypi/pyversions/hera.svg)](https://github.com/argoproj-labs/hera)

[![Downloads](https://static.pepy.tech/badge/hera)](https://pepy.tech/project/hera)
Expand Down Expand Up @@ -128,15 +128,14 @@ w.create()

## Installation

| Source | Command |
|------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| [PyPI](https://pypi.org/project/hera/) | `pip install hera` |
| [GitHub repo](https://github.com/argoproj-labs/hera) | `python -m pip install git+https://github.com/argoproj-labs/hera --ignore-installed` |

> **Note** Hera went through a name change - from `hera-workflows` to `hera`. This is reflected in the published Python
> package. If you'd like to install versions prior to `5.0.0`, you have to use `hera-workflows`. Hera currently
> publishes releases to both `hera` and `hera-workflows` for backwards compatibility purposes.
| Source | Command |
|----------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| [PyPi](https://pypi.org/project/hera/) | `pip install hera` |
| [PyPi](https://pypi.org/project/hera-workflows/) | `pip install hera-workflows` |
| [GitHub repo](https://github.com/argoproj-labs/hera) | `python -m pip install git+https://github.com/argoproj-labs/hera --ignore-installed; pip install .` |
> package. If you'd like to install versions prior to `5.0.0`, you should do `pip install hera-workflows<5`. Hera
> currently publishes releases to both `hera` and `hera-workflows` for backwards compatibility purposes.
### Optional dependencies

Expand Down
180 changes: 0 additions & 180 deletions docs/README.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/README.md
7 changes: 3 additions & 4 deletions docs/contributing/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ There have been other libraries available for structuring and submitting Argo Wo
While the aforementioned libraries provided amazing functionality for Argo workflow construction and submission, they
required an advanced understanding of Argo concepts. When [Dyno Therapeutics](https://dynotx.com) started using Argo
Workflows, it was challenging to construct and submit experimental machine learning workflows. Scientists and engineers
at [Dyno Therapeutics](https://dynotx.com) used a lot of time for workflow definition rather than the implementation of
the atomic unit of execution - the Python function - that performed, for instance, model training.
were using a lot of time for workflow definition rather than the implementation of the atomic unit of execution - the
Python function - that performed, for instance, model training. Hera was created to help focus on the unit of execution,
and was released as an open-source library for the benefit of Python Argo Workflows users.

Hera presents an intuitive Python interface to the underlying API of Argo, with custom classes making use of context
managers and callables, empowering users to focus on their own executable payloads rather than workflow setup.
Expand Down Expand Up @@ -146,8 +147,6 @@ class DagDiamond(Workflow):

## Hera V5 vs V4

_Reserving here for Bloomberg history with Argo/Hera._

Hera v5 is a major release that introduces breaking changes from v4. The main reason for this is that v5 is a complete
rewrite of the library, and is now based on the OpenAPI specification of Argo Workflows. This allows us to provide a
more intuitive interface to the Argo API, while also providing full feature parity with Argo Workflows. This means that
Expand Down
14 changes: 9 additions & 5 deletions docs/user-guides/expr.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Hera Python -> expr transpiler
# Python expr transpiler

[**Expr**](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md) is an expression evaluation language used by [**Argo**](https://argoproj.github.io/argo-workflows/variables/#expression).
[Expr](https://expr-lang.org/) is a Go-centric expression language used by
[Argo Workflows](https://argoproj.github.io/argo-workflows/variables/#expression).

Hera provides an easy way to construct `expr` expressions in `Python`. It supports the full language definition of `expr` including the enhancements added by `Argo`.
Hera provides an easy way to construct `expr` expressions in Python. It supports the full language definition of `expr`
including the enhancements added by Argo.

## Usage

The recommended way of using the `hera.expr` module is to construct the expression in Python. Once your expressions is ready to be used,
you may call `str(<expression>)` to convert it to an appropriate `expr` expression. `hera` also supports formatting expressions such that they are surrounded by braces which is useful in Argo when substituting variables.. You can do this via Python string format literals and by adding `$` as a format string.
The recommended way of using the `hera.expr` module is to construct the expression in Python. Once your expressions is
ready to be used, you may call `str(<expression>)` to convert it to an appropriate `expr` expression. Hera also supports
formatting expressions such that they are surrounded by braces which is useful in Argo when substituting variables. You
can do this via Python string format literals and by adding `$` as a format string.

Example:

Expand Down
Loading

0 comments on commit 47f2a67

Please sign in to comment.