You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2017/04/19 23:46:08 UTC

[1/2] beam git commit: added module option, use more common zero test, show module name in log

Repository: beam
Updated Branches:
  refs/heads/master 6224556be -> 3ef614c72


added module option, use more common zero test, show module name in log


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/28a2682b
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/28a2682b
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/28a2682b

Branch: refs/heads/master
Commit: 28a2682b4d1f63942f3c0e67458f5558c91c06a9
Parents: 6224556
Author: Uwe Jugel <uw...@lovoo.com>
Authored: Tue Apr 18 19:41:15 2017 +0200
Committer: Ahmet Altay <al...@google.com>
Committed: Wed Apr 19 16:45:57 2017 -0700

----------------------------------------------------------------------
 sdks/python/run_pylint.sh | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/28a2682b/sdks/python/run_pylint.sh
----------------------------------------------------------------------
diff --git a/sdks/python/run_pylint.sh b/sdks/python/run_pylint.sh
index 80cbe6e..f733a79 100755
--- a/sdks/python/run_pylint.sh
+++ b/sdks/python/run_pylint.sh
@@ -23,9 +23,20 @@
 #
 # The exit-code of the script indicates success or a failure.
 
-set -e
+set -o errexit
 set -o pipefail
 
+MODULE=apache_beam
+
+usage(){ echo "Usage: $0 [MODULE|--help]  # The default MODULE is $MODULE"; }
+
+if test $# -gt 0; then
+  case "$@" in
+    --help) usage; exit 1;;
+	 *)      MODULE="$@";;
+  esac
+fi
+
 # Following generated files are excluded from lint checks.
 EXCLUDED_GENERATED_FILES=(
 "apache_beam/io/gcp/internal/clients/bigquery/bigquery_v2_client.py"
@@ -39,14 +50,14 @@ EXCLUDED_GENERATED_FILES=(
 
 FILES_TO_IGNORE=""
 for file in "${EXCLUDED_GENERATED_FILES[@]}"; do
-  if [[ $FILES_TO_IGNORE ]]; then
-    FILES_TO_IGNORE="$FILES_TO_IGNORE, "
+  if test -z "$FILES_TO_IGNORE"
+    then FILES_TO_IGNORE="$(basename $file)"
+    else FILES_TO_IGNORE="$FILES_TO_IGNORE, $(basename $file)"
   fi
-  FILES_TO_IGNORE="$FILES_TO_IGNORE$(basename $file)"
 done
 echo "Skipping lint for generated files: $FILES_TO_IGNORE"
 
-echo "Running pylint:"
-pylint apache_beam --ignore-patterns="$FILES_TO_IGNORE"
-echo "Running pep8:"
-pep8 apache_beam --exclude="$FILES_TO_IGNORE"
+echo "Running pylint for module $MODULE:"
+pylint $MODULE --ignore-patterns="$FILES_TO_IGNORE"
+echo "Running pep8 for module $MODULE:"
+pep8 $MODULE --exclude="$FILES_TO_IGNORE"


[2/2] beam git commit: This closes #2579

Posted by al...@apache.org.
This closes #2579


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/3ef614c7
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/3ef614c7
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/3ef614c7

Branch: refs/heads/master
Commit: 3ef614c72d24f44a8cf463040a2bcf17b9445bc8
Parents: 6224556 28a2682
Author: Ahmet Altay <al...@google.com>
Authored: Wed Apr 19 16:46:00 2017 -0700
Committer: Ahmet Altay <al...@google.com>
Committed: Wed Apr 19 16:46:00 2017 -0700

----------------------------------------------------------------------
 sdks/python/run_pylint.sh | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------