diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index b34373b82af1a..a30dbc048c03d 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -92,6 +92,13 @@ jobs: - name: Print skipped tests run: python ci/print_skipped.py + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + flags: unittests + name: codecov-pandas + fail_ci_if_error: false + Linux_py37_cov: runs-on: ubuntu-latest defaults: @@ -174,7 +181,6 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: - files: /tmp/test_coverage.xml flags: unittests name: codecov-pandas fail_ci_if_error: true diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml new file mode 100644 index 0000000000000..34e6c2c9d94ce --- /dev/null +++ b/.github/workflows/posix.yml @@ -0,0 +1,93 @@ +name: Posix + +on: + push: + branches: [master] + pull_request: + branches: + - master + - 1.2.x + +env: + PYTEST_WORKERS: "auto" + PANDAS_CI: 1 + +jobs: + pytest: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + strategy: + matrix: + settings: [ + [actions-37-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], + [actions-37.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], + [actions-37-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""], + [actions-37-slow.yaml, "slow", "", "", "", "", ""], + [actions-38.yaml, "not slow and not network and not clipboard", "", "", "", "", ""], + [actions-38-slow.yaml, "slow", "", "", "", "", ""], + [actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""], + [actions-38-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"], + [actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""] + ] + fail-fast: false + env: + COVERAGE: true + ENV_FILE: ci/deps/${{ matrix.settings[0] }} + PATTERN: ${{ matrix.settings[1] }} + EXTRA_APT: ${{ matrix.settings[2] }} + LANG: ${{ matrix.settings[3] }} + LC_ALL: ${{ matrix.settings[4] }} + PANDAS_TESTING_MODE: ${{ matrix.settings[5] }} + TEST_ARGS: ${{ matrix.settings[6] }} + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Cache conda + uses: actions/cache@v1 + env: + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ + hashFiles('${{ env.ENV_FILE }}') }} + + - name: Extra installs + run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 ${{ env.EXTRA_APT }} + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: pandas-dev + channel-priority: flexible + environment-file: ${{ env.ENV_FILE }} + use-only-tar-bz2: true + + - name: Build Pandas + uses: ./.github/actions/build_pandas + + - name: Test + run: ci/run_tests.sh + if: always() + + - name: Build Version + run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd + + - name: Publish test results + uses: actions/upload-artifact@master + with: + name: Test results + path: test-data.xml + if: failure() + + - name: Print skipped tests + run: python ci/print_skipped.py + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + flags: unittests + name: codecov-pandas + fail_ci_if_error: false diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 464bad7884362..56da4e87f2709 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,11 +17,6 @@ jobs: name: macOS vmImage: macOS-10.14 -- template: ci/azure/posix.yml - parameters: - name: Linux - vmImage: ubuntu-16.04 - - template: ci/azure/windows.yml parameters: name: Windows diff --git a/ci/azure/posix.yml b/ci/azure/posix.yml index 4cb4eaf95f6f5..2caacf3a07290 100644 --- a/ci/azure/posix.yml +++ b/ci/azure/posix.yml @@ -14,71 +14,7 @@ jobs: CONDA_PY: "37" PATTERN: "not slow and not network" - ${{ if eq(parameters.name, 'Linux') }}: - py37_minimum_versions: - ENV_FILE: ci/deps/azure-37-minimum_versions.yaml - CONDA_PY: "37" - PATTERN: "not slow and not network and not clipboard" - - py37: - ENV_FILE: ci/deps/azure-37.yaml - CONDA_PY: "37" - PATTERN: "not slow and not network and not clipboard" - - py37_locale_slow: - ENV_FILE: ci/deps/azure-37-locale_slow.yaml - CONDA_PY: "37" - PATTERN: "slow" - LANG: "it_IT.utf8" - LC_ALL: "it_IT.utf8" - EXTRA_APT: "language-pack-it xsel" - - py37_slow: - ENV_FILE: ci/deps/azure-37-slow.yaml - CONDA_PY: "37" - PATTERN: "slow" - - py38: - ENV_FILE: ci/deps/azure-38.yaml - CONDA_PY: "38" - PATTERN: "not slow and not network and not clipboard" - - py38_slow: - ENV_FILE: ci/deps/azure-38-slow.yaml - CONDA_PY: "38" - PATTERN: "slow" - - py38_locale: - ENV_FILE: ci/deps/azure-38-locale.yaml - CONDA_PY: "38" - PATTERN: "not slow and not network" - # pandas does not use the language (zh_CN), but should support different encodings (utf8) - # we should test with encodings different than utf8, but doesn't seem like Ubuntu supports any - LANG: "zh_CN.utf8" - LC_ALL: "zh_CN.utf8" - EXTRA_APT: "language-pack-zh-hans xsel" - - py38_np_dev: - ENV_FILE: ci/deps/azure-38-numpydev.yaml - CONDA_PY: "38" - PATTERN: "not slow and not network" - TEST_ARGS: "-W error" - PANDAS_TESTING_MODE: "deprecate" - EXTRA_APT: "xsel" - - py39: - ENV_FILE: ci/deps/azure-39.yaml - CONDA_PY: "39" - PATTERN: "not slow and not network and not clipboard" - steps: - - script: | - if [ "$(uname)" == "Linux" ]; then - sudo apt-get update - sudo apt-get install -y libc6-dev-i386 $EXTRA_APT - fi - displayName: 'Install extra packages' - - script: echo '##vso[task.prependpath]$(HOME)/miniconda3/bin' displayName: 'Set conda path' diff --git a/ci/deps/azure-37-locale_slow.yaml b/ci/deps/actions-37-locale_slow.yaml similarity index 94% rename from ci/deps/azure-37-locale_slow.yaml rename to ci/deps/actions-37-locale_slow.yaml index 0c47b1a72774f..d9ad1f538908e 100644 --- a/ci/deps/azure-37-locale_slow.yaml +++ b/ci/deps/actions-37-locale_slow.yaml @@ -8,9 +8,9 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - beautifulsoup4=4.6.0 diff --git a/ci/deps/azure-37-minimum_versions.yaml b/ci/deps/actions-37-minimum_versions.yaml similarity index 95% rename from ci/deps/azure-37-minimum_versions.yaml rename to ci/deps/actions-37-minimum_versions.yaml index 9cc158b76cd41..e14e51a36be31 100644 --- a/ci/deps/azure-37-minimum_versions.yaml +++ b/ci/deps/actions-37-minimum_versions.yaml @@ -7,9 +7,9 @@ dependencies: # tools - cython=0.29.21 - pytest=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines - psutil # pandas dependencies diff --git a/ci/deps/azure-37-slow.yaml b/ci/deps/actions-37-slow.yaml similarity index 95% rename from ci/deps/azure-37-slow.yaml rename to ci/deps/actions-37-slow.yaml index 5d097e397992c..573ff7f02c162 100644 --- a/ci/deps/azure-37-slow.yaml +++ b/ci/deps/actions-37-slow.yaml @@ -8,9 +8,9 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - beautifulsoup4 diff --git a/ci/deps/azure-37.yaml b/ci/deps/actions-37.yaml similarity index 93% rename from ci/deps/azure-37.yaml rename to ci/deps/actions-37.yaml index 4fe3de161960c..61f431256dd4a 100644 --- a/ci/deps/azure-37.yaml +++ b/ci/deps/actions-37.yaml @@ -8,9 +8,9 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - botocore>=1.11 diff --git a/ci/deps/azure-38-locale.yaml b/ci/deps/actions-38-locale.yaml similarity index 95% rename from ci/deps/azure-38-locale.yaml rename to ci/deps/actions-38-locale.yaml index 26297a3066fa5..629804c71e726 100644 --- a/ci/deps/azure-38-locale.yaml +++ b/ci/deps/actions-38-locale.yaml @@ -7,10 +7,10 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - pytest-asyncio>=0.12.0 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - beautifulsoup4 diff --git a/ci/deps/azure-38-numpydev.yaml b/ci/deps/actions-38-numpydev.yaml similarity index 94% rename from ci/deps/azure-38-numpydev.yaml rename to ci/deps/actions-38-numpydev.yaml index f11a3bcb28ab2..e7ee6ccfd7bac 100644 --- a/ci/deps/azure-38-numpydev.yaml +++ b/ci/deps/actions-38-numpydev.yaml @@ -6,9 +6,9 @@ dependencies: # tools - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - pytz diff --git a/ci/deps/azure-38-slow.yaml b/ci/deps/actions-38-slow.yaml similarity index 97% rename from ci/deps/azure-38-slow.yaml rename to ci/deps/actions-38-slow.yaml index 0a4107917f01a..2106f48755560 100644 --- a/ci/deps/azure-38-slow.yaml +++ b/ci/deps/actions-38-slow.yaml @@ -7,6 +7,7 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 diff --git a/ci/deps/azure-38.yaml b/ci/deps/actions-38.yaml similarity index 91% rename from ci/deps/azure-38.yaml rename to ci/deps/actions-38.yaml index 89e8d28a139b7..e2660d07c3558 100644 --- a/ci/deps/azure-38.yaml +++ b/ci/deps/actions-38.yaml @@ -8,9 +8,9 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - numpy diff --git a/ci/deps/azure-39.yaml b/ci/deps/actions-39.yaml similarity index 92% rename from ci/deps/azure-39.yaml rename to ci/deps/actions-39.yaml index c4c84e73fa684..36e8bf528fc3e 100644 --- a/ci/deps/azure-39.yaml +++ b/ci/deps/actions-39.yaml @@ -7,9 +7,9 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 - - pytest-azurepipelines # pandas dependencies - numpy diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 593939431d5eb..ec4c87e8c91b0 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -10,8 +10,7 @@ if [[ "not network" == *"$PATTERN"* ]]; then fi if [ "$COVERAGE" ]; then - COVERAGE_FNAME="/tmp/test_coverage.xml" - COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME" + COVERAGE="-s --cov=pandas --cov-report=xml" fi # If no X server is found, we use xvfb to emulate it @@ -30,9 +29,3 @@ fi echo $PYTEST_CMD sh -c "$PYTEST_CMD" - -if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then - echo "uploading coverage" - echo "bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME" - bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME -fi diff --git a/codecov.yml b/codecov.yml index 6dd1e33a7a671..893e40db004a6 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,7 @@ codecov: branch: master - + notify: + after_n_builds: 10 comment: false coverage: diff --git a/pandas/plotting/_matplotlib/misc.py b/pandas/plotting/_matplotlib/misc.py index 3d5f4af72db6c..eab5474fce541 100644 --- a/pandas/plotting/_matplotlib/misc.py +++ b/pandas/plotting/_matplotlib/misc.py @@ -246,7 +246,7 @@ def f(t): # appropriately. Take a copy of amplitudes as otherwise numpy # deletes the element from amplitudes itself. coeffs = np.delete(np.copy(amplitudes), 0) - coeffs.resize(int((coeffs.size + 1) / 2), 2) + coeffs = np.resize(coeffs, (int((coeffs.size + 1) / 2), 2)) # Generate the harmonics and arguments for the sin and cos # functions.