Skip to content

Commit a972c4b

Browse files
committed
setup for lint, shift python versions
1 parent 6536b1c commit a972c4b

File tree

7 files changed

+46
-12
lines changed

7 files changed

+46
-12
lines changed

.github/workflows/build.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: [2.7, 3.6, 3.7, 3.8]
17+
python-version: [3.6, 3.7, 3.8, 3.9]
1818
os: [ubuntu-latest, macos-latest, windows-latest]
1919

2020
steps:
@@ -29,6 +29,10 @@ jobs:
2929
python -m pip install -e .[dev]
3030
python -m pip install -U wheel twine setuptools
3131
32+
- name: Lint
33+
run: |
34+
python -m flake8 ffn setup.py
35+
3236
- name: Test
3337
run: |
3438
python -m nose --with-coverage --cover-package bt

.github/workflows/deploy.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
16-
python-version: [2.7, 3.6, 3.7, 3.8]
16+
python-version: [3.6, 3.7, 3.8, 3.9]
1717

1818
steps:
1919
- uses: actions/checkout@v2
@@ -27,6 +27,10 @@ jobs:
2727
python -m pip install -e .[dev]
2828
python -m pip install -U wheel twine setuptools
2929
30+
- name: Lint
31+
run: |
32+
python -m flake8 ffn setup.py
33+
3034
- name: Test
3135
run: |
3236
python -m nose --with-coverage --cover-package bt

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ global-exclude *.pyd
1212
global-exclude *.pyc
1313
global-exclude .git*
1414
global-exclude .DS_Store
15+
global-exclude .mypy_cache

Makefile

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@ TMPREPO=/tmp/docs/bt
22

33
default: build_dev
44

5-
.PHONY: dist upload docs pages serve klink notebooks
5+
.PHONY: dist upload docs pages serve klink notebooks test lint fix
6+
7+
test:
8+
python -m nose --with-coverage --cover-package bt
9+
10+
lint:
11+
python -m flake8 bt setup.py
12+
13+
fix:
14+
python -m black bt setup.py
15+
616

717
dist:
818
python setup.py sdist

bt/core.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
Contains the core building blocks of the framework.
33
"""
44
from __future__ import division
5-
from future.utils import iteritems
5+
66
import math
77
from copy import deepcopy
88

9-
import pandas as pd
10-
import numpy as np
119
import cython as cy
12-
10+
import numpy as np
11+
import pandas as pd
12+
from future.utils import iteritems
1313

1414
PAR = 100.
1515
TOL = 1e-16

setup.cfg

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[bdist_wheel]
2+
universal=1
3+
4+
[metadata]
5+
description_file = README.rst
6+
7+
[flake8]
8+
ignore=E203, W503
9+
max-line-length=180
10+
per-file-ignores=
11+
bt/__init__.py:F401,F403

setup.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from setuptools import setup
2-
from setuptools.extension import Extension
31
import codecs
42
import os
53
import re
64

5+
from setuptools import setup
6+
from setuptools.extension import Extension
7+
78

89
def local_file(filename):
910
return codecs.open(
@@ -43,20 +44,23 @@ def local_file(filename):
4344
license='MIT',
4445
install_requires=[
4546
'ffn>=0.3.5',
46-
'pyprind>=2.10'
47+
'pyprind>=2.11'
4748
],
4849
extras_require={
4950
'dev': [
51+
"black>=20.8b1",
5052
'codecov',
5153
'coverage',
5254
'cython>=0.25',
55+
"flake8",
56+
"flake8-black",
5357
'future',
5458
'mock',
5559
'nose',
5660
'numpy>=1',
5761
'pandas>=0.19',
58-
'matplotlib>=2,<3',
59-
'ffn>=0.3.4',
62+
'matplotlib>=2',
63+
'ffn>=0.3.5',
6064
'pyprind>=2.11',
6165
],
6266
},

0 commit comments

Comments
 (0)