This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new b4748ca  [SPARK-31155] Remove pydocstyle tests
b4748ca is described below

commit b4748ca0ab5893affa9b980457026ce481cd0fb0
Author: Nicholas Chammas <nicholas.cham...@liveramp.com>
AuthorDate: Tue Mar 17 10:41:41 2020 +0900

    [SPARK-31155] Remove pydocstyle tests
    
    ### What changes were proposed in this pull request?
    
    As discovered here 
https://github.com/apache/spark/pull/27910#issuecomment-599027190, pydocstyle 
tests were not running anywhere (not on Jenkins; not on GitHub).
    
    ~This PR enables those tests.~
    
    It also seems like a [large hill to 
climb](https://github.com/apache/spark/pull/27912#issuecomment-599167117) to 
enable any meaningful checks, so we're going to just rip pydocstyle out for now.
    
    ### Why are the changes needed?
    
    Presumably, we defined those doc style tests because we care about whatever 
it is they enforce. Since we're not actually testing anything, though, it's 
better to clear the cruft.
    
    ### Does this PR introduce any user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Will check the GitHub workflow logs on this PR.
    
    Closes #27912 from nchammas/SPARK-31155-pydocstyle.
    
    Authored-by: Nicholas Chammas <nicholas.cham...@liveramp.com>
    Signed-off-by: HyukjinKwon <gurwls...@apache.org>
---
 dev/lint-python | 46 ----------------------------------------------
 dev/tox.ini     |  2 --
 2 files changed, 48 deletions(-)

diff --git a/dev/lint-python b/dev/lint-python
index a9d2a0b..d5491f2 100755
--- a/dev/lint-python
+++ b/dev/lint-python
@@ -16,9 +16,6 @@
 # limitations under the License.
 #
 # define test binaries + versions
-PYDOCSTYLE_BUILD="pydocstyle"
-MINIMUM_PYDOCSTYLE="3.0.0"
-
 FLAKE8_BUILD="flake8"
 MINIMUM_FLAKE8="3.5.0"
 
@@ -165,48 +162,6 @@ flake8 checks failed."
     fi
 }
 
-function pydocstyle_test {
-    local PYDOCSTYLE_REPORT=
-    local PYDOCSTYLE_STATUS=
-    local PYDOCSTYLE_VERSION=
-    local EXPECTED_PYDOCSTYLE=
-
-    # Exclude auto-generated configuration file.
-    local DOC_PATHS_TO_CHECK="$( cd "${SPARK_ROOT_DIR}" && find . -name "*.py" 
| grep -vF 'functions.py' )"
-
-    # Check python document style, skip check if pydocstyle is not installed.
-    if ! hash "$PYDOCSTYLE_BUILD" 2> /dev/null; then
-        echo "The pydocstyle command was not found. Skipping pydocstyle checks 
for now."
-        echo
-        return
-    fi
-
-    PYDOCSTYLE_VERSION="$($PYDOCSTYLE_BUILD --version)"
-    EXPECTED_PYDOCSTYLE="$(satisfies_min_version $PYDOCSTYLE_VERSION 
$MINIMUM_PYDOCSTYLE)"
-
-    if [[ "$EXPECTED_PYDOCSTYLE" == "False" ]]; then
-        echo "\
-The minimum version of pydocstyle needs to be $MINIMUM_PYDOCSTYLE.
-Your current version is $PYDOCSTYLE_VERSION.
-Skipping pydocstyle checks for now."
-        echo
-        return
-    fi
-
-    echo "starting $PYDOCSTYLE_BUILD test..."
-    PYDOCSTYLE_REPORT=$( ($PYDOCSTYLE_BUILD --config=dev/tox.ini 
$DOC_PATHS_TO_CHECK) 2>&1)
-    PYDOCSTYLE_STATUS=$?
-
-    if [ "$PYDOCSTYLE_STATUS" -ne 0 ]; then
-        echo "pydocstyle checks failed:"
-        echo "$PYDOCSTYLE_REPORT"
-        exit "$PYDOCSTYLE_STATUS"
-    else
-        echo "pydocstyle checks passed."
-        echo
-    fi
-}
-
 function sphinx_test {
     local SPHINX_REPORT=
     local SPHINX_STATUS=
@@ -252,7 +207,6 @@ PYTHON_SOURCE="$(find . -name "*.py")"
 compile_python_test "$PYTHON_SOURCE"
 pycodestyle_test "$PYTHON_SOURCE"
 flake8_test
-pydocstyle_test
 sphinx_test
 
 echo
diff --git a/dev/tox.ini b/dev/tox.ini
index 54f6569..3ee13c0 100644
--- a/dev/tox.ini
+++ b/dev/tox.ini
@@ -17,5 +17,3 @@
 ignore=E226,E241,E305,E402,E722,E731,E741,W503,W504
 max-line-length=100
 
exclude=cloudpickle.py,heapq3.py,shared.py,python/docs/conf.py,work/*/*.py,python/.eggs/*,dist/*,.git/*
-[pydocstyle]
-ignore=D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D203,D204,D205,D206,D207,D208,D209,D210,D211,D212,D213,D214,D215,D300,D301,D302,D400,D401,D402,D403,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to