From 1ceae3c7193eda860e2a1928fbf434fcf462e8cf Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 16 Nov 2019 02:53:20 +0000 Subject: [PATCH 1/7] Azure isort formatting --- ci/code_checks.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index d5566c522ac64..47a86001360e2 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -109,7 +109,13 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then # Imports - Check formatting using isort see setup.cfg for settings MSG='Check import format using isort ' ; echo $MSG - isort --recursive --check-only pandas asv_bench + set -o pipefail + isort_cmd="isort --recursive --check-only pandas asv_bench" + if [[ "$AZURE" == "true" ]]; then + eval $isort_cmd | awk '{ORS=""} {print "##vso[task.logissue type=error;sourcepath="$2";]"} {$1=$2=""; print $0}' + else + eval $isort_cmd + fi RET=$(($RET + $?)) ; echo $MSG "DONE" fi From 04c533d75c4f9c75d8de8d7898cb94a1dfdf3bb8 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 16 Nov 2019 02:54:59 +0000 Subject: [PATCH 2/7] Commit incorrectly sorted import --- pandas/tests/window/test_pairwise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/window/test_pairwise.py b/pandas/tests/window/test_pairwise.py index 6f6d4c09526ff..3496aac394389 100644 --- a/pandas/tests/window/test_pairwise.py +++ b/pandas/tests/window/test_pairwise.py @@ -1,9 +1,9 @@ +from pandas.core.algorithms import safe_sort import warnings import pytest from pandas import DataFrame, Series -from pandas.core.algorithms import safe_sort import pandas.util.testing as tm From 6aadcf17dee95f8555626e058493befba6b21f3a Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 30 Nov 2019 21:02:21 +0000 Subject: [PATCH 3/7] isort format --- ci/code_checks.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 863fc0f251472..7b28153ee7a88 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -105,12 +105,11 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then # Imports - Check formatting using isort see setup.cfg for settings MSG='Check import format using isort ' ; echo $MSG - set -o pipefail - isort_cmd="isort --recursive --check-only pandas asv_bench" - if [[ "$AZURE" == "true" ]]; then - eval $isort_cmd | awk '{ORS=""} {print "##vso[task.logissue type=error;sourcepath="$2";]"} {$1=$2=""; print $0}' + ISORT_CMD="isort --recursive --check-only pandas asv_bench" + if [[ "$GITHUB_ACTIONS" == "true" ]]; then + eval $ISORT_CMD | awk '{print "##[error]" $0}' else - eval $isort_cmd + eval $ISORT_CMD fi RET=$(($RET + $?)) ; echo $MSG "DONE" From 9c25358fcf49ef79b2d3553ca79e059d344ed952 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 30 Nov 2019 21:41:01 +0000 Subject: [PATCH 4/7] Fix indent --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 7b28153ee7a88..2f5c3bdfee61a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -107,7 +107,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then MSG='Check import format using isort ' ; echo $MSG ISORT_CMD="isort --recursive --check-only pandas asv_bench" if [[ "$GITHUB_ACTIONS" == "true" ]]; then - eval $ISORT_CMD | awk '{print "##[error]" $0}' + eval $ISORT_CMD | awk '{print "##[error]" $0}' else eval $ISORT_CMD fi From 2bd6f23ec518b93ccc66a791ed1ad920d03a31e2 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 1 Dec 2019 22:18:43 +0000 Subject: [PATCH 5/7] Add pipestatus --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 2f5c3bdfee61a..cbdb40ce33c1d 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -107,7 +107,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then MSG='Check import format using isort ' ; echo $MSG ISORT_CMD="isort --recursive --check-only pandas asv_bench" if [[ "$GITHUB_ACTIONS" == "true" ]]; then - eval $ISORT_CMD | awk '{print "##[error]" $0}' + eval $ISORT_CMD | awk '{print "##[error]" $0}'; $?=${PIPESTATUS[0]} else eval $ISORT_CMD fi From da5dea0a24479526b16901e1eee393a433d1f6a8 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 1 Dec 2019 23:06:33 +0000 Subject: [PATCH 6/7] Update ci/code_checks.sh Co-Authored-By: Marc Garcia --- ci/code_checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index cbdb40ce33c1d..2d41b6c48f004 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -107,7 +107,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then MSG='Check import format using isort ' ; echo $MSG ISORT_CMD="isort --recursive --check-only pandas asv_bench" if [[ "$GITHUB_ACTIONS" == "true" ]]; then - eval $ISORT_CMD | awk '{print "##[error]" $0}'; $?=${PIPESTATUS[0]} + eval $ISORT_CMD | awk '{print "##[error]" $0}'; RET=$(($RET + ${PIPESTATUS[0]})) else eval $ISORT_CMD fi From b0ad4b55edcf66a007257178d82422bfc52d54f5 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Tue, 3 Dec 2019 19:19:00 +0000 Subject: [PATCH 7/7] Revert import changes --- pandas/tests/window/test_pairwise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/window/test_pairwise.py b/pandas/tests/window/test_pairwise.py index 3496aac394389..6f6d4c09526ff 100644 --- a/pandas/tests/window/test_pairwise.py +++ b/pandas/tests/window/test_pairwise.py @@ -1,9 +1,9 @@ -from pandas.core.algorithms import safe_sort import warnings import pytest from pandas import DataFrame, Series +from pandas.core.algorithms import safe_sort import pandas.util.testing as tm