Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flake8 #2

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: python
sudo: false

branches:
only:
- master

python:
- 3.6
- 2.7
- 3.5

install:
- pip install . flake8 pytest-flake8 flake8-docstrings flake8-import-order #no need for e since here we only want to install

script:
- pytest --flake8
1 change: 1 addition & 0 deletions hugs/calc/met.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from __future__ import division

import warnings

import numpy as np


Expand Down
Binary file not shown.
Binary file not shown.
5 changes: 2 additions & 3 deletions hugs/calc/tests/test_met.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

def test_speed():
"""Test calculating wind speed."""
u = np.array([4., 2.,0., 0.])
v = np.array([0.,2., 4., 0.])
u = np.array([4., 2., 0., 0.])
v = np.array([0., 2., 4., 0.])

speed = get_wind_speed(u, v)

Expand Down Expand Up @@ -46,5 +46,4 @@ def test_dir():
# '''test the arning is required when wind direction > 360.'''
# with pytest.warning(UserWarning)


#testing if an exception has Raised
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 95
ignore = F403
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'author_email': 'kd5wxb@gmail.com',
'version': '0.1',
'install_requires': ['numpy', 'matplotlib'],
'packages': ['hugs'],
'packages': ['hugs', 'hugs.calc', 'hugs.plots'],
'scripts': [],
'name': 'hugs'
}
Expand Down