Skip to content

Commit 384a52b

Browse files
committed
review feedback
1 parent 98a2a93 commit 384a52b

File tree

7 files changed

+140
-8
lines changed

7 files changed

+140
-8
lines changed

.github/actions/build_pandas/action.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ runs:
1010
mamba list
1111
mamba info | grep -Ei 'environment.+:' | grep -qEiv 'environment.+:.+none'
1212
fi
13+
python -VV
14+
which python
15+
which pip
1316
pip list
14-
python --version
1517
shell: bash -el {0}
1618

1719
- name: Build Pandas
1820
run: |
19-
which python
20-
which pip
21-
# Cannot use parallel compilation on Windows, see https://github.com/pandas-dev/pandas/issues/30873
22-
j=${{ runner.os == 'Windows' && 1 || 3 }}
23-
time python setup.py build_ext -v -j $j
21+
time python setup.py build_ext -v -j $N_JOBS
2422
pip install -v -e . --no-build-isolation --no-use-pep517 --no-index
2523
shell: bash -el {0}
24+
env:
25+
# Cannot use parallel compilation on Windows, see https://github.com/pandas-dev/pandas/issues/30873
26+
N_JOBS: ${{ runner.os == 'Windows' && 1 || 3 }}
2627

2728
- name: Build Version
2829
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd

.github/actions/run-tests/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Run tests and report results
2+
description: >-
3+
Runs the test suite and publishes the results and coverage.
4+
5+
Pandas is expected to be installed with pip or Conda in a way that a Python
6+
interpreter run from a login bash will be able to import it, eg.
7+
`bash -lc 'python -c "import pandas"'`.
28
inputs:
39
check-pyarrow-version:
10+
description: >-
11+
If set, double-check that the PyArrow version used by the Pandas installation
12+
if identical to this string.
413
required: false
514
runs:
615
using: composite

.github/actions/setup-pandas/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: Set up pandas
22
description: Runs all the setup steps required to have a built pandas ready to use
33
inputs:
44
environment-file:
5+
description: Conda environment file to use.
56
default: environment.yml
67
pyarrow-version:
7-
required: false
8+
description: If set, overrides the PyArrow version in the Conda environment to the given string.
9+
required: false
810
runs:
911
using: composite
1012
steps:

.github/workflows/macos-windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
timeout-minutes: 120
2828
strategy:
2929
matrix:
30-
os: [macos-10.15, windows-2019]
30+
# TODO
31+
# os: [macos-10.15, windows-2019]
32+
os: [windows-2019]
3133
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
3234
pyarrow_version: [6]
3335
fail-fast: false

azure-pipelines.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ variables:
2222
PANDAS_CI: 1
2323

2424
jobs:
25+
- template: ci/azure/posix.yml
26+
parameters:
27+
name: macOS
28+
vmImage: macOS-10.15
29+
30+
- template: ci/azure/windows.yml
31+
parameters:
32+
name: Windows
33+
vmImage: windows-2019
34+
2535
- job: py38_32bit
2636
pool:
2737
vmImage: ubuntu-18.04

ci/azure/posix.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
parameters:
2+
name: ''
3+
vmImage: ''
4+
5+
jobs:
6+
- job: ${{ parameters.name }}
7+
timeoutInMinutes: 90
8+
pool:
9+
vmImage: ${{ parameters.vmImage }}
10+
strategy:
11+
matrix:
12+
py38:
13+
ENV_FILE: ci/deps/actions-38.yaml
14+
CONDA_PY: "38"
15+
16+
py39:
17+
ENV_FILE: ci/deps/actions-39.yaml
18+
CONDA_PY: "39"
19+
20+
py310:
21+
ENV_FILE: ci/deps/actions-310.yaml
22+
CONDA_PY: "310"
23+
24+
steps:
25+
- script: echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
26+
displayName: 'Set conda path'
27+
28+
- script: rm /usr/local/miniconda/pkgs/cache/*.json
29+
displayName: 'Workaround for mamba-org/mamba#488'
30+
31+
- script: ci/setup_env.sh
32+
displayName: 'Setup environment and build pandas'
33+
34+
- script: |
35+
conda run -n pandas-dev --no-capture-output ci/run_tests.sh
36+
displayName: 'Test'
37+
38+
- script: |
39+
pushd /tmp
40+
conda run -n pandas-dev python -c "import pandas; pandas.show_versions()"
41+
popd
42+
displayName: 'Build versions'
43+
44+
- task: PublishTestResults@2
45+
condition: succeededOrFailed()
46+
inputs:
47+
failTaskOnFailedTests: true
48+
testResultsFiles: 'test-data.xml'
49+
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
50+
displayName: 'Publish test results'

ci/azure/windows.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
parameters:
2+
name: ''
3+
vmImage: ''
4+
5+
jobs:
6+
- job: ${{ parameters.name }}
7+
timeoutInMinutes: 90
8+
pool:
9+
vmImage: ${{ parameters.vmImage }}
10+
strategy:
11+
matrix:
12+
py38:
13+
ENV_FILE: ci/deps/actions-38.yaml
14+
CONDA_PY: "38"
15+
16+
py39:
17+
ENV_FILE: ci/deps/actions-39.yaml
18+
CONDA_PY: "39"
19+
20+
py310:
21+
ENV_FILE: ci/deps/actions-310.yaml
22+
CONDA_PY: "310"
23+
24+
steps:
25+
- powershell: |
26+
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
27+
Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin"
28+
displayName: 'Add conda to PATH'
29+
- bash: conda install -yv -c conda-forge -n base 'mamba>=0.21.2'
30+
displayName: 'Install mamba'
31+
32+
- bash: |
33+
# See https://github.com/mamba-org/mamba/issues/1370
34+
# See https://github.com/mamba-org/mamba/issues/633
35+
C:\\Miniconda\\condabin\\mamba.bat create -n pandas-dev
36+
C:\\Miniconda\\condabin\\mamba.bat env update -n pandas-dev --file ci\\deps\\actions-$(CONDA_PY).yaml
37+
# TODO: GH#44980 https://github.com/pypa/setuptools/issues/2941
38+
C:\\Miniconda\\condabin\\mamba.bat install -n pandas-dev 'setuptools<60'
39+
C:\\Miniconda\\condabin\\mamba.bat list -n pandas-dev
40+
displayName: 'Create anaconda environment'
41+
- bash: |
42+
source activate pandas-dev
43+
conda list
44+
python setup.py build_ext -q -j 2
45+
python -m pip install --no-build-isolation -e .
46+
displayName: 'Build'
47+
- bash: |
48+
source activate pandas-dev
49+
wmic.exe cpu get caption, deviceid, name, numberofcores, maxclockspeed
50+
ci/run_tests.sh
51+
displayName: 'Test'
52+
- task: PublishTestResults@2
53+
condition: succeededOrFailed()
54+
inputs:
55+
failTaskOnFailedTests: true
56+
testResultsFiles: 'test-data.xml'
57+
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
58+
displayName: 'Publish test results'

0 commit comments

Comments
 (0)