10000 [BLD] enable cython coverage, use cythonize by jbrockmendel · Pull Request #21879 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

[BLD] enable cython coverage, use cythonize #21879

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 12 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
lint cleanups
  • Loading branch information
jbrockmendel committed Jul 14, 2018
commit 96c0d37e550d826b876bb54e386fab6b57ad150a
5 changes: 0 additions & 5 deletions .coveragerc
10000
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ exclude_lines =
if 0:
if __name__ == .__main__.:

# Workaround for cython misreporting def/cpdef/cdef lines
# https://github.com/cython/cython/issues/1461
^cdef
^cpdef

ignore_errors = False
show_missing = True

Expand Down
4 changes: 2 additions & 2 deletions pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1591,8 +1591,8 @@ cdef class _Period(object):
return value

def __setstate__(self, state):
self.freq=state[1]
self.ordinal=state[2]
self.freq = state[1]
self.ordinal = state[2]

def __reduce__(self):
object_state = None, self.freq, self.ordinal
Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/util.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from numpy cimport ndarray, NPY_C_CONTIGUOUS, NPY_F_CONTIGUOUS
from numpy cimport ndarray
cimport numpy as cnp
cnp.import_array()

Expand Down
3 changes: 3 additions & 0 deletions setup.py
8000
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def get_tag(self):
# "linetrace" (with a Truthy value)
linetrace = os.environ.get('linetrace', False)
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah this need to be uppercase and should be like PANDAS_CYTHON_COVERAGE or somesuch

CYTHON_TRACE = str(int(bool(linetrace)))
# TODO: Maybe make this a CLI option for build_ext?
Copy link
Contributor

Choose a reason for hiding this comment

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

can you create an issue for this


# Note: if not using `cythonize`, coverage can be enabled by
# pinning `ext.cython_directives = directives` to each ext in extensions.
Expand All @@ -449,6 +450,8 @@ def get_tag(self):
# ----------------------------------------------------------------------
# Specification of Dependencies

# TODO: Need to check to see if e.g. `linetrace` has changed and possibly
# re-compile.
def maybe_cythonize(extensions, *args, **kwargs):
"""
Render tempita templates before calling cythonize
Expand Down
0