Skip to content

Commit 76701a6

Browse files
authored
CI: use conda incubator in benchmarks (#39043)
1 parent eb86524 commit 76701a6

File tree

3 files changed

+36
-30
lines changed

3 files changed

+36
-30
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,81 @@ name: CI
22

33
on:
44
push:
5-
branches: master
5+
branches: [master]
66
pull_request:
77
branches:
88
- master
99
- 1.2.x
1010

1111
env:
1212
ENV_FILE: environment.yml
13+
PANDAS_CI: 1
1314

1415
jobs:
1516
checks:
1617
name: Checks
1718
runs-on: ubuntu-latest
18-
steps:
19-
20-
- name: Setting conda path
21-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
19+
defaults:
20+
run:
21+
shell: bash -l {0}
2222

23+
steps:
2324
- name: Checkout
2425
uses: actions/checkout@v1
2526

2627
- name: Looking for unwanted patterns
2728
run: ci/code_checks.sh patterns
2829
if: always()
2930

30-
- name: Setup environment and build pandas
31-
run: ci/setup_env.sh
32-
if: always()
31+
- name: Cache conda
32+
uses: actions/cache@v2
33+
with:
34+
path: ~/conda_pkgs_dir
35+
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
3336

34-
- name: Linting
37+
- uses: conda-incubator/setup-miniconda@v2
38+
with:
39+
activate-environment: pandas-dev
40+
channel-priority: strict
41+
environment-file: ${{ env.ENV_FILE }}
42+
use-only-tar-bz2: true
43+
44+
- name: Environment Detail
3545
run: |
36-
source activate pandas-dev
37-
ci/code_checks.sh lint
46+
conda info
47+
conda list
48+
49+
- name: Build Pandas
50+
run: |
51+
python setup.py build_ext -j 2
52+
python -m pip install -e . --no-build-isolation --no-use-pep517
53+
54+
- name: Linting
55+
run: ci/code_checks.sh lint
3856
if: always()
3957

4058
- name: Checks on imported code
41-
run: |
42-
source activate pandas-dev
43-
ci/code_checks.sh code
59+
run: ci/code_checks.sh code
4460
if: always()
4561

4662
- name: Running doctests
47-
run: |
48-
source activate pandas-dev
49-
ci/code_checks.sh doctests
63+
run: ci/code_checks.sh doctests
5064
if: always()
5165

5266
- name: Docstring validation
53-
run: |
54-
source activate pandas-dev
55-
ci/code_checks.sh docstrings
67+
run: ci/code_checks.sh docstrings
5668
if: always()
5769

5870
- name: Typing validation
59-
run: |
60-
source activate pandas-dev
61-
ci/code_checks.sh typing
71+
run: ci/code_checks.sh typing
6272
if: always()
6373

6474
- name: Testing docstring validation script
65-
run: |
66-
source activate pandas-dev
67-
pytest --capture=no --strict-markers scripts
75+
run: pytest --capture=no --strict-markers scripts
6876
if: always()
6977

7078
- name: Running benchmarks
7179
run: |
72-
source activate pandas-dev
7380
cd asv_bench
7481
asv check -E existing
7582
git remote add upstream https://github.com/pandas-dev/pandas.git
@@ -106,7 +113,6 @@ jobs:
106113
run: |
107114
source activate pandas-dev
108115
python web/pandas_web.py web/pandas --target-path=web/build
109-
110116
- name: Build documentation
111117
run: |
112118
source activate pandas-dev

doc/source/user_guide/enhancingperf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ We've gotten another big improvement. Let's check again where the time is spent:
247247

248248
.. ipython:: python
249249
250-
%%prun -l 4 apply_integrate_f(df["a"].to_numpy(), df["b"].to_numpy(), df["N"].to_numpy())
250+
%prun -l 4 apply_integrate_f(df["a"].to_numpy(), df["b"].to_numpy(), df["N"].to_numpy())
251251
252252
As one might expect, the majority of the time is now spent in ``apply_integrate_f``,
253253
so if we wanted to make anymore efficiencies we must continue to concentrate our

doc/source/whatsnew/v0.8.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ New plotting methods
176176
Vytautas Jancauskas, the 2012 GSOC participant, has added many new plot
177177
types. For example, ``'kde'`` is a new option:
178178

179-
.. ipython:: python
179+
.. code-block:: python
180180
181181
s = pd.Series(
182182
np.concatenate((np.random.randn(1000), np.random.randn(1000) * 0.5 + 3))

0 commit comments

Comments
 (0)