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

Create py.typed for use with mypy #27942

Merged
merged 6 commits into from
Sep 19, 2023
Merged

Conversation

davidcavazos
Copy link
Contributor

@davidcavazos davidcavazos commented Aug 9, 2023

fixes #27906

Create type stub marker to allow mypy and other type checkers to run on user pipelines.

R: @aaltay @tvalentyn


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Create type stubs file to allow `mypy` and other type checkers to run on user's pipelines.
@github-actions github-actions bot added the python label Aug 9, 2023
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #27942 (32b3dbe) into master (a1ec055) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #27942   +/-   ##
=======================================
  Coverage   72.23%   72.24%           
=======================================
  Files         684      684           
  Lines      100946   100961   +15     
=======================================
+ Hits        72921    72937   +16     
+ Misses      26445    26444    -1     
  Partials     1580     1580           
Flag Coverage Δ
python 82.83% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 10 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm for label python.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@tvalentyn
Copy link
Contributor

Thanks, @davidcavazos . We need to include Apache licences in all files to pass RAT check.

Copy link
Contributor

@jrmccluskey jrmccluskey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion I dropped in should satisfy the RAT precommit

sdks/python/apache_beam/py.typed Show resolved Hide resolved
Co-authored-by: Jack McCluskey <34928439+jrmccluskey@users.noreply.github.com>
CHANGES.md Outdated
@@ -84,6 +84,7 @@
* Transform service controller container.
* Spark3 job server container.
* Added support for batched writes to AWS SQS for improved throughput (Java, AWS 2).([#21429](https://github.com/apache/beam/issues/21429))
* Added support to run `mypy` on user pipelines ([#27906](https://github.com/apache/beam/issues/27906))
Copy link
Contributor

@tvalentyn tvalentyn Aug 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change didn't make the release cut unfortunately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's currently under 2.50.0 Unreleased, I don't see a 2.51 so what should we do with this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you pull in the changes from the master branch there is a 2.51 section - https://github.com/apache/beam/blob/master/CHANGES.md

@github-actions
Copy link
Contributor

Reminder, please take a look at this pr: @damccorm

@davidcavazos
Copy link
Contributor Author

The only open issue is where to announce the change in CHANGES.md, but I don't know where we should place it. Can someone point me in the right direction?

@damccorm
Copy link
Contributor

If you pull in the changes from master (sync your fork then git pull origin master) you should be able to add it to the features/improvements section in the 2.51 section

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Reminder, please take a look at this pr: @damccorm

@davidcavazos
Copy link
Contributor Author

Updated CHANGES for 2.51

@tvalentyn tvalentyn merged commit 845dfc5 into apache:master Sep 19, 2023
85 of 86 checks passed
m-trieu pushed a commit to m-trieu/beam that referenced this pull request Sep 22, 2023
Co-authored-by: Jack McCluskey <34928439+jrmccluskey@users.noreply.github.com>
@davidcavazos davidcavazos deleted the add-py-typed branch September 22, 2023 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add library stubs or py.typed marker
4 participants