Skip to content
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

refactor(core): Update with_overrides signatures and type hints #2323

Merged
merged 5 commits into from
Aug 26, 2024

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Apr 3, 2024

Tracking issue

NA

Why are the changes needed?

Cannot know the args that with_override take

What changes were proposed in this pull request?

Update with_overrides signatures and type hints

How was this patch tested?

local

Setup process

NA

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

Signed-off-by: Kevin Su <pingsutw@gmail.com>
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 3, 2024
@pingsutw
Copy link
Member Author

pingsutw commented Apr 3, 2024

cc @fg91 since you're also using with_overrides

wild-endeavor
wild-endeavor previously approved these changes Apr 3, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Apr 3, 2024
@fg91
Copy link
Member

fg91 commented Apr 3, 2024

@fellhorn fyi

Signed-off-by: Kevin Su <pingsutw@gmail.com>
Signed-off-by: Kevin Su <pingsutw@gmail.com>
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 91.48936% with 4 lines in your changes missing coverage. Please review.

Project coverage is 71.62%. Comparing base (83b90fa) to head (c3af69c).
Report is 2 commits behind head on master.

Files Patch % Lines
flytekit/core/node.py 90.24% 1 Missing and 3 partials ⚠️

❗ There is a different number of reports uploaded between BASE (83b90fa) and HEAD (c3af69c). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (83b90fa) HEAD (c3af69c)
5 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2323      +/-   ##
==========================================
- Coverage   78.69%   71.62%   -7.08%     
==========================================
  Files         187      187              
  Lines       19257    19211      -46     
  Branches     4029     2784    -1245     
==========================================
- Hits        15155    13759    -1396     
- Misses       3404     4774    +1370     
+ Partials      698      678      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Kevin Su <pingsutw@gmail.com>
@fellhorn
Copy link
Contributor

fellhorn commented Apr 4, 2024

@fellhorn fyi

Thanks, we need to ignore the Promise types though and thus anyway can't have type hints for the with_overrides :/
See flyteorg/flyte#3682

It's either having type hints for the Promise types for us or having type checks for task & workflow inputs & outputs.

@pingsutw
Copy link
Member Author

Thanks, we need to ignore the Promise types though and thus anyway can't have type hints for the with_overrides :/

@fellhorn could we merge this first and then figure out the type issue later? this will allow us to see the type hint in the IDE for with_override. Also, it cleans up the code. (remove if "container_image" in kwargs ...)

@pingsutw pingsutw enabled auto-merge (squash) August 26, 2024 18:15
@pingsutw pingsutw merged commit 15ed1a4 into master Aug 26, 2024
99 of 101 checks passed
@fellhorn
Copy link
Contributor

Thanks, we need to ignore the Promise types though and thus anyway can't have type hints for the with_overrides :/

@fellhorn could we merge this first and then figure out the type issue later? this will allow us to see the type hint in the IDE for with_override. Also, it cleans up the code. (remove if "container_image" in kwargs ...)

Sorry, I overlooked your message.
Yes, please merge this PR. My answer to fg91 was rather about our internal flytekit wrapper, that helps us to check the runtime types instead of the graph types. I imagine my comment is not relevant for other flytekit users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants