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

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

                Author: ASF GitHub Bot
            Created on: 26/Jul/18 02:54
            Start Date: 26/Jul/18 02:54
    Worklog Time Spent: 10m 
      Work Description: yifanzou commented on a change in pull request #4943: 
[BEAM-3906] Automate Validation Aganist Python Wheel
URL: https://github.com/apache/beam/pull/4943#discussion_r205318051
 
 

 ##########
 File path: 
release/src/main/python-release/run_release_candidate_python_mobile_gaming.sh
 ##########
 @@ -0,0 +1,187 @@
+#!/bin/bash
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+
+#  This file will verify Apache/Beam release candidate python by following 
steps:
+#
+#  1. Create a new virtualenv and install the SDK
+#  2. Run UserScore examples with DirectRunner
+#  3. Run UserScore examples with DataflowRunner
+#  4. Run HourlyTeamScore on DirectRunner
+#  5. Run HourlyTeamScore on DataflowRunner
+#
+
+set -e
+set -v
+
+source release/src/main/python-release/python_release_automation_utils.sh
+
+# Assign default values
+BEAM_PYTHON_SDK=$BEAM_PYTHON_SDK_ZIP
+
+
+#######################################
+# Remove temp directory when complete.
+# Globals:
+#   TMPDIR
+# Arguments:
+#   None
+#######################################
+function complete() {
+  print_separator "Validation $1"
+  rm -rf $TMPDIR
+}
+
+
+#######################################
+# Download files from RC staging location, install python sdk
+# Globals:
+#   BEAM_PYTHON_SDK
+# Arguments:
+#   None
+#######################################
+function install_sdk() {
+  print_separator "Creating new virtualenv and installing the SDK"
+  virtualenv temp_virtualenv
+  . temp_virtualenv/bin/activate
+  gcloud_version=$(gcloud --version | head -1 | awk '{print $4}')
+  if [[ "$gcloud_version" < "189" ]]; then
+    update_gcloud
+  fi
+  pip install google-compute-engine
+  pip install $BEAM_PYTHON_SDK[gcp]
+}
+
+
+#######################################
+# Run UserScore with DirectRunner
+# Globals:
+#   USERSCORE_OUTPUT_PREFIX, DATASET, BUCKET_NAME
+# Arguments:
+#   None
+#######################################
+function verify_userscore_direct() {
+  print_separator "Running userscore example with DirectRunner"
+  output_file_name="$USERSCORE_OUTPUT_PREFIX-direct-runner.txt"
+  python -m apache_beam.examples.complete.game.user_score \
+    --output=$output_file_name \
+    --project=$PROJECT_ID \
+    --dataset=$DATASET \
+    --input=gs://$BUCKET_NAME/5000_gaming_data.csv
+
+  verify_user_score "direct"
 
 Review comment:
   These lines call the helper functions in the 
python_release_automation_utils.sh to verify results of example pipelines (e.g 
verifying whether output files were created properly, checking if expected 
keywords show in the results, etc).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

    Worklog Id:     (was: 127630)
    Time Spent: 26h 50m  (was: 26h 40m)

> Get Python Wheel Validation Automated
> -------------------------------------
>
>                 Key: BEAM-3906
>                 URL: https://issues.apache.org/jira/browse/BEAM-3906
>             Project: Beam
>          Issue Type: Sub-task
>          Components: examples-python, testing
>            Reporter: yifan zou
>            Assignee: yifan zou
>            Priority: Major
>          Time Spent: 26h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to