Skip to content

Commit df2ccef

Browse files
authored
[BLD] enable cython coverage, use cythonize (#21879)
* enable cython coverage, use cythonize * coverage misreporting workaround * lint cleanups * post-merge cleanup * remove unnecessary pxdfiles * fix signature of dummy cythonize * change env variable * remove comment, making an issue for it
1 parent f11738b commit df2ccef

File tree

6 files changed

+82
-94
lines changed

6 files changed

+82
-94
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[run]
33
branch = False
44
omit = */tests/*
5+
plugins = Cython.Coverage
56

67
[report]
78
# Regexes for lines to exclude from consideration
@@ -22,6 +23,7 @@ exclude_lines =
2223
if __name__ == .__main__.:
2324

2425
ignore_errors = False
26+
show_missing = True
2527

2628
[html]
2729
directory = coverage_html_report

pandas/_libs/tslibs/period.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,8 +1655,8 @@ cdef class _Period(object):
16551655
return value
16561656

16571657
def __setstate__(self, state):
1658-
self.freq=state[1]
1659-
self.ordinal=state[2]
1658+
self.freq = state[1]
1659+
self.ordinal = state[2]
16601660

16611661
def __reduce__(self):
16621662
object_state = None, self.freq, self.ordinal

pandas/_libs/src/util.pxd renamed to pandas/_libs/tslibs/util.pxd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from numpy cimport ndarray, NPY_C_CONTIGUOUS, NPY_F_CONTIGUOUS
1+
from numpy cimport ndarray
22
cimport numpy as cnp
33
cnp.import_array()
44

@@ -64,7 +64,7 @@ cdef inline bint is_datetime64_object(object obj) nogil:
6464

6565
# --------------------------------------------------------------------
6666

67-
cdef extern from "numpy_helper.h":
67+
cdef extern from "../src/numpy_helper.h":
6868
void set_array_not_contiguous(ndarray ao)
6969

7070
int assign_value_1d(ndarray, Py_ssize_t, object) except -1
@@ -87,7 +87,7 @@ ctypedef fused numeric:
8787
cnp.float32_t
8888
cnp.float64_t
8989

90-
cdef extern from "headers/stdint.h":
90+
cdef extern from "../src/headers/stdint.h":
9191
enum: UINT8_MAX
9292
enum: UINT16_MAX
9393
enum: UINT32_MAX

pandas/_libs/util.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from tslibs.util cimport *

pandas/_libs/window.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ from numpy cimport ndarray, double_t, int64_t, float64_t
1313
cnp.import_array()
1414

1515

16-
cdef extern from "../src/headers/cmath" namespace "std":
16+
cdef extern from "src/headers/cmath" namespace "std":
1717
int signbit(double) nogil
1818
double sqrt(double x) nogil
1919

0 commit comments

Comments
 (0)