Skip to content

Commit 1cdf2e2

Browse files
authored
Merge pull request #111 from ocefpaf/py3k
Python 3 compatibility and flake8
2 parents 1010c1e + 19f5f2f commit 1cdf2e2

29 files changed

+1189
-1527
lines changed

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# use http://lint.travis-ci.org/ to check the file.
2-
31
language: python
42

53
sudo: required
@@ -12,7 +10,6 @@ env:
1210
global:
1311
- secure: "ckOXS/SsEQGGI6XrdJbEhImPbMyB8HBIqGWJ7CkYKezKTTyuJ510LMAK/7xFLyMQ0rXIrHVpCZsGLsAuzK+h2D0/xQTvkLlxJkTkKwKnm6HKg6fOrbEVSAOzCKYAdP+nBpNLGA/kzMW26E+MSWuFQwc7JiKj36vW9uUgRiT8Knwl9YrfRG+Et1bWJIfbfNoBy2gP3eFXyLBKOcgR0E0y2dyst/uRwkkEn9m8as+PWc3zsVaFS6qf5L4OFMLI5z/EZiNXiu5B/AUvpesWT/OXsbpwnxShska3RXZIh+0exu8euop7Oi4o07PI7EasMtncWzjWKLB6hJaz/BRfS/fjH0/Isy64OUXCIaCwQew31e2uW/liYnlNY/PDJfiVYdbMR34YLLrstCdBjHG+l29eN0VrCKrhW9RDPVW5eKZD1EsQPUgEDpYHaigJBwuAguQ0/MMaZ7Z/DVOR4yUsNlKFO7VwdUL4+lQ3mHrdUAEhuZACncZJ03wouvtyiuGC2WPnPAvk97uHwUcJl7Mq/jTy7HrnTRytHVIHZ8LsymAaGL2ukjVLlJ8ex8/36v2glQEkPAT06f9JXkbWJRzutnDiFKli96shMM17qyl2rjjFdC+fVDm7L7xsgJDAgXAuhD9Wwj3iVo/fcz7SmcH+iEekRtgqwbzaT3MbmLRpS4tOarY="
1412

15-
1613
# Removing the directory will remove the env but leave the cached packages
1714
# at $HOME/miniconda/pkgs. That is a win-win because when re-creating the
1815
# env we will download only the new packages.
@@ -67,7 +64,6 @@ before_install:
6764
- conda create --name TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt
6865
- source activate TEST
6966

70-
# Test source distribution.
7167
install:
7268
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install odm2api-${version}.tar.gz && popd
7369

@@ -78,7 +74,7 @@ script:
7874
fi
7975

8076
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
81-
find . -type f -name "*.py" ! -name 'conf.py' | xargs flake8 --max-line-length=100 ;
77+
find . -type f -name "*.py" ! -name 'conf.py' ! -name '_version.py' ! -name 'versioneer.py' | xargs flake8 --max-line-length=110 ;
8278
fi
8379

8480
- if [[ $TEST_TARGET == 'docs' ]]; then

Examples/Sample 1.1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
__author__ = 'stephanie'
1+
from __future__ import (absolute_import, division, print_function)
2+
23
import sys
34
import os
45
from odm2api.ODMconnection import dbconnection
56
import pprint
67
from odm2api.ODM1_1_1.services import SeriesService
78

9+
__author__ = 'stephanie'
10+
811
this_file = os.path.realpath(__file__)
912
directory = os.path.dirname(this_file)
1013
sys.path.insert(0, directory)
@@ -92,6 +95,3 @@
9295
pp.pprint(odm1service.get_values_by_series(ser[0].id))
9396

9497
print "The end"
95-
96-
97-

Examples/Sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
__author__ = 'stephanie'
2-
1+
from __future__ import (absolute_import, division, print_function)
32

3+
__author__ = 'stephanie'
44

55
#import matplotlib.pyplot as plt
66

Forms/clsDBConfig.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: utf-8 -*-
2+
from __future__ import (absolute_import, division, print_function)
23

34
###########################################################################
45
## Python code generated with wxFormBuilder (version Jun 5 2014)

Forms/frmDBConfig.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import (absolute_import, division, print_function)
2+
13
"""Subclass of clsDBConfiguration, which is generated by wxFormBuilder."""
24

35
import wx
@@ -55,7 +57,7 @@ def OnBtnTest(self, event):
5557

5658

5759
def OnBtnSave(self, event):
58-
60+
5961
self.parent.EndModal(wx.ID_OK)
6062

6163

odm2api/ODM2/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from odm2api.base import serviceBase
2-
from odm2api.base import modelBase
1+
from __future__ import (absolute_import, division, print_function)
2+
3+
from odm2api.base import modelBase, serviceBase
34

45
__all__ = [
56
'serviceBase',
67
'modelBase',
7-
]
8+
]

0 commit comments

Comments
 (0)