-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(sdk): enable component compilation via component decorator #7554
feat(sdk): enable component compilation via component decorator #7554
Conversation
Skipping CI for Draft Pull Request. |
/test all |
raise Exception("output_component_file is not supported yet in v2 early" | ||
"releases and will be added back for v2.0.0 ") | ||
warnings.warn( | ||
"output_component_file parameter is deprecated is deprecated and will eventually be removed. Please use Compiler().compile instead.", |
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.
Just noticed you have "is deprecated" written twice - here and in your test :)
/hold Merge after #7580. |
82df1aa
to
f52a3b3
Compare
/test all |
d89c7ca
to
e77c63d
Compare
/retest |
e77c63d
to
1be8ea8
Compare
1be8ea8
to
b859706
Compare
/unhold |
Thanks, @chensun. I think we should. I added one. Can you re-LGTM if all looks good to you? |
/retest |
7 similar comments
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
2 similar comments
/retest |
/retest |
DeprecationWarning, | ||
r'output_component_file parameter is deprecated and will eventually be removed\.' | ||
): | ||
comp = component(func, output_component_file=filepath) |
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.
Should we use the decorator syntax instead? since that's what users typically use.
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.
Yes, we probably ought to. I took this approach to avoid having to redefine the decorated function in each test case, but the boilerplate is probably worth it.
@chensun, PTAL |
/retest |
4 similar comments
/retest |
/retest |
/retest |
/retest |
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chensun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
Description of your changes:
Preserves old component compilation path via
@dsl.component
decorator for backward compatibility, but raisesDeprecationWarning
.Checklist:
in this repository.