Skip to content

Commit

Permalink
Add flake8, fix it up, refine travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Nov 24, 2018
1 parent 2c2db89 commit 441eaa0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
8 changes: 6 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[flake8]
ignore = D203
ignore =
D203,
C901
exclude =
.git,
__pycache__,
epregressions/diffs/math_diff.py,
epregressions/diffs/mycsv.py,
epregressions/diffs/table_diff.py,
epregressions/diffs/thresh_dict.py,
old,
build,
dist
max-complexity = 20
max-line-length = 120
max-line-length = 120
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,20 @@ install:
- pip install --upgrade pip
- pip install -r requirements.txt

matrix:
include:
name: "2.7 Unit Test"
python: "2.7"
env: TEST_COMMAND=test
- name: "3.6 Unit Tests"
python: "3.6"
env: TEST_COMMAND=test
- name: "3.6 Code Quality"
python: "3.6"
env: TEST_COMMAND=flake8

script:
- coverage run setup.py test
- coverage run setup.py $TEST_COMMAND

after_success:
- coveralls
1 change: 0 additions & 1 deletion epregressions/builds/makefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,3 @@ def get_build_tree(self):
'weather_dir': os.path.join(self.source_directory, 'weather'),
'data_sets_dir': os.path.join(self.source_directory, 'datasets')
}

11 changes: 4 additions & 7 deletions epregressions/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import gi
gi.require_version('Gdk', '3.0') # unfortunately these have to go before the import
gi.require_version("Gtk", "3.0")
from gi.repository import Gdk, Gtk, GObject
from gi.repository import Gdk, Gtk, GObject # noqa

path = os.path.dirname(__file__)
script_dir = os.path.abspath(path)
Expand Down Expand Up @@ -1542,18 +1542,15 @@ def gui_update_label_for_run_config(self):
current_config = self.force_run_type
if current_config == ForceRunType.NONE:
self.suite_dir_struct_info.set_markup(
"A 'Tests' directory will be created in each run directory.\n" +
" Comparison results will be in run directory 1."
"A 'Tests' dir will be created in each run directory. Comparison results will be in run dir 1."
)
elif current_config == ForceRunType.DD:
self.suite_dir_struct_info.set_markup(
"A 'Tests-DDOnly' directory will be created in each run directory.\n" + # TODO: Clean this out
" Comparison results will be in run directory 1."
"A 'Tests-DDOnly' dir will be created in each run directory. Comparison results will be in run dir 1."
)
elif current_config == ForceRunType.ANNUAL:
self.suite_dir_struct_info.set_markup(
"A 'Tests-Annual' directory will be created in each run directory.\n" +
" Comparison results will be in run directory 1."
"A 'Tests-Annual' dir will be created in each run directory. Comparison results will be in run dir 1."
)
else:
pass # gonna go ahead and say this won't happen
Expand Down
1 change: 0 additions & 1 deletion epregressions/tests/resources/dummy.energyplus.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/usr/bin/env python

0 comments on commit 441eaa0

Please sign in to comment.