Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Setup Travis and correct setup.py #8

Merged
merged 6 commits into from
Feb 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that PEP 561 changed it's guidelines here. I suppose we should also rename this repository?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name (the distribution name) doesn't impact PEP 561 compliance. The package name is the real decider; when this repo starts using my PEP 561 implementation in mypy, it will need to rename the numpy package to numpy-stubs, and make according changes. Happy to do those changes when it is time.

maintainer="NumPy Developers",
maintainer_email="[email protected]",
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