-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update script to handle Optional and Union input parameters #1160
Conversation
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1160 +/- ##
=======================================
- Coverage 81.7% 81.4% -0.3%
=======================================
Files 54 60 +6
Lines 4208 4732 +524
Branches 889 1004 +115
=======================================
+ Hits 3439 3856 +417
- Misses 574 646 +72
- Partials 195 230 +35 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com>
Co-authored-by: Elliot Gunton <elliotgunton@gmail.com> Signed-off-by: Ukjae Jeong <JeongUkJae@gmail.com>
Signed-off-by: Ukjae Jeong <JeongUkJae@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, a minor change back of function name
Co-authored-by: Elliot Gunton <elliotgunton@gmail.com> Signed-off-by: Ukjae Jeong <JeongUkJae@gmail.com>
**Pull Request Checklist** - [x] ~~Fixes #<!--issue number goes here-->~~ this PR follows up on #1160 - [x] Tests added - [x] Documentation/examples added : this is refactoring. no need - [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** Currently, we are checking annotated, parameter/artifact, or other types in different ways. In this PR, I added `hera._utils.type_util` module and unified them into one place. Followings can be expected: - If there's another metadata along with Parameter or Artifact, they should be ignored. (e.g. `Annotated[type, metadata1, metadata2, Parameter(...)]`, this can be happened when `Annotated`s are nested) - `Optional` parameter handling should be more precise which is added in #1160. Suggestions on function names/module names are welcome. --------- Signed-off-by: Ukjae Jeong <jeongukjae@gmail.com> Signed-off-by: Ukjae Jeong <JeongUkJae@gmail.com> Co-authored-by: Elliot Gunton <elliotgunton@gmail.com> Co-authored-by: Sambhav Kothari <skothari44@bloomberg.net> Co-authored-by: Alice <Alice.Purcell.39@gmail.com>
Pull Request Checklist
Description of PR
Currently,
script
decorator cannot handleUnion
orOptional
input parameters because of the error inissubclass
, so updated it to be able to handle it as expected.original PR: #1147