[
https://issues.apache.org/jira/browse/BEAM-13439?focusedWorklogId=721973&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-721973
]
ASF GitHub Bot logged work on BEAM-13439:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Feb/22 15:10
Start Date: 07/Feb/22 15:10
Worklog Time Spent: 10m
Work Description: codecov[bot] edited a comment on pull request #16517:
URL: https://github.com/apache/beam/pull/16517#issuecomment-1013099750
#
[Codecov](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
Report
> Merging
[#16517](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(ef38c05) into
[master](https://codecov.io/gh/apache/beam/commit/872455570ae7f3e2e35360bccf93b503ae9fdb5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(8724555) will **increase** coverage by `8.98%`.
> The diff coverage is `100.00%`.
> :exclamation: Current head ef38c05 differs from pull request most recent
head 1731db4. Consider uploading reports for the commit 1731db4 to get more
accurate results
[](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16517 +/- ##
==========================================
+ Coverage 74.62% 83.60% +8.98%
==========================================
Files 653 452 -201
Lines 81798 62065 -19733
==========================================
- Hits 61040 51891 -9149
+ Misses 19777 10174 -9603
+ Partials 981 0 -981
```
| [Impacted
Files](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
| Coverage Δ | |
|---|---|---|
|
[sdks/python/apache\_beam/transforms/ptransform.py](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9wdHJhbnNmb3JtLnB5)
| `93.54% <100.00%> (ø)` | |
|
[...python/apache\_beam/runners/worker/worker\_status.py](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvd29ya2VyX3N0YXR1cy5weQ==)
| `78.26% <0.00%> (-1.45%)` | :arrow_down: |
|
[sdks/python/apache\_beam/io/source\_test\_utils.py](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vc291cmNlX3Rlc3RfdXRpbHMucHk=)
| `88.47% <0.00%> (-1.39%)` | :arrow_down: |
|
[...pache\_beam/runners/interactive/interactive\_beam.py](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9pbnRlcmFjdGl2ZV9iZWFtLnB5)
| `75.60% <0.00%> (-0.98%)` | :arrow_down: |
|
[...runners/interactive/display/pcoll\_visualization.py](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9pbnRlcmFjdGl2ZS9kaXNwbGF5L3Bjb2xsX3Zpc3VhbGl6YXRpb24ucHk=)
| `85.85% <0.00%> (-0.51%)` | :arrow_down: |
|
[sdks/go/pkg/beam/core/runtime/genx/genx.go](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ2VueC9nZW54Lmdv)
| | |
|
[sdks/go/pkg/beam/testing/passert/count.go](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvY291bnQuZ28=)
| | |
|
[sdks/go/pkg/beam/core/funcx/output.go](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L291dHB1dC5nbw==)
| | |
|
[sdks/go/pkg/beam/core/runtime/exec/pcollection.go](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9wY29sbGVjdGlvbi5nbw==)
| | |
|
[sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=)
| | |
| ... and [197
more](https://codecov.io/gh/apache/beam/pull/16517/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
| |
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by
[Codecov](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Last update
[8724555...1731db4](https://codecov.io/gh/apache/beam/pull/16517?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Read the [comment
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 721973)
Time Spent: 1h 50m (was: 1h 40m)
> Correct type signature on ptransform_fn to better support typecheckers
> ----------------------------------------------------------------------
>
> Key: BEAM-13439
> URL: https://issues.apache.org/jira/browse/BEAM-13439
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Affects Versions: 2.34.0
> Reporter: Sandy Chapman
> Priority: P2
> Labels: transform, typecheck
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Because the return type of the ptransform_fn is not specified, [certain
> typecheckers|https://github.com/microsoft/pyright/issues/2688#issuecomment-990238720]
> will assume the type signature of functions decorated with it remain
> unchanged. However, ptransform_fn specifically adjusts the type signature
> such that the function no longer takes a pcoll.
> This can be corrected by changing the the definition of ptransform_fn from:
> {code:python}
> def ptransform_fn(fn):
> {code}
> to:
> {code:python}
> def ptransform_fn(fn) -> Callable[..., _PTransformFnPTransform]: {code}
> This allows the typechecker to understand the return type of a function
> decorated with ptransform_fn will instead be a _PTransformFnPTransform type.
> Additionally, for Python 3.10,
> [ParamSpec|https://www.python.org/dev/peps/pep-0612/#parameter-specification-variables]
> could be used to preserve the signature of the internal function as well.
> {code:python}
> from typing import ParamSpec, TypeVar, Concatenate
> P = ParamSpec("P")
> T = TypeVar("T")
> R = TypeVar("R")
> def ptransform_fn(fn: Callable[Concatenate[PCollection[T], P], R]) ->
> Callable[[P], _PTransformFnPTransform]: ...{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)