Skip to content

BLD: Use tempita for cython templating #13716

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 1 commit into from
Closed
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
14 changes: 13 additions & 1 deletion ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,26 @@ if [ "$LINT" ]; then
for path in 'window.pyx'
do
echo "linting -> pandas/$path"
flake8 pandas/$path --filename '*.pyx' --select=E501,E302,E203,E226,E111,E114,E221,E303,E128,E231,E126,E128
flake8 pandas/$path --filename '*.pyx' --select=E501,E302,E203,E226,E111,E114,E221,E303,E128,E231,E126
Copy link
Member Author

@sinhrks sinhrks Jul 21, 2016

Choose a reason for hiding this comment

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

E128 is duplicated, thus removed.

if [ $? -ne "0" ]; then
RET=1
fi

done
echo "Linting *.pyx DONE"

echo "Linting *.pxi.in"
for path in 'src'
do
echo "linting -> pandas/$path"
flake8 pandas/$path --filename '*.pxi.in' --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
if [ $? -ne "0" ]; then
RET=1
fi

done
echo "Linting *.pxi.in DONE"

echo "Check for invalid testing"
grep -r -E --include '*.py' --exclude nosetester.py --exclude testing.py '(numpy|np)\.testing' pandas
if [ $? = "0" ]; then
Expand Down
15 changes: 13 additions & 2 deletions pandas/algos.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cdef float64_t FP_ERR = 1e-13
cimport util

from libc.stdlib cimport malloc, free
from libc.string cimport memmove

from numpy cimport NPY_INT8 as NPY_int8
from numpy cimport NPY_INT16 as NPY_int16
Expand Down Expand Up @@ -41,10 +42,14 @@ cdef extern from "src/headers/math.h":
double fabs(double) nogil

# this is our util.pxd
from util cimport numeric
from util cimport numeric, get_nat

cimport lib
from lib cimport is_null_datetimelike
from pandas import lib

cdef int64_t iNaT = get_nat()

cdef:
int TIEBREAK_AVERAGE = 0
int TIEBREAK_MIN = 1
Expand Down Expand Up @@ -1334,5 +1339,11 @@ cdef inline float64_t _median_linear(float64_t* a, int n):

return result


include "join.pyx"
include "generated.pyx"

# generated from template
include "algos_common_helper.pxi"
include "algos_groupby_helper.pxi"
include "algos_join_helper.pxi"
include "algos_take_helper.pxi"
Loading