You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/27 21:24:55 UTC

[GitHub] [beam] udim opened a new pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

udim opened a new pull request #9907:
URL: https://github.com/apache/beam/pull/9907


   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
    - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   Post-Commit Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/)
   Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_Post
 Commit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PV
 R_Spark_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)
   Python | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/) | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_Post
 Commit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/)
   XLang | --- | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/) | --- | --- | ---
   
   Pre-Commit Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   
   --- |Java | Python | Go | Website
   --- | --- | --- | --- | ---
   Non-portable | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/) 
   Portable | --- | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/) | --- | ---
   
   See [.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md) for trigger phrase, status and link of all Jenkins jobs.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **increase** coverage by `0.01%`.
   > The diff coverage is `93.67%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9907      +/-   ##
   ==========================================
   + Coverage   82.32%   82.34%   +0.01%     
   ==========================================
     Files         452      453       +1     
     Lines       54016    54096      +80     
   ==========================================
   + Hits        44471    44547      +76     
   - Misses       9545     9549       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...dks/python/apache\_beam/options/pipeline\_options.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vb3B0aW9ucy9waXBlbGluZV9vcHRpb25zLnB5) | `94.75% <90.90%> (-0.24%)` | :arrow_down: |
   | [...python/apache\_beam/examples/wordcount\_dataframe.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvd29yZGNvdW50X2RhdGFmcmFtZS5weQ==) | `91.66% <91.66%> (ø)` | |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `90.62% <95.23%> (+0.32%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `92.00% <100.00%> (+0.96%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `95.44% <100.00%> (ø)` | |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `83.37% <100.00%> (+0.08%)` | :arrow_up: |
   | [...hon/apache\_beam/runners/direct/test\_stream\_impl.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvdGVzdF9zdHJlYW1faW1wbC5weQ==) | `93.38% <0.00%> (-0.74%)` | :arrow_down: |
   | [sdks/python/apache\_beam/runners/common.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9jb21tb24ucHk=) | `88.75% <0.00%> (-0.45%)` | :arrow_down: |
   | [sdks/python/apache\_beam/io/iobase.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vaW9iYXNlLnB5) | `84.33% <0.00%> (+0.28%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [096f695...ffac97f](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`master@199570e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #9907   +/-   ##
   =========================================
     Coverage          ?   40.29%           
   =========================================
     Files             ?      451           
     Lines             ?    53197           
     Branches          ?        0           
   =========================================
     Hits              ?    21434           
     Misses            ?    31763           
     Partials          ?        0           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [199570e...4c3b3ec](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim merged pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim merged pull request #9907:
URL: https://github.com/apache/beam/pull/9907


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **decrease** coverage by `42.03%`.
   > The diff coverage is `24.13%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #9907       +/-   ##
   ===========================================
   - Coverage   82.32%   40.29%   -42.04%     
   ===========================================
     Files         452      451        -1     
     Lines       54016    53197      -819     
   ===========================================
   - Hits        44471    21434    -23037     
   - Misses       9545    31763    +22218     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `39.08% <0.00%> (-56.36%)` | :arrow_down: |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `16.87% <9.52%> (-73.43%)` | :arrow_down: |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `39.45% <50.00%> (-43.84%)` | :arrow_down: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `38.27% <80.00%> (-52.78%)` | :arrow_down: |
   | [...python/apache\_beam/examples/complete/distribopt.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvY29tcGxldGUvZGlzdHJpYm9wdC5weQ==) | `0.00% <0.00%> (-98.59%)` | :arrow_down: |
   | [...dks/python/apache\_beam/transforms/create\_source.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9jcmVhdGVfc291cmNlLnB5) | `0.00% <0.00%> (-98.19%)` | :arrow_down: |
   | [...on/apache\_beam/runners/direct/helper\_transforms.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvaGVscGVyX3RyYW5zZm9ybXMucHk=) | `0.00% <0.00%> (-98.15%)` | :arrow_down: |
   | [...e\_beam/runners/interactive/testing/mock\_ipython.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS90ZXN0aW5nL21vY2tfaXB5dGhvbi5weQ==) | `7.14% <0.00%> (-92.86%)` | :arrow_down: |
   | [.../examples/snippets/transforms/elementwise/pardo.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvc25pcHBldHMvdHJhbnNmb3Jtcy9lbGVtZW50d2lzZS9wYXJkby5weQ==) | `11.36% <0.00%> (-88.64%)` | :arrow_down: |
   | [sdks/python/apache\_beam/typehints/opcodes.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL29wY29kZXMucHk=) | `0.00% <0.00%> (-87.92%)` | :arrow_down: |
   | ... and [291 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [096f695...e462af6](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-696465531


   PTAL, changes are in the last commit.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`master@199570e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #9907   +/-   ##
   =========================================
     Coverage          ?   40.29%           
   =========================================
     Files             ?      451           
     Lines             ?    53197           
     Branches          ?        0           
   =========================================
     Hits              ?    21434           
     Misses            ?    31763           
     Partials          ?        0           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [199570e...4c3b3ec](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] stale[bot] closed pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
stale[bot] closed pull request #9907:
URL: https://github.com/apache/beam/pull/9907


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r492965241



##########
File path: sdks/python/apache_beam/options/pipeline_options.py
##########
@@ -476,6 +499,26 @@ def _add_argparse_args(cls, parser):
         'time. NOTE: only supported with portable runners '
         '(including the DirectRunner)')
 
+  def validate(self, unused_validator):
+    errors = []
+    if beam.version.__version__ >= '3':

Review comment:
       This error is like a long-term TODO so that we don't forget to update defaults in v3.
   It could mean that we enable everything and retire this flag. It depends on how stable type hints are.

##########
File path: CHANGES.md
##########
@@ -73,6 +73,10 @@
 * In Interactive Beam, ib.show() and ib.collect() now have "n" and "duration" as parameters. These mean read only up to "n" elements and up to "duration" seconds of data read from the recording ([BEAM-10603](https://issues.apache.org/jira/browse/BEAM-10603)).
 * Initial preview of [Dataframes](https://s.apache.org/simpler-python-pipelines-2020#slide=id.g905ac9257b_1_21) support.
     See also example at apache_beam/examples/wordcount_dataframe.py
+* Fixed support for type hints on `@ptransform_fn` decorators in the Python SDK.

Review comment:
       I can add that




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] aaltay commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
aaltay commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r492447574



##########
File path: sdks/python/apache_beam/options/pipeline_options.py
##########
@@ -476,6 +499,26 @@ def _add_argparse_args(cls, parser):
         'time. NOTE: only supported with portable runners '
         '(including the DirectRunner)')
 
+  def validate(self, unused_validator):
+    errors = []
+    if beam.version.__version__ >= '3':

Review comment:
       I think when/if we reach to Beam version 3, we can remove this warning, and all and etc and and enable by default without an option to disable. So maybe we do not need this?

##########
File path: CHANGES.md
##########
@@ -73,6 +73,10 @@
 * In Interactive Beam, ib.show() and ib.collect() now have "n" and "duration" as parameters. These mean read only up to "n" elements and up to "duration" seconds of data read from the recording ([BEAM-10603](https://issues.apache.org/jira/browse/BEAM-10603)).
 * Initial preview of [Dataframes](https://s.apache.org/simpler-python-pipelines-2020#slide=id.g905ac9257b_1_21) support.
     See also example at apache_beam/examples/wordcount_dataframe.py
+* Fixed support for type hints on `@ptransform_fn` decorators in the Python SDK.

Review comment:
       Maybe warn that the default might change in a 2.x version later?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **increase** coverage by `0.01%`.
   > The diff coverage is `93.67%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9907      +/-   ##
   ==========================================
   + Coverage   82.32%   82.34%   +0.01%     
   ==========================================
     Files         452      453       +1     
     Lines       54016    54096      +80     
   ==========================================
   + Hits        44471    44547      +76     
   - Misses       9545     9549       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...dks/python/apache\_beam/options/pipeline\_options.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vb3B0aW9ucy9waXBlbGluZV9vcHRpb25zLnB5) | `94.75% <90.90%> (-0.24%)` | :arrow_down: |
   | [...python/apache\_beam/examples/wordcount\_dataframe.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvd29yZGNvdW50X2RhdGFmcmFtZS5weQ==) | `91.66% <91.66%> (ø)` | |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `90.62% <95.23%> (+0.32%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `92.00% <100.00%> (+0.96%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `95.44% <100.00%> (ø)` | |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `83.37% <100.00%> (+0.08%)` | :arrow_up: |
   | [...hon/apache\_beam/runners/direct/test\_stream\_impl.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvdGVzdF9zdHJlYW1faW1wbC5weQ==) | `93.38% <0.00%> (-0.74%)` | :arrow_down: |
   | [sdks/python/apache\_beam/runners/common.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9jb21tb24ucHk=) | `88.75% <0.00%> (-0.45%)` | :arrow_down: |
   | [sdks/python/apache\_beam/io/iobase.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vaW9iYXNlLnB5) | `84.33% <0.00%> (+0.28%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [096f695...e462af6](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] stale[bot] commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-660694920


   This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on issue #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on issue #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-616858614


   Run Python PreCommit


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r492965241



##########
File path: sdks/python/apache_beam/options/pipeline_options.py
##########
@@ -476,6 +499,26 @@ def _add_argparse_args(cls, parser):
         'time. NOTE: only supported with portable runners '
         '(including the DirectRunner)')
 
+  def validate(self, unused_validator):
+    errors = []
+    if beam.version.__version__ >= '3':

Review comment:
       This error is like a long-term TODO so that we don't forget to update defaults in v3.
   It could mean that we enable everything and retire this flag. It depends on how stable type hints are.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **decrease** coverage by `42.03%`.
   > The diff coverage is `24.13%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #9907       +/-   ##
   ===========================================
   - Coverage   82.32%   40.29%   -42.04%     
   ===========================================
     Files         452      451        -1     
     Lines       54016    53197      -819     
   ===========================================
   - Hits        44471    21434    -23037     
   - Misses       9545    31763    +22218     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `39.08% <0.00%> (-56.36%)` | :arrow_down: |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `16.87% <9.52%> (-73.43%)` | :arrow_down: |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `39.45% <50.00%> (-43.84%)` | :arrow_down: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `38.27% <80.00%> (-52.78%)` | :arrow_down: |
   | [...python/apache\_beam/examples/complete/distribopt.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvY29tcGxldGUvZGlzdHJpYm9wdC5weQ==) | `0.00% <0.00%> (-98.59%)` | :arrow_down: |
   | [...dks/python/apache\_beam/transforms/create\_source.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9jcmVhdGVfc291cmNlLnB5) | `0.00% <0.00%> (-98.19%)` | :arrow_down: |
   | [...on/apache\_beam/runners/direct/helper\_transforms.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvaGVscGVyX3RyYW5zZm9ybXMucHk=) | `0.00% <0.00%> (-98.15%)` | :arrow_down: |
   | [...e\_beam/runners/interactive/testing/mock\_ipython.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS90ZXN0aW5nL21vY2tfaXB5dGhvbi5weQ==) | `7.14% <0.00%> (-92.86%)` | :arrow_down: |
   | [.../examples/snippets/transforms/elementwise/pardo.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvc25pcHBldHMvdHJhbnNmb3Jtcy9lbGVtZW50d2lzZS9wYXJkby5weQ==) | `11.36% <0.00%> (-88.64%)` | :arrow_down: |
   | [sdks/python/apache\_beam/typehints/opcodes.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL29wY29kZXMucHk=) | `0.00% <0.00%> (-87.92%)` | :arrow_down: |
   | ... and [291 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [1b26660...138efc5](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-696465531


   PTAL, changes are in the last commit.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`master@199570e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #9907   +/-   ##
   =========================================
     Coverage          ?   40.29%           
   =========================================
     Files             ?      451           
     Lines             ?    53197           
     Branches          ?        0           
   =========================================
     Hits              ?    21434           
     Misses            ?    31763           
     Partials          ?        0           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [199570e...4c3b3ec](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > :exclamation: No coverage uploaded for pull request base (`master@199570e`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #9907   +/-   ##
   =========================================
     Coverage          ?   40.29%           
   =========================================
     Files             ?      451           
     Lines             ?    53197           
     Branches          ?        0           
   =========================================
     Hits              ?    21434           
     Misses            ?    31763           
     Partials          ?        0           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [199570e...4c3b3ec](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **increase** coverage by `0.06%`.
   > The diff coverage is `93.67%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9907      +/-   ##
   ==========================================
   + Coverage   82.32%   82.39%   +0.06%     
   ==========================================
     Files         452      454       +2     
     Lines       54016    54245     +229     
   ==========================================
   + Hits        44471    44693     +222     
   - Misses       9545     9552       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...dks/python/apache\_beam/options/pipeline\_options.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vb3B0aW9ucy9waXBlbGluZV9vcHRpb25zLnB5) | `94.75% <90.90%> (-0.24%)` | :arrow_down: |
   | [...python/apache\_beam/examples/wordcount\_dataframe.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvd29yZGNvdW50X2RhdGFmcmFtZS5weQ==) | `91.66% <91.66%> (ø)` | |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `90.62% <95.23%> (+0.32%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `92.00% <100.00%> (+0.96%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `95.44% <100.00%> (ø)` | |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `83.37% <100.00%> (+0.08%)` | :arrow_up: |
   | [...am/runners/interactive/options/capture\_limiters.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9vcHRpb25zL2NhcHR1cmVfbGltaXRlcnMucHk=) | `90.47% <0.00%> (-3.08%)` | :arrow_down: |
   | [...dks/python/apache\_beam/runners/pipeline\_context.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9waXBlbGluZV9jb250ZXh0LnB5) | `92.80% <0.00%> (-1.01%)` | :arrow_down: |
   | [...s/python/apache\_beam/io/gcp/bigquery\_file\_loads.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vZ2NwL2JpZ3F1ZXJ5X2ZpbGVfbG9hZHMucHk=) | `89.97% <0.00%> (-0.63%)` | :arrow_down: |
   | [sdks/python/apache\_beam/runners/common.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9jb21tb24ucHk=) | `88.75% <0.00%> (-0.45%)` | :arrow_down: |
   | ... and [20 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [096f695...ffac97f](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] stale[bot] commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-664032025


   This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim merged pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim merged pull request #9907:
URL: https://github.com/apache/beam/pull/9907


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r411752742



##########
File path: sdks/python/apache_beam/typehints/typed_pipeline_test.py
##########
@@ -211,6 +211,31 @@ def process(self, element):
     assert_that(res_odd, equal_to([1, 3]), label='odd_check')
     p.run()
 
+  def test_typed_ptransform_fn_pre_hints(self):
+    # Test that type hints are propagated to the created PTransform.
+    # Decorator appears before type hints. This is the more common style.
+    @beam.ptransform_fn
+    @typehints.with_input_types(int)

Review comment:
       Yeah, typehints is always beam.typehints. Python's native module is called typing.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r492965337



##########
File path: CHANGES.md
##########
@@ -73,6 +73,10 @@
 * In Interactive Beam, ib.show() and ib.collect() now have "n" and "duration" as parameters. These mean read only up to "n" elements and up to "duration" seconds of data read from the recording ([BEAM-10603](https://issues.apache.org/jira/browse/BEAM-10603)).
 * Initial preview of [Dataframes](https://s.apache.org/simpler-python-pipelines-2020#slide=id.g905ac9257b_1_21) support.
     See also example at apache_beam/examples/wordcount_dataframe.py
+* Fixed support for type hints on `@ptransform_fn` decorators in the Python SDK.

Review comment:
       I can add that




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] aaltay commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
aaltay commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r492447574



##########
File path: sdks/python/apache_beam/options/pipeline_options.py
##########
@@ -476,6 +499,26 @@ def _add_argparse_args(cls, parser):
         'time. NOTE: only supported with portable runners '
         '(including the DirectRunner)')
 
+  def validate(self, unused_validator):
+    errors = []
+    if beam.version.__version__ >= '3':

Review comment:
       I think when/if we reach to Beam version 3, we can remove this warning, and all and etc and and enable by default without an option to disable. So maybe we do not need this?

##########
File path: CHANGES.md
##########
@@ -73,6 +73,10 @@
 * In Interactive Beam, ib.show() and ib.collect() now have "n" and "duration" as parameters. These mean read only up to "n" elements and up to "duration" seconds of data read from the recording ([BEAM-10603](https://issues.apache.org/jira/browse/BEAM-10603)).
 * Initial preview of [Dataframes](https://s.apache.org/simpler-python-pipelines-2020#slide=id.g905ac9257b_1_21) support.
     See also example at apache_beam/examples/wordcount_dataframe.py
+* Fixed support for type hints on `@ptransform_fn` decorators in the Python SDK.

Review comment:
       Maybe warn that the default might change in a 2.x version later?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **increase** coverage by `0.01%`.
   > The diff coverage is `93.67%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9907      +/-   ##
   ==========================================
   + Coverage   82.32%   82.34%   +0.01%     
   ==========================================
     Files         452      453       +1     
     Lines       54016    54096      +80     
   ==========================================
   + Hits        44471    44547      +76     
   - Misses       9545     9549       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...dks/python/apache\_beam/options/pipeline\_options.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vb3B0aW9ucy9waXBlbGluZV9vcHRpb25zLnB5) | `94.75% <90.90%> (-0.24%)` | :arrow_down: |
   | [...python/apache\_beam/examples/wordcount\_dataframe.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvd29yZGNvdW50X2RhdGFmcmFtZS5weQ==) | `91.66% <91.66%> (ø)` | |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `90.62% <95.23%> (+0.32%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `92.00% <100.00%> (+0.96%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `95.44% <100.00%> (ø)` | |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `83.37% <100.00%> (+0.08%)` | :arrow_up: |
   | [...hon/apache\_beam/runners/direct/test\_stream\_impl.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvdGVzdF9zdHJlYW1faW1wbC5weQ==) | `93.38% <0.00%> (-0.74%)` | :arrow_down: |
   | [sdks/python/apache\_beam/runners/common.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9jb21tb24ucHk=) | `88.75% <0.00%> (-0.45%)` | :arrow_down: |
   | [sdks/python/apache\_beam/io/iobase.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vaW9iYXNlLnB5) | `84.33% <0.00%> (+0.28%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [096f695...e462af6](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] codecov[bot] edited a comment on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682206351


   # [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=h1) Report
   > Merging [#9907](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=desc) into [master](https://codecov.io/gh/apache/beam/commit/1b266601c39f243f48dfd085b565b984f936d02c?el=desc) will **increase** coverage by `0.01%`.
   > The diff coverage is `93.67%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/beam/pull/9907/graphs/tree.svg?width=650&height=150&src=pr&token=qcbbAh8Fj1)](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #9907      +/-   ##
   ==========================================
   + Coverage   82.32%   82.34%   +0.01%     
   ==========================================
     Files         452      453       +1     
     Lines       54016    54096      +80     
   ==========================================
   + Hits        44471    44547      +76     
   - Misses       9545     9549       +4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...dks/python/apache\_beam/options/pipeline\_options.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vb3B0aW9ucy9waXBlbGluZV9vcHRpb25zLnB5) | `94.75% <90.90%> (-0.24%)` | :arrow_down: |
   | [...python/apache\_beam/examples/wordcount\_dataframe.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvd29yZGNvdW50X2RhdGFmcmFtZS5weQ==) | `91.66% <91.66%> (ø)` | |
   | [...n/apache\_beam/typehints/typed\_pipeline\_test\_py3.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL3R5cGVkX3BpcGVsaW5lX3Rlc3RfcHkzLnB5) | `90.62% <95.23%> (+0.32%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5) | `92.00% <100.00%> (+0.96%)` | :arrow_up: |
   | [sdks/python/apache\_beam/transforms/util.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91dGlsLnB5) | `95.44% <100.00%> (ø)` | |
   | [sdks/python/apache\_beam/typehints/decorators.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHlwZWhpbnRzL2RlY29yYXRvcnMucHk=) | `83.37% <100.00%> (+0.08%)` | :arrow_up: |
   | [...hon/apache\_beam/runners/direct/test\_stream\_impl.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kaXJlY3QvdGVzdF9zdHJlYW1faW1wbC5weQ==) | `93.38% <0.00%> (-0.74%)` | :arrow_down: |
   | [sdks/python/apache\_beam/runners/common.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9jb21tb24ucHk=) | `88.75% <0.00%> (-0.45%)` | :arrow_down: |
   | [sdks/python/apache\_beam/io/iobase.py](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vaW9iYXNlLnB5) | `84.33% <0.00%> (+0.28%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/beam/pull/9907/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=footer). Last update [096f695...e462af6](https://codecov.io/gh/apache/beam/pull/9907?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] stale[bot] commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-682198986


   This pull request is no longer marked as stale.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] udim commented on pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
udim commented on pull request #9907:
URL: https://github.com/apache/beam/pull/9907#issuecomment-696465531


   PTAL, changes are in the last commit.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [beam] aaltay commented on a change in pull request #9907: [BEAM-4091] Pass type hints in ptransform_fn

Posted by GitBox <gi...@apache.org>.
aaltay commented on a change in pull request #9907:
URL: https://github.com/apache/beam/pull/9907#discussion_r492447574



##########
File path: sdks/python/apache_beam/options/pipeline_options.py
##########
@@ -476,6 +499,26 @@ def _add_argparse_args(cls, parser):
         'time. NOTE: only supported with portable runners '
         '(including the DirectRunner)')
 
+  def validate(self, unused_validator):
+    errors = []
+    if beam.version.__version__ >= '3':

Review comment:
       I think when/if we reach to Beam version 3, we can remove this warning, and all and etc and and enable by default without an option to disable. So maybe we do not need this?

##########
File path: CHANGES.md
##########
@@ -73,6 +73,10 @@
 * In Interactive Beam, ib.show() and ib.collect() now have "n" and "duration" as parameters. These mean read only up to "n" elements and up to "duration" seconds of data read from the recording ([BEAM-10603](https://issues.apache.org/jira/browse/BEAM-10603)).
 * Initial preview of [Dataframes](https://s.apache.org/simpler-python-pipelines-2020#slide=id.g905ac9257b_1_21) support.
     See also example at apache_beam/examples/wordcount_dataframe.py
+* Fixed support for type hints on `@ptransform_fn` decorators in the Python SDK.

Review comment:
       Maybe warn that the default might change in a 2.x version later?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org