Skip to content

Commit

Permalink
[yugabyte#9804] Add Python type annotations to the Spark test runner
Browse files Browse the repository at this point in the history
Summary:
Add Python type annotations to the Spark test runner. Also use the codecheck
tool to verify a subset of Python scripts during the build.

Test Plan: Jenkins: build type: release

Reviewers: jharveysmith, steve.varnau

Reviewed By: steve.varnau

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D12701
  • Loading branch information
mbautin committed Aug 24, 2021
1 parent 8ee03e7 commit 480d755
Show file tree
Hide file tree
Showing 10 changed files with 282 additions and 149 deletions.
9 changes: 9 additions & 0 deletions bin/run_codecheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euo pipefail
. "${BASH_SOURCE%/*}/../build-support/common-build-env.sh"

activate_virtualenv
set_pythonpath

codecheck "$@"
4 changes: 3 additions & 1 deletion build-support/common-test-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1850,11 +1850,13 @@ run_python_doctest() {

run_python_tests() {
activate_virtualenv
check_python_script_syntax
(
export PYTHONPATH=$YB_SRC_ROOT/python
run_python_doctest
log "Invoking the codecheck tool"
python3 -m codecheck
)
check_python_script_syntax
}

should_run_java_test_methods_separately() {
Expand Down
Loading

0 comments on commit 480d755

Please sign in to comment.