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/05/27 14:45:10 UTC

[GitHub] [beam] ibzib opened a new pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

ibzib opened a new pull request #11828:
URL: https://github.com/apache/beam/pull/11828


   R: @tvalentyn 
   cc: @TheNeuralBit 
   
   ------------------------
   
   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.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] 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/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/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_ValidatesRunner_Flink_Java11/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_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_PVR_Spark_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/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_PostCommit_Py_VR_Dataflow_V2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow_V2/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_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/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_XVR_Spark/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] ibzib commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."

Review comment:
       Done

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}

Review comment:
       Done

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"

Review comment:
       Done

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine
+echo "Will upload the following files to PyPI:"
+ls
+echo "Are the files listed correct? [y|N]"
+read confirmation
+if [[ $confirmation != "y" ]]; then
+  echo "Exit without deploying artifacts to PyPI."

Review comment:
       Done

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine

Review comment:
       Done




----------------------------------------------------------------
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] tvalentyn commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -41,9 +41,12 @@ fi
 mkdir ${LOCAL_CLONE_DIR}
 cd ${LOCAL_CLONE_DIR}
 
+virtualenv deploy_pypi_env
+source ./deploy_pypi_env/bin/activate
+pip install twine

Review comment:
       Consider making this in a /tmp directory or the directory that you create and later clean up (assuming it won't interfere with pypi uploads).
   




----------------------------------------------------------------
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] ibzib merged pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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


   


----------------------------------------------------------------
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] tvalentyn commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -41,9 +41,12 @@ fi
 mkdir ${LOCAL_CLONE_DIR}
 cd ${LOCAL_CLONE_DIR}
 
+virtualenv deploy_pypi_env
+source ./deploy_pypi_env/bin/activate
+pip install twine

Review comment:
       Consider  creating virtualenv in a /tmp/... directory or in the directory that you create and later clean up (assuming it won't interfere with pypi uploads).
   




----------------------------------------------------------------
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] tvalentyn commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"

Review comment:
       How about also print the path that will be cleaned up?

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}

Review comment:
       Let's add a message here that the folder was found, and so it's being deleted.

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."

Review comment:
       Nit: Cleaned up local repo.

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine

Review comment:
       Can we do this in a virtual environment? On my machine this would fail with:
   ```
   Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/requests_toolbelt'
   Consider using the `--user` option or check the permissions.
   ```
   

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine
+echo "Will upload the following files to PyPI:"
+ls
+echo "Are the files listed correct? [y|N]"
+read confirmation
+if [[ $confirmation != "y" ]]; then
+  echo "Exit without deploying artifacts to PyPI."
+  clean_up
+  exit
+fi
+twine upload *

Review comment:
       Assuming this a verbose command. If not please add some messages to guide the user what is happening.

##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine
+echo "Will upload the following files to PyPI:"
+ls
+echo "Are the files listed correct? [y|N]"
+read confirmation
+if [[ $confirmation != "y" ]]; then
+  echo "Exit without deploying artifacts to PyPI."

Review comment:
       nit: s/Exit/Exiting




----------------------------------------------------------------
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] ibzib commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"

Review comment:
       A lot of these comments apply to build_release_candidate.sh as well (where I took the clone dir management from) so I'll change that too.




----------------------------------------------------------------
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] ibzib commented on a change in pull request #11828: [BEAM-10106] Script the deployment of artifacts to pypi

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



##########
File path: release/src/main/scripts/deploy_pypi.sh
##########
@@ -0,0 +1,57 @@
+#!/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 script uploads Python artifacts staged at dist.apache.org to PyPI.
+
+set -e
+
+function clean_up(){
+  echo "Do you want to clean local clone repo? [y|N]"
+  read confirmation
+  if [[ $confirmation = "y" ]]; then
+    cd ~
+    rm -rf ${LOCAL_CLONE_DIR}
+    echo "Clean up local repo."
+  fi
+}
+
+echo "Enter the release version, e.g. 2.21.0:"
+read RELEASE
+LOCAL_CLONE_DIR="beam_release_${RELEASE}"
+cd ~
+if [[ -d ${LOCAL_CLONE_DIR} ]]; then
+  rm -rf ${LOCAL_CLONE_DIR}
+fi
+mkdir ${LOCAL_CLONE_DIR}
+cd ${LOCAL_CLONE_DIR}
+
+wget -r --no-parent -A zip,whl "https://dist.apache.org/repos/dist/dev/beam/${RELEASE}/python"
+cd "dist.apache.org/repos/dist/dev/beam/${RELEASE}/python/"
+pip install twine
+echo "Will upload the following files to PyPI:"
+ls
+echo "Are the files listed correct? [y|N]"
+read confirmation
+if [[ $confirmation != "y" ]]; then
+  echo "Exit without deploying artifacts to PyPI."
+  clean_up
+  exit
+fi
+twine upload *

Review comment:
       It is. Example output:
   
   ```
   Uploading distributions to https://upload.pypi.org/legacy/
   Uploading apache_beam-2.21.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.62M/4.62M [00:02<00:00, 1.66MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.01M/3.01M [00:02<00:00, 1.38MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.29M/3.29M [00:02<00:00, 1.36MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27mu-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.01M/3.01M [00:02<00:00, 1.35MB/s]
   Uploading apache_beam-2.21.0-cp27-cp27mu-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.29M/3.29M [00:02<00:00, 1.55MB/s]
   Uploading apache_beam-2.21.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.64M/4.64M [00:02<00:00, 1.97MB/s]
   Uploading apache_beam-2.21.0-cp35-cp35m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.04M/3.04M [00:02<00:00, 1.15MB/s]
   Uploading apache_beam-2.21.0-cp35-cp35m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.31M/3.31M [00:02<00:00, 1.40MB/s]
   Uploading apache_beam-2.21.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.86M/4.86M [00:02<00:00, 2.11MB/s]
   Uploading apache_beam-2.21.0-cp36-cp36m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.09M/3.09M [00:02<00:00, 1.31MB/s]
   Uploading apache_beam-2.21.0-cp36-cp36m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.36M/3.36M [00:02<00:00, 1.54MB/s]
   Uploading apache_beam-2.21.0-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.76M/4.76M [00:02<00:00, 1.82MB/s]
   Uploading apache_beam-2.21.0-cp37-cp37m-manylinux1_i686.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.09M/3.09M [00:02<00:00, 1.44MB/s]
   Uploading apache_beam-2.21.0-cp37-cp37m-manylinux1_x86_64.whl
   100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3.36M/3.36M [00:02<00:00, 1.61MB/s]
   Uploading apache-beam-2.21.0.zip
   100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.95M/1.95M [00:02<00:00, 870kB/s]
   
   View at:
   https://pypi.org/project/apache-beam/2.21.0/
   ```




----------------------------------------------------------------
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