Skip to content

CI: use conda incubator in benchmarks #39043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 34 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,74 +2,81 @@ name: CI

on:
push:
branches: master
branches: [master]
pull_request:
branches:
- master
- 1.2.x

env:
ENV_FILE: environment.yml
PANDAS_CI: 1

jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout
uses: actions/checkout@v1

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

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

- name: Linting
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true

- name: Environment Detail
run: |
source activate pandas-dev
ci/code_checks.sh lint
conda info
conda list

- name: Build Pandas
run: |
python setup.py build_ext -j 2
python -m pip install -e . --no-build-isolation --no-use-pep517

- name: Linting
run: ci/code_checks.sh lint
if: always()

- name: Checks on imported code
run: |
source activate pandas-dev
ci/code_checks.sh code
run: ci/code_checks.sh code
if: always()

- name: Running doctests
run: |
source activate pandas-dev
ci/code_checks.sh doctests
run: ci/code_checks.sh doctests
if: always()

- name: Docstring validation
run: |
source activate pandas-dev
ci/code_checks.sh docstrings
run: ci/code_checks.sh docstrings
if: always()

- name: Typing validation
run: |
source activate pandas-dev
ci/code_checks.sh typing
run: ci/code_checks.sh typing
if: always()

- name: Testing docstring validation script
run: |
source activate pandas-dev
pytest --capture=no --strict-markers scripts
run: pytest --capture=no --strict-markers scripts
if: always()

- name: Running benchmarks
run: |
source activate pandas-dev
cd asv_bench
asv check -E existing
git remote add upstream https://github.com/pandas-dev/pandas.git
Expand Down Expand Up @@ -106,7 +113,6 @@ jobs:
run: |
source activate pandas-dev
python web/pandas_web.py web/pandas --target-path=web/build

- name: Build documentation
run: |
source activate pandas-dev
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/enhancingperf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ We've gotten another big improvement. Let's check again where the time is spent:

.. ipython:: python

%%prun -l 4 apply_integrate_f(df["a"].to_numpy(), df["b"].to_numpy(), df["N"].to_numpy())
%prun -l 4 apply_integrate_f(df["a"].to_numpy(), df["b"].to_numpy(), df["N"].to_numpy())

As one might expect, the majority of the time is now spent in ``apply_integrate_f``,
so if we wanted to make anymore efficiencies we must continue to concentrate our
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.8.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ New plotting methods
Vytautas Jancauskas, the 2012 GSOC participant, has added many new plot
types. For example, ``'kde'`` is a new option:

.. ipython:: python
.. code-block:: python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fangchenli do you remember why you needed to make this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It caused an error while using incubator. But I didn't get the incubator to work for the doc build. I probably should revert it as well.

>>>-------------------------------------------------------------------------
Exception in /home/runner/work/pandas/pandas/doc/source/whatsnew/v0.8.0.rst at block ending on line 201
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-65b822729fc4> in <module>
----> 1 plt.figure()

NameError: name 'plt' is not defined
<<<-------------------------------------------------------------------------


s = pd.Series(
np.concatenate((np.random.randn(1000), np.random.randn(1000) * 0.5 + 3))
Expand Down