From b7cd5ed576c38d97fac2c72e89d37d6d0e4cd47b Mon Sep 17 00:00:00 2001 From: Alan Du Date: Thu, 15 Feb 2018 18:05:22 -0500 Subject: [PATCH 1/6] Replace tab in setup.py with spaces --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d3ce124..5843699 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,6 @@ # PEP 561 requires these install_requires=['numpy~=1.13.0'], package_data={ - 'numpy': 'py.typed' + 'numpy': 'py.typed' }, ) From 8151159bdf989ecd0ea5377d04b43d00f291c7d6 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Thu, 15 Feb 2018 18:06:50 -0500 Subject: [PATCH 2/6] Add Travis --- .gitignore | 1 + .travis.yml | 17 +++++++++++++++++ test-requirements.txt | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 test-requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d7f7a42 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.mypy_cache diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..56e670d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: python +python: 3.6 + +notifications: + email: false + +install: +- pip install -r test-requirements.txt +- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install flake8-pyi==17.3.0; fi + +script: +- flake8 +- MYPYPATH="." mypy tests/test_simple.py + +cache: + directories: + - "$HOME/.cache/pip" diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..5c8d95b --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,3 @@ +flake8==3.3.0 + +mypy==0.560.0 From de8de3968a8043f6d7058429b6c6d27eb4e1af07 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Thu, 15 Feb 2018 18:10:33 -0500 Subject: [PATCH 3/6] Add flake8 config to pass tests --- setup.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..c41dd87 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,9 @@ +# Ignore the following errors (for stubs): +# E301 expected 1 blank line, found 0 +# E302 expected 2 blank lines, found 1 +# E305 expected 2 blank lines after class or function definition, found 1 +# E701 multiple statements on one line (colon) +# E704 multiple statements on one line (def) + +[flake8] +ignore = E301, E302, E305, E701, E704 From efc4bd86adaa5ee7f906352b0f48604a78337537 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Sat, 17 Feb 2018 19:44:44 -0500 Subject: [PATCH 4/6] Use `-` instead of `_` See https://github.com/python/peps/pull/568 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5843699..30fb31c 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup( - name='numpy_stubs', + name='numpy-stubs', maintainer="NumPy Developers", maintainer_email="numpy-discussion@python.org", description="PEP 561 type stubs for numpy", From 3a60b08912c23433a7dafec5f6c1088fda1353c1 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Sat, 17 Feb 2018 20:13:25 -0500 Subject: [PATCH 5/6] Add Travis badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 50530fb..72331bd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # numpy_stubs: experimental typing stubs for NumPy +[![Build Status](https://travis-ci.org/numpy/numpy_stubs.svg?branch=master)](https://travis-ci.org/numpy/numpy_stubs) + This repository exists for developing [PEP 484](https://www.python.org/dev/peps/pep-0484/) compatible typing annotations for [NumPy](https://github.com/numpy/numpy). From bd71995c5f822bce30cdd93d262c3b6c71f596f9 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Sat, 17 Feb 2018 20:15:46 -0500 Subject: [PATCH 6/6] Use numpy 1.14.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 30fb31c..14ff408 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ packages=find_packages(), # PEP 561 requires these - install_requires=['numpy~=1.13.0'], + install_requires=['numpy~=1.14.0'], package_data={ 'numpy': 'py.typed' },