Skip to content

Commit

Permalink
chore(release): 0.4.3 (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
julesbertrand authored Mar 1, 2024
2 parents eff01cb + 16028a2 commit 4d79e44
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Deploy doc to GitHub Pages

on:
push:
branches:
- 'main'
release:
types:
- published
workflow_dispatch:

env:
python-version: "3.10"
Expand Down
15 changes: 10 additions & 5 deletions deployer/utils/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from inspect import signature
from inspect import Parameter, signature
from typing import Callable, Literal, Optional, Protocol

from pydantic import BaseModel, ConfigDict, create_model
Expand Down Expand Up @@ -44,13 +44,18 @@ def create_model_from_func(

func_signature = signature(func)

func_typing = {
p.name: (
type_converter(p.annotation),
... if (exclude_defaults or p.default == Parameter.empty) else p.default,
)
for p in func_signature.parameters.values()
}

func_model = create_model(
__model_name=model_name,
__base__=CustomBaseModel,
**{
p.name: (type_converter(p.annotation), ... if exclude_defaults else p.default)
for p in func_signature.parameters.values()
},
**func_typing,
)

return func_model
Expand Down
2 changes: 1 addition & 1 deletion deployer/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def _parse_validation_errors(
else:
config_name = error["loc"][3]
error_row = {"type": error["type"], "msg": error["msg"]}
parsed_errors[pipeline_name][config_name] = []
parsed_errors[pipeline_name].setdefault(config_name, [])
if len(error["loc"]) > 4:
error_row["field"] = error["loc"][5]
parsed_errors[pipeline_name][config_name].append(error_row)
Expand Down
1 change: 1 addition & 0 deletions docs/CLI_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ $ vertex-deployer check [OPTIONS] PIPELINE_NAMES...
* `PIPELINE_NAMES...`: The names of the pipeline to create. [optional]

**Options**:

* `--all, -a / --no-all`: Whether to check all pipelines. [default: no-all]
* `--config-filepath, -cfp PATH`: Path to the json/py file with parameter values and input artifacts to check. If not specified, all config files in the pipeline dir will be checked.
* `--warn-defaults, -wd / --no-warn-defaults, -nwd`: Whether to warn when a default value is used and not overwritten in config file. [default: warn-defaults]
Expand Down
9 changes: 9 additions & 0 deletions templates/.release_notes.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## {{ version.as_tag() }} ({{ release.tagged_date.strftime("%Y-%m-%d") }})
{% for type_, commits in release["elements"] | dictsort %}
{% if type_ == "enh" %}
### {{ "Enhancements" | capitalize }}
{% else %}
### {{ type_ | capitalize }}
{% endif %}{%- if type_ != "unknown" %}{% for commit in commits %}
* {{ commit.descriptions[0] }} by {{commit.commit.author.name}} in [`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }})
{%- endfor %}{% endif %}{% endfor %}

0 comments on commit 4d79e44

Please sign in to comment.