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

Python 3 compatibility and flake8 #111

Merged
merged 2 commits into from
Oct 18, 2017
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
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# use http://lint.travis-ci.org/ to check the file.

language: python

sudo: required
Expand All @@ -12,7 +10,6 @@ env:
global:
- 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="


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

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

Expand All @@ -78,7 +74,7 @@ script:
fi

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

- if [[ $TEST_TARGET == 'docs' ]]; then
Expand Down
8 changes: 4 additions & 4 deletions Examples/Sample 1.1.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
__author__ = 'stephanie'
from __future__ import (absolute_import, division, print_function)

import sys
import os
from odm2api.ODMconnection import dbconnection
import pprint
from odm2api.ODM1_1_1.services import SeriesService

__author__ = 'stephanie'

this_file = os.path.realpath(__file__)
directory = os.path.dirname(this_file)
sys.path.insert(0, directory)
Expand Down Expand Up @@ -92,6 +95,3 @@
pp.pprint(odm1service.get_values_by_series(ser[0].id))

print "The end"



4 changes: 2 additions & 2 deletions Examples/Sample.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = 'stephanie'

from __future__ import (absolute_import, division, print_function)

__author__ = 'stephanie'

#import matplotlib.pyplot as plt

Expand Down
3 changes: 2 additions & 1 deletion Forms/clsDBConfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)

###########################################################################
## Python code generated with wxFormBuilder (version Jun 5 2014)
Expand Down
4 changes: 3 additions & 1 deletion Forms/frmDBConfig.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import (absolute_import, division, print_function)

"""Subclass of clsDBConfiguration, which is generated by wxFormBuilder."""

import wx
Expand Down Expand Up @@ -55,7 +57,7 @@ def OnBtnTest(self, event):


def OnBtnSave(self, event):

self.parent.EndModal(wx.ID_OK)


Expand Down
7 changes: 4 additions & 3 deletions odm2api/ODM2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from odm2api.base import serviceBase
from odm2api.base import modelBase
from __future__ import (absolute_import, division, print_function)

from odm2api.base import modelBase, serviceBase

__all__ = [
'serviceBase',
'modelBase',
]
]
Loading