From 72513155a663f73ecbdcdc28ea787aafc7618553 Mon Sep 17 00:00:00 2001 From: James Lamb <jaylamb20@gmail.com> Date: Fri, 28 Dec 2018 09:39:59 -0600 Subject: [PATCH 1/4] Added Travis setup (fixes #1) --- .gitignore | 1 + .travis.yml | 9 +++++++++ setup.py | 22 ++++++++++++++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index c7a6668..fb7c701 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ nosetests.xml coverage.xml *,cover .hypothesis/ +.pytest_cache/ # Translations *.mo diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9440601 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +os: + - linux +python: 3.5 +install: + - python setup.py install --user + +script: + - python -m pytest diff --git a/setup.py b/setup.py index 51be88a..24f9dd6 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,22 @@ import setuptools -with open('README.md', 'r') as f: +with open("README.md", "r") as f: my_long_description = f.read() + +documentation_packages = [] +regular_packages = [ + "click", + "mlflow", + "pandas", + "pillow", + "tensorflow", + "tensorflow_hub" +] +testing_packages = [ + "pytest" +] + setuptools.setup( name="autofocus", version="0.1.0", @@ -15,6 +29,10 @@ long_description=my_long_description, packages=setuptools.find_packages(), + test_suite="tests", - install_requires=['click', 'mlflow', 'pandas', 'pillow', 'tensorflow', 'tensorflow_hub'] + install_requires=regular_packages, + extras_require={ + "testing": testing_packages + regular_packages + } ) From 5476844c3c6b764a7258e3cc5f9d44875e2499df Mon Sep 17 00:00:00 2001 From: James Lamb <jaylamb20@gmail.com> Date: Fri, 28 Dec 2018 09:45:53 -0600 Subject: [PATCH 2/4] bumped CI to 3.6 --- .travis.yml | 4 ++-- setup.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9440601..130ceb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: python os: - linux -python: 3.5 +python: 3.6 install: - - python setup.py install --user + - python setup.py install script: - python -m pytest diff --git a/setup.py b/setup.py index 24f9dd6..d258452 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,7 @@ name="autofocus", version="0.1.0", url="https://github.com/UptakeOpenSource/autofocus", + python_requires='>=3.6.0', author="Greg Gandenberger", author_email="gsganden@gmail.com", From e593f5bd795aae741b3502d5d43fbb539720f77a Mon Sep 17 00:00:00 2001 From: James Lamb <jaylamb20@gmail.com> Date: Fri, 28 Dec 2018 09:58:40 -0600 Subject: [PATCH 3/4] a few more tweaks to Travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 130ceb3..ca40bb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: python os: - linux -python: 3.6 +python: + - 3.6 install: - python setup.py install From 85130b0b11b2a0a8b09450d0e837f293765db412 Mon Sep 17 00:00:00 2001 From: James Lamb <jaylamb20@gmail.com> Date: Fri, 28 Dec 2018 10:11:26 -0600 Subject: [PATCH 4/4] tried to add OSX setup on Travis --- .travis.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca40bb9..ddb31b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,30 @@ -language: python -os: - - linux -python: - - 3.6 + +# Stuff shared by all builds install: - python setup.py install - script: - python -m pytest + +matrix: + include: + + - language: python + os: linux + python: 3.6 + + # This is actually a py3.6 + Mac OSX build (with conda). + # The mac + python version pairings for Travis are weird, + # and as of this writing 3.6 isn't supported. For more, see + # https://docs.travis-ci.com/user/multi-os/#python-example-unsupported-languages + - os: osx + language: generic + before_install: + - wget https://repo.continuum.io/miniconda/Miniconda3-4.3.21-MacOSX-x86_64.sh -O miniconda.sh + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - hash -r + - conda config --set always_yes yes --set changeps1 no + - conda update -q conda + - conda info -a + - conda create -q -n testenv python=3.6.1 nose pytest + - source activate testenv