Skip to content

Commit

Permalink
Run make codegen
Browse files Browse the repository at this point in the history
* Covers all code changes rather than just `make format`

Signed-off-by: Elliot Gunton <[email protected]>
  • Loading branch information
elliotgunton committed Jan 22, 2025
1 parent 183a8d0 commit 1637ae9
Show file tree
Hide file tree
Showing 17 changed files with 767 additions and 1,009 deletions.
2 changes: 1 addition & 1 deletion docs/examples/workflows/upstream/ci_output_artifact.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The upstream example can be [found here](https://github.com/argoproj/argo-workfl
image="{{inputs.parameters.os-image}}",
command=["sh", "-c"],
args=[
" uname -a ; cat " "/etc/os-release ; " "/go/src/github.com/golang/example/hello/hello ",
" uname -a ; cat /etc/os-release ; /go/src/github.com/golang/example/hello/hello ",
],
volume_mounts=[
m.VolumeMount(name="workdir", mount_path="/go"),
Expand Down
2 changes: 1 addition & 1 deletion docs/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _main():
if os.path.isdir(os.path.join(f"../{examples_workflows}", name)) and name != "__pycache__"
]:
# Use hyphens for website URL paths
docs_example_sub_folder = f'examples/{example_sub_folder.replace("_", "-")}'
docs_example_sub_folder = f"examples/{example_sub_folder.replace('_', '-')}"
shutil.rmtree(docs_example_sub_folder, ignore_errors=True)
Path(docs_example_sub_folder).mkdir(parents=True, exist_ok=True)
for path in Path(f"../examples/{example_sub_folder}").glob("*.py"):
Expand Down
2 changes: 1 addition & 1 deletion examples/workflows/upstream/ci_output_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
image="{{inputs.parameters.os-image}}",
command=["sh", "-c"],
args=[
" uname -a ; cat " "/etc/os-release ; " "/go/src/github.com/golang/example/hello/hello ",
" uname -a ; cat /etc/os-release ; /go/src/github.com/golang/example/hello/hello ",
],
volume_mounts=[
m.VolumeMount(name="workdir", mount_path="/go"),
Expand Down
400 changes: 166 additions & 234 deletions src/hera/events/models/io/argoproj/events/v1alpha1.py

Large diffs are not rendered by default.

317 changes: 142 additions & 175 deletions src/hera/events/models/io/argoproj/workflow/v1alpha1.py

Large diffs are not rendered by default.

132 changes: 56 additions & 76 deletions src/hera/events/models/io/k8s/api/core/v1.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ListMeta(BaseModel):
Field(
alias="selfLink",
description=(
"Deprecated: selfLink is a legacy read-only field that is no longer" " populated by the system."
"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system."
),
),
] = None
Expand Down Expand Up @@ -253,7 +253,7 @@ class ManagedFieldsEntry(BaseModel):
Optional[FieldsV1],
Field(
alias="fieldsV1",
description=("FieldsV1 holds the first JSON version format as described in the" ' "FieldsV1" type.'),
description=('FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.'),
),
] = None
manager: Annotated[
Expand Down Expand Up @@ -303,7 +303,7 @@ class LabelSelector(BaseModel):
Optional[List[LabelSelectorRequirement]],
Field(
alias="matchExpressions",
description=("matchExpressions is a list of label selector requirements. The" " requirements are ANDed."),
description=("matchExpressions is a list of label selector requirements. The requirements are ANDed."),
),
] = None
match_labels: Annotated[
Expand Down Expand Up @@ -524,7 +524,7 @@ class ObjectMeta(BaseModel):
Field(
alias="selfLink",
description=(
"Deprecated: selfLink is a legacy read-only field that is no longer" " populated by the system."
"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system."
),
),
] = None
Expand Down
4 changes: 2 additions & 2 deletions src/hera/expr/_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ def _constant_repr(obj):
if isinstance(obj, range):
return f"{obj.start}..{obj.stop - 1}"
if isinstance(obj, list):
return f'[{", ".join(map(_constant_repr, obj))}]'
return f"[{', '.join(map(_constant_repr, obj))}]"
if isinstance(obj, dict):
key_value_pairs = [f"{_constant_repr(key)}: {_constant_repr(value)}" for key, value in obj.items()]
return f'{{{", ".join(key_value_pairs)}}}'
return f"{{{', '.join(key_value_pairs)}}}"
return repr(obj)


Expand Down
6 changes: 3 additions & 3 deletions src/hera/workflows/container_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def __rshift__(
return self.next(other)
elif isinstance(other, list):
for o in other:
assert isinstance(
o, ContainerNode
), f"Unknown list item type {type(o)} specified using right bitshift operator `>>`"
assert isinstance(o, ContainerNode), (
f"Unknown list item type {type(o)} specified using right bitshift operator `>>`"
)
self.next(o)
return other
raise ValueError(f"Unknown type {type(other)} provided to `__rshift__`")
Expand Down
Loading

0 comments on commit 1637ae9

Please sign in to comment.