Skip to content
Permalink
Browse files

replace flake8 by code style

  • Loading branch information...
sdpython committed Apr 14, 2018
1 parent b610a60 commit 02dea3aa1676ecb92c2c1fb0356a47c78cc98f4d
@@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/python:3.6.2
- image: circleci/python:3.6.4

working_directory: ~/repo

@@ -18,8 +18,8 @@ jobs:
name: Install pandoc
command: |
sudo apt-get update
wget https://github.com/jgm/pandoc/releases/download/1.19.2.1/pandoc-1.19.2.1-1-amd64.deb
sudo dpkg -i pandoc-1.19.2.1-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/2.1.3/pandoc-2.1.3-1-amd64.deb
sudo dpkg -i pandoc-2.1.3-1-amd64.deb
- run:
name: Install tex
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import sys
import os
import datetime
@@ -1,4 +1,4 @@
#-*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""
@brief test log(time=21s)
"""
@@ -26,9 +26,9 @@
from pyquickhelper.pycode import check_pep8


class TestFlake8(unittest.TestCase):
class TestCodeStyle(unittest.TestCase):

def test_flake8_src(self):
def test_code_style_src(self):
fLOG(
__file__,
self._testMethodName,
@@ -37,14 +37,14 @@ def test_flake8_src(self):
if sys.version_info[0] == 2 or "Anaconda" in sys.executable \
or "condavir" in sys.executable:
warnings.warn(
"skipping test_flake8 because of Python 2 or " + sys.executable)
"skipping test_code_style because of Python 2 or " + sys.executable)
return

thi = os.path.abspath(os.path.dirname(__file__))
src_ = os.path.normpath(os.path.join(thi, "..", "..", "src"))
check_pep8(src_, fLOG=fLOG, ignore=('E501', 'E265', 'E721'))

def test_flake8_test(self):
def test_code_style_test(self):
fLOG(
__file__,
self._testMethodName,
@@ -53,7 +53,7 @@ def test_flake8_test(self):
if sys.version_info[0] == 2 or "Anaconda" in sys.executable \
or "condavir" in sys.executable:
warnings.warn(
"skipping test_flake8 because of Python 2 or " + sys.executable)
"skipping test_code_style because of Python 2 or " + sys.executable)
return

thi = os.path.abspath(os.path.dirname(__file__))
@@ -1,4 +1,4 @@
#-*- encoding: utf-8 -*-
# -*- encoding: utf-8 -*-
"""
@file
@brief Ways to speed up predictions for a machine learned model.
@@ -109,33 +109,33 @@ def compile_c_function(code_c, nbout, dtype=numpy.float32, add_header=True,
if additional_paths is None:
additional_paths = []

#~ if len(additional_paths) == 0 and sys.platform.startswith("win") and \
#~ 'VSSDK140Install' not in os.environ: # last condition is for the installed VisualStudio.
#~ if fLOG:
# ~ if len(additional_paths) == 0 and sys.platform.startswith("win") and \
# ~ 'VSSDK140Install' not in os.environ: # last condition is for the installed VisualStudio.
# ~ if fLOG:
#~ fLOG("[compile_c_function] fix PATH for VS2017 on Windows")
#~ # Update environment variables.
#~ adds = [r"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64",
#~ r"C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64"]
#~ vcvars64 = os.path.join(adds[0], 'vcvars64.bat')
# ~ # Update environment variables.
# ~ adds = [r"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64",
# ~ r"C:\Program Files (x86)\Windows Kits\10\bin\10.0.15063.0\x64"]
# ~ vcvars64 = os.path.join(adds[0], 'vcvars64.bat')
#~ subprocess.run(vcvars64)

#~ # Add paths for VS2017.
#~ includes = [r'C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared',
# ~ # Add paths for VS2017.
# ~ includes = [r'C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared',
#~ r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include',
#~ r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\SDK\ScopeCppSDK\SDK\include\ucrt']
#~ libs = [r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64',
# ~ r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\SDK\ScopeCppSDK\SDK\include\ucrt']
# ~ libs = [r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\amd64',
#~ r'C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\um\x64',
#~ r'C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\ucrt\x64']
#~ opaths = os.environ['PATH'].split(';')
#~ for add in adds:
#~ if os.path.exists(add) and add not in opaths:
# ~ r'C:\Program Files (x86)\Windows Kits\10\Lib\10.0.15063.0\ucrt\x64']
# ~ opaths = os.environ['PATH'].split(';')
# ~ for add in adds:
# ~ if os.path.exists(add) and add not in opaths:
#~ additional_paths.append(add)
#~ oinc = os.environ.get('INCLUDE', '').split(';')
#~ for inc in includes:
#~ if os.path.exists(inc) and inc not in oinc:
# ~ oinc = os.environ.get('INCLUDE', '').split(';')
# ~ for inc in includes:
# ~ if os.path.exists(inc) and inc not in oinc:
#~ include_paths.append(inc)
#~ for lib in libs:
#~ if os.path.exists(lib):
# ~ for lib in libs:
# ~ if os.path.exists(lib):
#~ lib_paths.append(lib)

if additional_paths:

0 comments on commit 02dea3a

Please sign in to comment.
You can’t perform that action at this time.