Skip to content

Commit 98c5b88

Browse files
sinhrksjreback
authored andcommitted
BLD: Use tempita for cython templating
closes #13399 Author: sinhrks <[email protected]> Closes #13716 from sinhrks/tempita and squashes the following commits: 09f63b6 [sinhrks] BLD: Use tempita for cython templating
1 parent 690d52c commit 98c5b88

13 files changed

+13188
-12707
lines changed

ci/lint.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,26 @@ if [ "$LINT" ]; then
2323
for path in 'window.pyx'
2424
do
2525
echo "linting -> pandas/$path"
26-
flake8 pandas/$path --filename '*.pyx' --select=E501,E302,E203,E226,E111,E114,E221,E303,E128,E231,E126,E128
26+
flake8 pandas/$path --filename '*.pyx' --select=E501,E302,E203,E226,E111,E114,E221,E303,E128,E231,E126
2727
if [ $? -ne "0" ]; then
2828
RET=1
2929
fi
3030

3131
done
3232
echo "Linting *.pyx DONE"
3333

34+
echo "Linting *.pxi.in"
35+
for path in 'src'
36+
do
37+
echo "linting -> pandas/$path"
38+
flake8 pandas/$path --filename '*.pxi.in' --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
39+
if [ $? -ne "0" ]; then
40+
RET=1
41+
fi
42+
43+
done
44+
echo "Linting *.pxi.in DONE"
45+
3446
echo "Check for invalid testing"
3547
grep -r -E --include '*.py' --exclude nosetester.py --exclude testing.py '(numpy|np)\.testing' pandas
3648
if [ $? = "0" ]; then

pandas/algos.pyx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cdef float64_t FP_ERR = 1e-13
1313
cimport util
1414

1515
from libc.stdlib cimport malloc, free
16+
from libc.string cimport memmove
1617

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

4344
# this is our util.pxd
44-
from util cimport numeric
45+
from util cimport numeric, get_nat
4546

47+
cimport lib
48+
from lib cimport is_null_datetimelike
4649
from pandas import lib
4750

51+
cdef int64_t iNaT = get_nat()
52+
4853
cdef:
4954
int TIEBREAK_AVERAGE = 0
5055
int TIEBREAK_MIN = 1
@@ -1334,5 +1339,11 @@ cdef inline float64_t _median_linear(float64_t* a, int n):
13341339

13351340
return result
13361341

1342+
13371343
include "join.pyx"
1338-
include "generated.pyx"
1344+
1345+
# generated from template
1346+
include "algos_common_helper.pxi"
1347+
include "algos_groupby_helper.pxi"
1348+
include "algos_join_helper.pxi"
1349+
include "algos_take_helper.pxi"

0 commit comments

Comments
 (0)