Skip to content

Commit 858df05

Browse files
MarcoGorelliJulianWgs
authored andcommitted
CI run coverage on multiple builds (pandas-dev#40394)
1 parent 05461ec commit 858df05

16 files changed

+113
-88
lines changed

.github/workflows/database.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ jobs:
9292
- name: Print skipped tests
9393
run: python ci/print_skipped.py
9494

95+
- name: Upload coverage to Codecov
96+
uses: codecov/codecov-action@v1
97+
with:
98+
flags: unittests
99+
name: codecov-pandas
100+
fail_ci_if_error: false
101+
95102
Linux_py37_cov:
96103
runs-on: ubuntu-latest
97104
defaults:
@@ -174,7 +181,6 @@ jobs:
174181
- name: Upload coverage to Codecov
175182
uses: codecov/codecov-action@v1
176183
with:
177-
files: /tmp/test_coverage.xml
178184
flags: unittests
179185
name: codecov-pandas
180186
fail_ci_if_error: true

.github/workflows/posix.yml

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Posix
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches:
8+
- master
9+
- 1.2.x
10+
11+
env:
12+
PYTEST_WORKERS: "auto"
13+
PANDAS_CI: 1
14+
15+
jobs:
16+
pytest:
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
shell: bash -l {0}
21+
strategy:
22+
matrix:
23+
settings: [
24+
[actions-37-minimum_versions.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
25+
[actions-37.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
26+
[actions-37-locale_slow.yaml, "slow", "language-pack-it xsel", "it_IT.utf8", "it_IT.utf8", "", ""],
27+
[actions-37-slow.yaml, "slow", "", "", "", "", ""],
28+
[actions-38.yaml, "not slow and not network and not clipboard", "", "", "", "", ""],
29+
[actions-38-slow.yaml, "slow", "", "", "", "", ""],
30+
[actions-38-locale.yaml, "not slow and not network", "language-pack-zh-hans xsel", "zh_CN.utf8", "zh_CN.utf8", "", ""],
31+
[actions-38-numpydev.yaml, "not slow and not network", "xsel", "", "", "deprecate", "-W error"],
32+
[actions-39.yaml, "not slow and not network and not clipboard", "", "", "", "", ""]
33+
]
34+
fail-fast: false
35+
env:
36+
COVERAGE: true
37+
ENV_FILE: ci/deps/${{ matrix.settings[0] }}
38+
PATTERN: ${{ matrix.settings[1] }}
39+
EXTRA_APT: ${{ matrix.settings[2] }}
40+
LANG: ${{ matrix.settings[3] }}
41+
LC_ALL: ${{ matrix.settings[4] }}
42+
PANDAS_TESTING_MODE: ${{ matrix.settings[5] }}
43+
TEST_ARGS: ${{ matrix.settings[6] }}
44+
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v1
48+
49+
- name: Cache conda
50+
uses: actions/cache@v1
51+
env:
52+
CACHE_NUMBER: 0
53+
with:
54+
path: ~/conda_pkgs_dir
55+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
56+
hashFiles('${{ env.ENV_FILE }}') }}
57+
58+
- name: Extra installs
59+
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 ${{ env.EXTRA_APT }}
60+
61+
- uses: conda-incubator/setup-miniconda@v2
62+
with:
63+
activate-environment: pandas-dev
64+
channel-priority: flexible
65+
environment-file: ${{ env.ENV_FILE }}
66+
use-only-tar-bz2: true
67+
68+
- name: Build Pandas
69+
uses: ./.github/actions/build_pandas
70+
71+
- name: Test
72+
run: ci/run_tests.sh
73+
if: always()
74+
75+
- name: Build Version
76+
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
77+
78+
- name: Publish test results
79+
uses: actions/upload-artifact@master
80+
with:
81+
name: Test results
82+
path: test-data.xml
83+
if: failure()
84+
85+
- name: Print skipped tests
86+
run: python ci/print_skipped.py
87+
88+
- name: Upload coverage to Codecov
89+
uses: codecov/codecov-action@v1
90+
with:
91+
flags: unittests
92+
name: codecov-pandas
93+
fail_ci_if_error: false

azure-pipelines.yml

-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ jobs:
1717
name: macOS
1818
vmImage: macOS-10.14
1919

20-
- template: ci/azure/posix.yml
21-
parameters:
22-
name: Linux
23-
vmImage: ubuntu-16.04
24-
2520
- template: ci/azure/windows.yml
2621
parameters:
2722
name: Windows

ci/azure/posix.yml

-64
Original file line numberDiff line numberDiff line change
@@ -14,71 +14,7 @@ jobs:
1414
CONDA_PY: "37"
1515
PATTERN: "not slow and not network"
1616

17-
${{ if eq(parameters.name, 'Linux') }}:
18-
py37_minimum_versions:
19-
ENV_FILE: ci/deps/azure-37-minimum_versions.yaml
20-
CONDA_PY: "37"
21-
PATTERN: "not slow and not network and not clipboard"
22-
23-
py37:
24-
ENV_FILE: ci/deps/azure-37.yaml
25-
CONDA_PY: "37"
26-
PATTERN: "not slow and not network and not clipboard"
27-
28-
py37_locale_slow:
29-
ENV_FILE: ci/deps/azure-37-locale_slow.yaml
30-
CONDA_PY: "37"
31-
PATTERN: "slow"
32-
LANG: "it_IT.utf8"
33-
LC_ALL: "it_IT.utf8"
34-
EXTRA_APT: "language-pack-it xsel"
35-
36-
py37_slow:
37-
ENV_FILE: ci/deps/azure-37-slow.yaml
38-
CONDA_PY: "37"
39-
PATTERN: "slow"
40-
41-
py38:
42-
ENV_FILE: ci/deps/azure-38.yaml
43-
CONDA_PY: "38"
44-
PATTERN: "not slow and not network and not clipboard"
45-
46-
py38_slow:
47-
ENV_FILE: ci/deps/azure-38-slow.yaml
48-
CONDA_PY: "38"
49-
PATTERN: "slow"
50-
51-
py38_locale:
52-
ENV_FILE: ci/deps/azure-38-locale.yaml
53-
CONDA_PY: "38"
54-
PATTERN: "not slow and not network"
55-
# pandas does not use the language (zh_CN), but should support different encodings (utf8)
56-
# we should test with encodings different than utf8, but doesn't seem like Ubuntu supports any
57-
LANG: "zh_CN.utf8"
58-
LC_ALL: "zh_CN.utf8"
59-
EXTRA_APT: "language-pack-zh-hans xsel"
60-
61-
py38_np_dev:
62-
ENV_FILE: ci/deps/azure-38-numpydev.yaml
63-
CONDA_PY: "38"
64-
PATTERN: "not slow and not network"
65-
TEST_ARGS: "-W error"
66-
PANDAS_TESTING_MODE: "deprecate"
67-
EXTRA_APT: "xsel"
68-
69-
py39:
70-
ENV_FILE: ci/deps/azure-39.yaml
71-
CONDA_PY: "39"
72-
PATTERN: "not slow and not network and not clipboard"
73-
7417
steps:
75-
- script: |
76-
if [ "$(uname)" == "Linux" ]; then
77-
sudo apt-get update
78-
sudo apt-get install -y libc6-dev-i386 $EXTRA_APT
79-
fi
80-
displayName: 'Install extra packages'
81-
8218
- script: echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
8319
displayName: 'Set conda path'
8420

ci/deps/azure-37-locale_slow.yaml renamed to ci/deps/actions-37-locale_slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ dependencies:
88
# tools
99
- cython>=0.29.21
1010
- pytest>=5.0.1
11+
- pytest-cov
1112
- pytest-xdist>=1.21
1213
- hypothesis>=3.58.0
13-
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- beautifulsoup4=4.6.0

ci/deps/azure-37-minimum_versions.yaml renamed to ci/deps/actions-37-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ dependencies:
77
# tools
88
- cython=0.29.21
99
- pytest=5.0.1
10+
- pytest-cov
1011
- pytest-xdist>=1.21
1112
- hypothesis>=3.58.0
12-
- pytest-azurepipelines
1313
- psutil
1414

1515
# pandas dependencies

ci/deps/azure-37-slow.yaml renamed to ci/deps/actions-37-slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ dependencies:
88
# tools
99
- cython>=0.29.21
1010
- pytest>=5.0.1
11+
- pytest-cov
1112
- pytest-xdist>=1.21
1213
- hypothesis>=3.58.0
13-
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- beautifulsoup4

ci/deps/azure-37.yaml renamed to ci/deps/actions-37.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ dependencies:
88
# tools
99
- cython>=0.29.21
1010
- pytest>=5.0.1
11+
- pytest-cov
1112
- pytest-xdist>=1.21
1213
- hypothesis>=3.58.0
13-
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- botocore>=1.11

ci/deps/azure-38-locale.yaml renamed to ci/deps/actions-38-locale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ dependencies:
77
# tools
88
- cython>=0.29.21
99
- pytest>=5.0.1
10+
- pytest-cov
1011
- pytest-xdist>=1.21
1112
- pytest-asyncio>=0.12.0
1213
- hypothesis>=3.58.0
13-
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- beautifulsoup4

ci/deps/azure-38-numpydev.yaml renamed to ci/deps/actions-38-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ dependencies:
66

77
# tools
88
- pytest>=5.0.1
9+
- pytest-cov
910
- pytest-xdist>=1.21
1011
- hypothesis>=3.58.0
11-
- pytest-azurepipelines
1212

1313
# pandas dependencies
1414
- pytz

ci/deps/azure-38-slow.yaml renamed to ci/deps/actions-38-slow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies:
77
# tools
88
- cython>=0.29.21
99
- pytest>=5.0.1
10+
- pytest-cov
1011
- pytest-xdist>=1.21
1112
- hypothesis>=3.58.0
1213

ci/deps/azure-38.yaml renamed to ci/deps/actions-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ dependencies:
88
# tools
99
- cython>=0.29.21
1010
- pytest>=5.0.1
11+
- pytest-cov
1112
- pytest-xdist>=1.21
1213
- hypothesis>=3.58.0
13-
- pytest-azurepipelines
1414

1515
# pandas dependencies
1616
- numpy

ci/deps/azure-39.yaml renamed to ci/deps/actions-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ dependencies:
77
# tools
88
- cython>=0.29.21
99
- pytest>=5.0.1
10+
- pytest-cov
1011
- pytest-xdist>=1.21
1112
- hypothesis>=3.58.0
12-
- pytest-azurepipelines
1313

1414
# pandas dependencies
1515
- numpy

ci/run_tests.sh

+1-8
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ if [[ "not network" == *"$PATTERN"* ]]; then
1010
fi
1111

1212
if [ "$COVERAGE" ]; then
13-
COVERAGE_FNAME="/tmp/test_coverage.xml"
14-
COVERAGE="-s --cov=pandas --cov-report=xml:$COVERAGE_FNAME"
13+
COVERAGE="-s --cov=pandas --cov-report=xml"
1514
fi
1615

1716
# If no X server is found, we use xvfb to emulate it
@@ -30,9 +29,3 @@ fi
3029

3130
echo $PYTEST_CMD
3231
sh -c "$PYTEST_CMD"
33-
34-
if [[ "$COVERAGE" && $? == 0 && "$TRAVIS_BRANCH" == "master" ]]; then
35-
echo "uploading coverage"
36-
echo "bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME"
37-
bash <(curl -s https://codecov.io/bash) -Z -c -f $COVERAGE_FNAME
38-
fi

codecov.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
codecov:
22
branch: master
3-
3+
notify:
4+
after_n_builds: 10
45
comment: false
56

67
coverage:

pandas/plotting/_matplotlib/misc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def f(t):
246246
# appropriately. Take a copy of amplitudes as otherwise numpy
247247
# deletes the element from amplitudes itself.
248248
coeffs = np.delete(np.copy(amplitudes), 0)
249-
coeffs.resize(int((coeffs.size + 1) / 2), 2)
249+
coeffs = np.resize(coeffs, (int((coeffs.size + 1) / 2), 2))
250250

251251
# Generate the harmonics and arguments for the sin and cos
252252
# functions.

0 commit comments

Comments
 (0)