Skip to content

Commit

Permalink
BLD: fix linting wrt to pandas-dev#15537, changes in location of pand…
Browse files Browse the repository at this point in the history
…as/src
  • Loading branch information
jreback committed Mar 8, 2017
1 parent d32acaa commit 27ca44a
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 47 deletions.
8 changes: 4 additions & 4 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RET=0

if [ "$LINT" ]; then

# pandas/src is C code, so no need to search there.
# pandas/_libs/src is C code, so no need to search there.
echo "Linting *.py"
flake8 pandas --filename=*.py --exclude pandas/src
flake8 pandas --filename=*.py --exclude pandas/_libs/src
if [ $? -ne "0" ]; then
RET=1
fi
Expand Down Expand Up @@ -46,8 +46,8 @@ if [ "$LINT" ]; then
echo "Linting *.c and *.h"
for path in '*.h' 'period_helper.c' 'datetime' 'parser' 'ujson'
do
echo "linting -> pandas/src/$path"
cpplint --quiet --extensions=c,h --headers=h --filter=-readability/casting,-runtime/int,-build/include_subdir --recursive pandas/src/$path
echo "linting -> pandas/_libs/src/$path"
cpplint --quiet --extensions=c,h --headers=h --filter=-readability/casting,-runtime/int,-build/include_subdir --recursive pandas/_libs/src/$path
if [ $? -ne "0" ]; then
RET=1
fi
Expand Down
6 changes: 3 additions & 3 deletions pandas/_libs/src/datetime/np_datetime.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This file is derived from NumPy 1.7. See NUMPY_LICENSE.txt
*/

#ifndef PANDAS_SRC_DATETIME_NP_DATETIME_H_
#define PANDAS_SRC_DATETIME_NP_DATETIME_H_
#ifndef PANDAS__LIBS_SRC_DATETIME_NP_DATETIME_H_
#define PANDAS__LIBS_SRC_DATETIME_NP_DATETIME_H_

#include <numpy/ndarraytypes.h>

Expand Down Expand Up @@ -124,4 +124,4 @@ convert_datetime_to_datetimestruct(pandas_datetime_metadata *meta,
PANDAS_DATETIMEUNIT get_datetime64_unit(PyObject *obj);


#endif // PANDAS_SRC_DATETIME_NP_DATETIME_H_
#endif // PANDAS__LIBS_SRC_DATETIME_NP_DATETIME_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/datetime/np_datetime_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ This file implements string parsing and creation for NumPy datetime.
*/

#ifndef PANDAS_SRC_DATETIME_NP_DATETIME_STRINGS_H_
#define PANDAS_SRC_DATETIME_NP_DATETIME_STRINGS_H_
#ifndef PANDAS__LIBS_SRC_DATETIME_NP_DATETIME_STRINGS_H_
#define PANDAS__LIBS_SRC_DATETIME_NP_DATETIME_STRINGS_H_

/*
* Parses (almost) standard ISO 8601 date strings. The differences are:
Expand Down Expand Up @@ -103,4 +103,4 @@ make_iso_8601_datetime(pandas_datetimestruct *dts, char *outstr, int outlen,
int local, PANDAS_DATETIMEUNIT base, int tzoffset,
NPY_CASTING casting);

#endif // PANDAS_SRC_DATETIME_NP_DATETIME_STRINGS_H_
#endif // PANDAS__LIBS_SRC_DATETIME_NP_DATETIME_STRINGS_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/datetime_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Distributed under the terms of the BSD Simplified License.
The full license is in the LICENSE file, distributed with this software.
*/

#ifndef PANDAS_SRC_DATETIME_HELPER_H_
#define PANDAS_SRC_DATETIME_HELPER_H_
#ifndef PANDAS__LIBS_SRC_DATETIME_HELPER_H_
#define PANDAS__LIBS_SRC_DATETIME_HELPER_H_

#include <stdio.h>
#include "datetime.h"
Expand All @@ -33,4 +33,4 @@ npy_float64 total_seconds(PyObject *td) {
return (microseconds + (seconds + days_in_seconds) * 1000000.0) / 1000000.0;
}

#endif // PANDAS_SRC_DATETIME_HELPER_H_
#endif // PANDAS__LIBS_SRC_DATETIME_HELPER_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Distributed under the terms of the BSD Simplified License.
The full license is in the LICENSE file, distributed with this software.
*/

#ifndef PANDAS_SRC_HELPER_H_
#define PANDAS_SRC_HELPER_H_
#ifndef PANDAS__LIBS_SRC_HELPER_H_
#define PANDAS__LIBS_SRC_HELPER_H_

#ifndef PANDAS_INLINE
#if defined(__GNUC__)
Expand All @@ -22,4 +22,4 @@ The full license is in the LICENSE file, distributed with this software.
#endif
#endif

#endif // PANDAS_SRC_HELPER_H_
#endif // PANDAS__LIBS_SRC_HELPER_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/numpy_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Distributed under the terms of the BSD Simplified License.
The full license is in the LICENSE file, distributed with this software.
*/

#ifndef PANDAS_SRC_NUMPY_HELPER_H_
#define PANDAS_SRC_NUMPY_HELPER_H_
#ifndef PANDAS__LIBS_SRC_NUMPY_HELPER_H_
#define PANDAS__LIBS_SRC_NUMPY_HELPER_H_

#include "Python.h"
#include "helper.h"
Expand Down Expand Up @@ -159,4 +159,4 @@ PANDAS_INLINE PyObject* unbox_if_zerodim(PyObject* arr) {
}
}

