Skip to content

Commit

Permalink
Setup Travis and correct setup.py (numpy#8)
Browse files Browse the repository at this point in the history
* Replace tab in setup.py with spaces

* Add Travis

* Add flake8 config to pass tests

* Use `-` instead of `_`

See python/peps#568

* Add Travis badge to README

* Use numpy 1.14.0
  • Loading branch information
Alan Du authored and alanhdu committed Feb 18, 2018
1 parent cf16064 commit b814fac
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.mypy_cache
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -11,8 +11,8 @@
packages=find_packages(),

# PEP 561 requires these
install_requires=['numpy~=1.13.0'],
install_requires=['numpy~=1.14.0'],
package_data={
'numpy': 'py.typed'
'numpy': 'py.typed'
},
)
3 changes: 3 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
flake8==3.3.0

mypy==0.560.0

0 comments on commit b814fac

Please sign in to comment.