[
https://issues.apache.org/jira/browse/BEAM-7389?focusedWorklogId=303752&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-303752
]
ASF GitHub Bot logged work on BEAM-7389:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Aug/19 15:04
Start Date: 29/Aug/19 15:04
Worklog Time Spent: 10m
Work Description: aaltay commented on pull request #9433: [BEAM-7389]
Update to use util.ToString transform
URL: https://github.com/apache/beam/pull/9433#discussion_r319121548
##########
File path:
sdks/python/apache_beam/examples/snippets/transforms/element_wise/to_string_test.py
##########
@@ -19,36 +19,81 @@
from __future__ import absolute_import
from __future__ import print_function
+import sys
import unittest
import mock
-from apache_beam.examples.snippets.transforms.element_wise.to_string import *
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to
+from . import to_string
+
+
+def check_plants(actual):
+ # [START plants]
+ plants = [
+ '🍓,Strawberry',
+ '🥕,Carrot',
+ '🍆,Eggplant',
+ '🍅,Tomato',
+ '🥔,Potato',
+ ]
+ # [END plants]
+ assert_that(actual, equal_to(plants))
+
+
+def check_plant_lists(actual):
+ # [START plant_lists]
+ plant_lists = [
+ "['🍓', 'Strawberry', 'perennial']",
+ "['🥕', 'Carrot', 'biennial']",
+ "['🍆', 'Eggplant', 'perennial']",
+ "['🍅', 'Tomato', 'annual']",
+ "['🥔', 'Potato', 'perennial']",
+ ]
+ # [END plant_lists]
+
+ # Some unicode characters become escaped with double backslashes.
+ import apache_beam as beam
+
+ def normalize_escaping(elem):
Review comment:
Could you add a JIRA todo here so that we can remove it after python 2
deprecation?
----------------------------------------------------------------
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: 303752)
Time Spent: 53h (was: 52h 50m)
> Colab examples for element-wise transforms (Python)
> ---------------------------------------------------
>
> Key: BEAM-7389
> URL: https://issues.apache.org/jira/browse/BEAM-7389
> Project: Beam
> Issue Type: Improvement
> Components: website
> Reporter: Rose Nguyen
> Assignee: David Cavazos
> Priority: Minor
> Time Spent: 53h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)