#endif // PANDAS_SRC_NUMPY_HELPER_H_
#endif // PANDAS__LIBS_SRC_NUMPY_HELPER_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/parse_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Distributed under the terms of the BSD Simplified License.
The full license is in the LICENSE file, distributed with this software.
*/

#ifndef PANDAS_SRC_PARSE_HELPER_H_
#define PANDAS_SRC_PARSE_HELPER_H_
#ifndef PANDAS__LIBS_SRC_PARSE_HELPER_H_
#define PANDAS__LIBS_SRC_PARSE_HELPER_H_

#include <errno.h>
#include <float.h>
Expand Down Expand Up @@ -270,4 +270,4 @@ static double xstrtod(const char *str, char **endptr, char decimal, char sci,
return number;
}

#endif // PANDAS_SRC_PARSE_HELPER_H_
#endif // PANDAS__LIBS_SRC_PARSE_HELPER_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/parser/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Distributed under the terms of the BSD Simplified License.
The full license is in the LICENSE file, distributed with this software.
*/

#ifndef PANDAS_SRC_PARSER_IO_H_
#define PANDAS_SRC_PARSER_IO_H_
#ifndef PANDAS__LIBS_SRC_PARSER_IO_H_
#define PANDAS__LIBS_SRC_PARSER_IO_H_

