[ 
https://issues.apache.org/jira/browse/BEAM-11592?focusedWorklogId=564050&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-564050
 ]

ASF GitHub Bot logged work on BEAM-11592:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Mar/21 21:18
            Start Date: 10/Mar/21 21:18
    Worklog Time Spent: 10m 
      Work Description: ihji commented on a change in pull request #13729:
URL: https://github.com/apache/beam/pull/13729#discussion_r591878343



##########
File path: sdks/python/apache_beam/runners/portability/expansion_service_test.py
##########
@@ -226,6 +230,27 @@ def from_runner_api_parameter(
     return PartitionTransform()
 
 
+class ExtractHtmlTitleDoFn(beam.DoFn):
+  def process(self, element):
+    from bs4 import BeautifulSoup
+    soup = BeautifulSoup(element, 'html.parser')
+    return [soup.title.string]
+
+
[email protected]_urn(TEST_PYTHON_BS4_URN, None)
+class ExtractHtmlTitleTransform(ptransform.PTransform):
+  def expand(self, pcoll):
+    return pcoll | 
beam.ParDo(ExtractHtmlTitleDoFn()).with_output_types(unicode)
+
+  def to_runner_api_parameter(self, unused_context):

Review comment:
       It's for defining Python ptransform and not specific to x-lang 
transforms. Python SDK doesn't have builder/registrar for x-lang transforms. In 
Python SDK, x-lang transforms are just ordinary ptransforms annotated with 
x-lang compatible urns.




----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 564050)
    Time Spent: 8.5h  (was: 8h 20m)

> Adding cross-language test using third-party Python dependencies
> ----------------------------------------------------------------
>
>                 Key: BEAM-11592
>                 URL: https://issues.apache.org/jira/browse/BEAM-11592
>             Project: Beam
>          Issue Type: Sub-task
>          Components: cross-language
>            Reporter: Heejong Lee
>            Priority: P2
>          Time Spent: 8.5h
>  Remaining Estimate: 0h
>
> Adding cross-language test using third-party Python dependencies



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to