Skip to content

Commit

Permalink
Bump ruff from 0.1.7 to 0.1.8 (#898)
Browse files Browse the repository at this point in the history
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.7 to 0.1.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.8</h2>
<h2>Changes</h2>
<p>This release includes opt-in support for formatting Python snippets
within docstrings via the <code>docstring-code-format</code> setting. <a
href="https://astral.sh/blog/ruff-v0.1.8">Check out the blog post</a>
for more details!</p>
<h3>Preview features</h3>
<ul>
<li>Add <code>&quot;preserve&quot;</code> quote-style to mimic Black's
skip-string-normalization (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8822">#8822</a>)</li>
<li>Implement
<code>prefer_splitting_right_hand_side_of_assignments</code> preview
style (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8943">#8943</a>)</li>
<li>[<code>pycodestyle</code>] Add fix for
<code>unexpected-spaces-around-keyword-parameter-equals</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9072">#9072</a>)</li>
<li>[<code>pycodestyle</code>] Add fix for comment-related whitespace
rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9075">#9075</a>)</li>
<li>[<code>pycodestyle</code>] Allow <code>sys.path</code> modifications
between imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9047">#9047</a>)</li>
<li>[<code>refurb</code>] Implement <code>hashlib-digest-hex</code>
(<code>FURB181</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9077">#9077</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>Allow <code>flake8-type-checking</code> rules to automatically quote
runtime-evaluated references (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6001">#6001</a>)</li>
<li>Allow transparent cell magics in Jupyter Notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8911">#8911</a>)</li>
<li>[<code>flake8-annotations</code>] Avoid <code>ANN2xx</code> fixes
for abstract methods with empty bodies (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9034">#9034</a>)</li>
<li>[<code>flake8-self</code>] Ignore underscore references in type
annotations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9036">#9036</a>)</li>
<li>[<code>pep8-naming</code>] Allow class names when
<code>apps.get_model</code> is a non-string (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9065">#9065</a>)</li>
<li>[<code>pycodestyle</code>] Allow <code>matplotlib.use</code> calls
to intersperse imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9094">#9094</a>)</li>
<li>[<code>pyflakes</code>] Support fixing unused assignments in tuples
by renaming variables (<code>F841</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9107">#9107</a>)</li>
<li>[<code>pylint</code>] Add fix for
<code>subprocess-run-without-check</code> (<code>PLW1510</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6708">#6708</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Add <code>docstring-code-format</code> knob to enable docstring
snippet formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8854">#8854</a>)</li>
<li>Use double quotes for all docstrings, including single-quoted
docstrings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9020">#9020</a>)</li>
<li>Implement &quot;dynamic&quot; line width mode for docstring code
formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9098">#9098</a>)</li>
<li>Support reformatting Markdown code blocks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9030">#9030</a>)</li>
<li>add support for formatting reStructuredText code snippets (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9003">#9003</a>)</li>
<li>Avoid trailing comma for single-argument with positional separator
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/9076">#9076</a>)</li>
<li>Fix handling of trailing target comment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9051">#9051</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Hide unsafe fix suggestions when explicitly disabled (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9095">#9095</a>)</li>
<li>Add SARIF support to <code>--output-format</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9078">#9078</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Apply unnecessary index rule prior to enumerate rewrite (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9012">#9012</a>)</li>
<li>[<code>flake8-err-msg</code>] Allow <code>EM</code> fixes even if
<code>msg</code> variable is defined (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9059">#9059</a>)</li>
<li>[<code>flake8-pie</code>] Prevent keyword arguments duplication (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8450">#8450</a>)</li>
<li>[<code>flake8-pie</code>] Respect trailing comma in
<code>unnecessary-dict-kwargs</code> (<code>PIE804</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9015">#9015</a>)</li>
<li>[<code>flake8-raise</code>] Avoid removing parentheses on
ctypes.WinError (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9027">#9027</a>)</li>
<li>[<code>isort</code>] Avoid invalid combination of
<code>force-sort-within-types</code> and
<code>lines-between-types</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9041">#9041</a>)</li>
<li>[<code>isort</code>] Ensure that from-style imports are always
ordered first in <code>__future__</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9039">#9039</a>)</li>
<li>[<code>pycodestyle</code>] Allow tab indentation before keyword (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9099">#9099</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.1.8</h2>
<p>This release includes opt-in support for formatting Python snippets
within
docstrings via the <code>docstring-code-format</code> setting.
<a href="https://astral.sh/blog/ruff-v0.1.8">Check out the blog post</a>
for more details!</p>
<h3>Preview features</h3>
<ul>
<li>Add <code>&quot;preserve&quot;</code> quote-style to mimic Black's
skip-string-normalization (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8822">#8822</a>)</li>
<li>Implement
<code>prefer_splitting_right_hand_side_of_assignments</code> preview
style (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8943">#8943</a>)</li>
<li>[<code>pycodestyle</code>] Add fix for
<code>unexpected-spaces-around-keyword-parameter-equals</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9072">#9072</a>)</li>
<li>[<code>pycodestyle</code>] Add fix for comment-related whitespace
rules (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9075">#9075</a>)</li>
<li>[<code>pycodestyle</code>] Allow <code>sys.path</code> modifications
between imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9047">#9047</a>)</li>
<li>[<code>refurb</code>] Implement <code>hashlib-digest-hex</code>
(<code>FURB181</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9077">#9077</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>Allow <code>flake8-type-checking</code> rules to automatically quote
runtime-evaluated references (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6001">#6001</a>)</li>
<li>Allow transparent cell magics in Jupyter Notebooks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8911">#8911</a>)</li>
<li>[<code>flake8-annotations</code>] Avoid <code>ANN2xx</code> fixes
for abstract methods with empty bodies (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9034">#9034</a>)</li>
<li>[<code>flake8-self</code>] Ignore underscore references in type
annotations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9036">#9036</a>)</li>
<li>[<code>pep8-naming</code>] Allow class names when
<code>apps.get_model</code> is a non-string (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9065">#9065</a>)</li>
<li>[<code>pycodestyle</code>] Allow <code>matplotlib.use</code> calls
to intersperse imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9094">#9094</a>)</li>
<li>[<code>pyflakes</code>] Support fixing unused assignments in tuples
by renaming variables (<code>F841</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9107">#9107</a>)</li>
<li>[<code>pylint</code>] Add fix for
<code>subprocess-run-without-check</code> (<code>PLW1510</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6708">#6708</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Add <code>docstring-code-format</code> knob to enable docstring
snippet formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8854">#8854</a>)</li>
<li>Use double quotes for all docstrings, including single-quoted
docstrings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9020">#9020</a>)</li>
<li>Implement &quot;dynamic&quot; line width mode for docstring code
formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9098">#9098</a>)</li>
<li>Support reformatting Markdown code blocks (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9030">#9030</a>)</li>
<li>add support for formatting reStructuredText code snippets (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9003">#9003</a>)</li>
<li>Avoid trailing comma for single-argument with positional separator
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/9076">#9076</a>)</li>
<li>Fix handling of trailing target comment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9051">#9051</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Hide unsafe fix suggestions when explicitly disabled (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9095">#9095</a>)</li>
<li>Add SARIF support to <code>--output-format</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9078">#9078</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Apply unnecessary index rule prior to enumerate rewrite (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9012">#9012</a>)</li>
<li>[<code>flake8-err-msg</code>] Allow <code>EM</code> fixes even if
<code>msg</code> variable is defined (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9059">#9059</a>)</li>
<li>[<code>flake8-pie</code>] Prevent keyword arguments duplication (<a
href="https://redirect.github.com/astral-sh/ruff/pull/8450">#8450</a>)</li>
<li>[<code>flake8-pie</code>] Respect trailing comma in
<code>unnecessary-dict-kwargs</code> (<code>PIE804</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9015">#9015</a>)</li>
<li>[<code>flake8-raise</code>] Avoid removing parentheses on
ctypes.WinError (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9027">#9027</a>)</li>
<li>[<code>isort</code>] Avoid invalid combination of
<code>force-sort-within-types</code> and
<code>lines-between-types</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9041">#9041</a>)</li>
<li>[<code>isort</code>] Ensure that from-style imports are always
ordered first in <code>__future__</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/9039">#9039</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/c014622003e9b348310d7b7be862f6ccffae7137"><code>c014622</code></a>
Bump version to v0.1.8 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/9116">#9116</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b6fb972e6f08608babf663bfe63f31d0795a7d54"><code>b6fb972</code></a>
config: add new <code>docstring-code-format</code> knob (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8854">#8854</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/18452cf477390e849979df46dbceb88a8c3dfbe1"><code>18452cf</code></a>
Add <code>as_slice</code> method for all string nodes (<a
href="https://redirect.github.com/astral-sh/ruff/issues/9111">#9111</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/cb99815c3e6a9e22b97dcc8ad689abf568b9b3e0"><code>cb99815</code></a>
Feature: Add SARIF output support (<a
href="https://redirect.github.com/astral-sh/ruff/issues/9078">#9078</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/45f603000dc19d0d5fb67ba63e5aa0c0e83869a2"><code>45f6030</code></a>
<code>prefer_splitting_right_hand_side_of_assignments</code> preview
style (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8943">#8943</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1a65e544c5896634a00c05bc463d0e60ec737001"><code>1a65e54</code></a>
Allow <code>flake8-type-checking</code> rules to automatically quote
runtime-evaluated r...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4d2ee5bf986c62e47ac5c70a9ce145e4ef8c0138"><code>4d2ee5b</code></a>
Add named expression handling to <code>find_assigned_value</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/9109">#9109</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/8314c8bb056507cd2af064004b73f783b761e2bb"><code>8314c8b</code></a>
[<code>typing</code>] Add <code>find_assigned_value</code> helper func
to <code>typing.rs</code> to retrieve v...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/cb201bc4a5ab1a6e312b375f820d48bdcc4bf9a3"><code>cb201bc</code></a>
<code>PIE804</code>: Prevent keyword arguments duplication (<a
href="https://redirect.github.com/astral-sh/ruff/issues/8450">#8450</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/6c0068eeecbd5ea64e4286e7866b3b7ba25bd338"><code>6c0068e</code></a>
Remove <code>ExprFormattedValue</code> formatting impl (<a
href="https://redirect.github.com/astral-sh/ruff/issues/9108">#9108</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.1.7...v0.1.8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.1.7&new-version=0.1.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Elliot Gunton <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elliot Gunton <[email protected]>
  • Loading branch information
dependabot[bot] and elliotgunton authored Dec 19, 2023
1 parent db4ffd4 commit e434f52
Show file tree
Hide file tree
Showing 3 changed files with 278 additions and 21 deletions.
257 changes: 257 additions & 0 deletions docs/examples/workflows/scripts/callable_script_v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
# Callable Script V1






=== "Hera"

```python linenums="1"
from typing import List, Union

from hera.shared.serialization import serialize

try:
from typing import Annotated # type: ignore
except ImportError:
from typing_extensions import Annotated # type: ignore
try:
from pydantic.v1 import BaseModel
except (ImportError, ModuleNotFoundError):
from pydantic import BaseModel


from hera.shared import global_config
from hera.workflows import Parameter, RunnerScriptConstructor, Script, Steps, Workflow, script

# Note, setting constructor to runner is only possible if the source code is available
# along with dependencies include hera in the image.
# Callable is a robust mode that allows you to run any python function
# and is compatible with pydantic. It automatically parses the input
# and serializes the output.
global_config.image = "my-image-with-python-source-code-and-dependencies"
global_config.set_class_defaults(Script, constructor=RunnerScriptConstructor(pydantic_mode=1))
# Script annotations is still an experimental feature and we need to explicitly opt in to it
# Note that experimental features are subject to breaking changes in future releases of the same major version
global_config.experimental_features["script_annotations"] = True


# An optional pydantic input type
# hera can automatically de-serialize argo
# arguments into types denoted by your function's signature
# as long as they are de-serializable by pydantic
# This provides auto-magic input parsing with validation
# provided by pydantic.
class Input(BaseModel):
a: int
b: str = "foo"
c: Union[str, int, float]

class Config:
smart_union = True


# An optional pydantic output type
# hera can automatically serialize the output
# of your function into a json string
# as long as they are serializable by pydantic or json serializable
# This provides auto-magic output serialization with validation
# provided by pydantic.
class Output(BaseModel):
output: List[Input]


@script()
def my_function(input: Input) -> Output:
return Output(output=[input])


# Note that the input type is a list of Input
# hera can also automatically de-serialize
# composite types like lists and dicts
@script()
def another_function(inputs: List[Input]) -> Output:
return Output(output=inputs)


# it also works with raw json strings
# but those must be explicitly marked as
# a string type
@script()
def str_function(input: str) -> Output:
# Example function to ensure we are not json parsing
# string types before passing it to the function
return Output(output=[Input.parse_raw(input)])


# Use the script_annotations feature to seamlessly enable aliased kebab-case names
# as your template interface, while using regular snake_case in the Python code
@script()
def function_kebab(
a_but_kebab: Annotated[int, Parameter(name="a-but-kebab")] = 2,
b_but_kebab: Annotated[str, Parameter(name="b-but-kebab")] = "foo",
c_but_kebab: Annotated[float, Parameter(name="c-but-kebab")] = 42.0,
) -> Output:
return Output(output=[Input(a=a_but_kebab, b=b_but_kebab, c=c_but_kebab)])


@script()
def function_kebab_object(annotated_input_value: Annotated[Input, Parameter(name="input-value")]) -> Output:
return Output(output=[annotated_input_value])


with Workflow(name="my-workflow") as w:
with Steps(name="my-steps") as s:
my_function(arguments={"input": Input(a=2, b="bar", c=42)})
str_function(arguments={"input": serialize(Input(a=2, b="bar", c=42))})
another_function(arguments={"inputs": [Input(a=2, b="bar", c=42), Input(a=2, b="bar", c=42.0)]})
function_kebab(arguments={"a-but-kebab": 3, "b-but-kebab": "bar"})
function_kebab_object(arguments={"input-value": Input(a=3, b="bar", c="42")})
```

=== "YAML"

```yaml linenums="1"
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: my-workflow
spec:
templates:
- name: my-steps
steps:
- - arguments:
parameters:
- name: input
value: '{"a": 2, "b": "bar", "c": 42}'
name: my-function
template: my-function
- - arguments:
parameters:
- name: input
value: '{"a": 2, "b": "bar", "c": 42}'
name: str-function
template: str-function
- - arguments:
parameters:
- name: inputs
value: '[{"a": 2, "b": "bar", "c": 42}, {"a": 2, "b": "bar", "c": 42.0}]'
name: another-function
template: another-function
- - arguments:
parameters:
- name: a-but-kebab
value: '3'
- name: b-but-kebab
value: bar
name: function-kebab
template: function-kebab
- - arguments:
parameters:
- name: input-value
value: '{"a": 3, "b": "bar", "c": "42"}'
name: function-kebab-object
template: function-kebab-object
- inputs:
parameters:
- name: input
name: my-function
script:
args:
- -m
- hera.workflows.runner
- -e
- examples.workflows.scripts.callable_script_v1:my_function
command:
- python
env:
- name: hera__script_annotations
value: ''
- name: hera__pydantic_mode
value: '1'
image: my-image-with-python-source-code-and-dependencies
source: '{{inputs.parameters}}'
- inputs:
parameters:
- name: input
name: str-function
script:
args:
- -m
- hera.workflows.runner
- -e
- examples.workflows.scripts.callable_script_v1:str_function
command:
- python
env:
- name: hera__script_annotations
value: ''
- name: hera__pydantic_mode
value: '1'
image: my-image-with-python-source-code-and-dependencies
source: '{{inputs.parameters}}'
- inputs:
parameters:
- name: inputs
name: another-function
script:
args:
- -m
- hera.workflows.runner
- -e
- examples.workflows.scripts.callable_script_v1:another_function
command:
- python
env:
- name: hera__script_annotations
value: ''
- name: hera__pydantic_mode
value: '1'
image: my-image-with-python-source-code-and-dependencies
source: '{{inputs.parameters}}'
- inputs:
parameters:
- default: '2'
name: a-but-kebab
- default: foo
name: b-but-kebab
- default: '42.0'
name: c-but-kebab
name: function-kebab
script:
args:
- -m
- hera.workflows.runner
- -e
- examples.workflows.scripts.callable_script_v1:function_kebab
command:
- python
env:
- name: hera__script_annotations
value: ''
- name: hera__pydantic_mode
value: '1'
image: my-image-with-python-source-code-and-dependencies
source: '{{inputs.parameters}}'
- inputs:
parameters:
- name: input-value
name: function-kebab-object
script:
args:
- -m
- hera.workflows.runner
- -e
- examples.workflows.scripts.callable_script_v1:function_kebab_object
command:
- python
env:
- name: hera__script_annotations
value: ''
- name: hera__pydantic_mode
value: '1'
image: my-image-with-python-source-code-and-dependencies
source: '{{inputs.parameters}}'
```

36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def test_hera_output_upstream(module_name, global_config_fixture):
global_config_fixture.host = "http://hera.testing"
workflow = importlib.import_module(f"examples.workflows.upstream.{module_name}").w
generated_yaml_path = Path(hera_upstream_examples.__file__).parent / f"{module_name.replace('_', '-')}.yaml"
upstream_yaml_path = (
Path(hera_upstream_examples.__file__).parent / f"{module_name.replace('_', '-')}.upstream.yaml"
)
upstream_yaml_path = Path(
hera_upstream_examples.__file__
).parent / f"{module_name.replace('_', '-')}.upstream.yaml"

# WHEN
output = workflow.to_dict()
Expand Down

0 comments on commit e434f52

Please sign in to comment.