#include "Python.h"
#include "tokenizer.h"
Expand Down Expand Up @@ -83,4 +83,4 @@ void *buffer_file_bytes(void *source, size_t nbytes, size_t *bytes_read,
void *buffer_rd_bytes(void *source, size_t nbytes, size_t *bytes_read,
int *status);

#endif // PANDAS_SRC_PARSER_IO_H_
#endif // PANDAS__LIBS_SRC_PARSER_IO_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/parser/tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ See LICENSE for the license
*/

#ifndef PANDAS_SRC_PARSER_TOKENIZER_H_
#define PANDAS_SRC_PARSER_TOKENIZER_H_
#ifndef PANDAS__LIBS_SRC_PARSER_TOKENIZER_H_
#define PANDAS__LIBS_SRC_PARSER_TOKENIZER_H_

#include <errno.h>
#include <stdio.h>
Expand Down Expand Up @@ -276,4 +276,4 @@ double round_trip(const char *p, char **q, char decimal, char sci, char tsep,
int skip_trailing);
int to_boolean(const char *item, uint8_t *val);

#endif // PANDAS_SRC_PARSER_TOKENIZER_H_
#endif // PANDAS__LIBS_SRC_PARSER_TOKENIZER_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/period_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Cython to pandas. This primarily concerns interval representation and
frequency conversion routines.
*/

#ifndef PANDAS_SRC_PERIOD_HELPER_H_
#define PANDAS_SRC_PERIOD_HELPER_H_
#ifndef PANDAS__LIBS_SRC_PERIOD_HELPER_H_
#define PANDAS__LIBS_SRC_PERIOD_HELPER_H_

#include <Python.h>
#include "headers/stdint.h"
Expand Down Expand Up @@ -188,4 +188,4 @@ int get_yq(npy_int64 ordinal, int freq, int *quarter, int *year);

void initialize_daytime_conversion_factor_matrix(void);

#endif // PANDAS_SRC_PERIOD_HELPER_H_
#endif // PANDAS__LIBS_SRC_PERIOD_HELPER_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/skiplist.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Port of Wes McKinney's Cython version of Raymond Hettinger's original pure
Python recipe (http://rhettinger.wordpress.com/2010/02/06/lost-knowledge/)
*/

#ifndef PANDAS_SRC_SKIPLIST_H_
#define PANDAS_SRC_SKIPLIST_H_
#ifndef PANDAS__LIBS_SRC_SKIPLIST_H_
#define PANDAS__LIBS_SRC_SKIPLIST_H_

#include <math.h>
#include <stdio.h>
Expand Down Expand Up @@ -287,4 +287,4 @@ PANDAS_INLINE int skiplist_remove(skiplist_t *skp, double value) {
return 1;
}

#endif // PANDAS_SRC_SKIPLIST_H_
#endif // PANDAS__LIBS_SRC_SKIPLIST_H_
6 changes: 3 additions & 3 deletions pandas/_libs/src/ujson/lib/ultrajson.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ tree doesn't have cyclic references.
*/

#ifndef PANDAS_SRC_UJSON_LIB_ULTRAJSON_H_
#define PANDAS_SRC_UJSON_LIB_ULTRAJSON_H_
#ifndef PANDAS__LIBS_SRC_UJSON_LIB_ULTRAJSON_H_
#define PANDAS__LIBS_SRC_UJSON_LIB_ULTRAJSON_H_

#include <stdio.h>
#include <wchar.h>
Expand Down Expand Up @@ -307,4 +307,4 @@ EXPORTFUNCTION JSOBJ JSON_DecodeObject(JSONObjectDecoder *dec,
const char *buffer, size_t cbBuffer);
EXPORTFUNCTION void encode(JSOBJ, JSONObjectEncoder *, const char *, size_t);

#endif // PANDAS_SRC_UJSON_LIB_ULTRAJSON_H_
#endif // PANDAS__LIBS_SRC_UJSON_LIB_ULTRAJSON_H_
8 changes: 4 additions & 4 deletions pandas/_libs/src/ujson/python/py_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ESN SOCIAL SOFTWARE AB OR JONAS TARNSTROM BE LIABLE
DISCLAIMED. IN NO EVENT SHALL ESN SOCIAL SOFTWARE AB OR JONAS TARNSTROM BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
Expand All @@ -35,8 +35,8 @@ Numeric decoder derived from from TCL library
* Copyright (c) 1994 Sun Microsystems, Inc.
*/

#ifndef PANDAS_SRC_UJSON_PYTHON_PY_DEFINES_H_
#define PANDAS_SRC_UJSON_PYTHON_PY_DEFINES_H_
#ifndef PANDAS__LIBS_SRC_UJSON_PYTHON_PY_DEFINES_H_
#define PANDAS__LIBS_SRC_UJSON_PYTHON_PY_DEFINES_H_

#include <Python.h>

Expand All @@ -55,4 +55,4 @@ Numeric decoder derived from from TCL library

#endif

#endif // PANDAS_SRC_UJSON_PYTHON_PY_DEFINES_H_
#endif // PANDAS__LIBS_SRC_UJSON_PYTHON_PY_DEFINES_H_
8 changes: 4 additions & 4 deletions pandas/_libs/src/ujson/python/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ESN SOCIAL SOFTWARE AB OR JONAS TARNSTROM BE LIABLE
DISCLAIMED. IN NO EVENT SHALL ESN SOCIAL SOFTWARE AB OR JONAS TARNSTROM BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
Expand All @@ -35,9 +35,9 @@ Numeric decoder derived from from TCL library
* Copyright (c) 1994 Sun Microsystems, Inc.
*/

#ifndef PANDAS_SRC_UJSON_PYTHON_VERSION_H_
#define PANDAS_SRC_UJSON_PYTHON_VERSION_H_
#ifndef PANDAS__LIBS_SRC_UJSON_PYTHON_VERSION_H_
#define PANDAS__LIBS_SRC_UJSON_PYTHON_VERSION_H_

#define UJSON_VERSION "1.33"

#endif // PANDAS_SRC_UJSON_PYTHON_VERSION_H_
#endif // PANDAS__LIBS_SRC_UJSON_PYTHON_VERSION_H_
2 changes: 1 addition & 1 deletion test.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:: test on windows

pytest --skip-slow --skip-network pandas
pytest --skip-slow --skip-network pandas %*
2 changes: 1 addition & 1 deletion test_fast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# https://github.com/pytest-dev/pytest/issues/1075
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')

pytest pandas --skip-slow --skip-network -m "not single" -n 4
pytest pandas --skip-slow --skip-network -m "not single" -n 4 "$@"

0 comments on commit 27ca44a

Please sign in to comment.