Skip to content

CI: adding cython coverage #43660

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

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 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
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
Copy link
Member

Choose a reason for hiding this comment

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

can this go in the coverage section of setup.cfg?

Copy link
Member Author

Choose a reason for hiding this comment

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

tried that in another repo. it has it be in .coveragerc

Copy link
Member

Choose a reason for hiding this comment

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

OK, if this file is re-introduced, then probably should move the coverage stuff currently in setup.cfg (which currently includes this Cython.Coverage line)

Copy link
Member

Choose a reason for hiding this comment

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

tried that in another repo. it has it be in .coveragerc

Are you sure? I just did a test run locally after building using --with-cython-coverage and it seemed to work fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

you're right. my bad!

Copy link
Member

Choose a reason for hiding this comment

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

Great can you move to setup.cfg then?

plugins = Cython.Coverage
2 changes: 1 addition & 1 deletion .github/actions/build_pandas/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ runs:

- name: Build Pandas
run: |
python setup.py build_ext -j 2
python setup.py build_ext -j 2 --with-cython-coverage
python -m pip install -e . --no-build-isolation --no-use-pep517
shell: bash -l {0}
2 changes: 1 addition & 1 deletion .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Build Pandas
run: |
python setup.py build_ext -q -j2
python setup.py build_ext -q -j2 --with-cython-coverage
python -m pip install -e . --no-build-isolation --no-use-pep517

- name: Build Version
Expand Down
2 changes: 1 addition & 1 deletion ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ conda list pandas
# Make sure any error below is reported as such

echo "[Build extensions]"
python setup.py build_ext -q -j2
python setup.py build_ext -q -j2 --with-cython-coverage
Copy link
Member

Choose a reason for hiding this comment

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

im pretty sure we dont want this on every build, since it slows things down a lot.

Copy link
Member Author

Choose a reason for hiding this comment

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

makes sense.. would you know why the build is failing though?

Copy link
Member

Choose a reason for hiding this comment

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

pandas/_libs/algos.c: In function ‘__pyx_fuse_0__pyx_f_6pandas_5_libs_5algos_rank_sorted_1d.isra.0.constprop’:
pandas/_libs/algos.c:1023:34: error: ‘__pyx_gilstate_save’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
1023 | #define __Pyx_PyGILState_Release PyGILState_Release
| ^~~~~~~~~~~~~~~~~~
pandas/_libs/algos.c:73649:20: note: ‘__pyx_gilstate_save’ was declared here
73649 | PyGILState_STATE __pyx_gilstate_save;


echo "[Updating pip]"
python -m pip install --no-deps -U pip wheel setuptools
Expand Down