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

[FIX][ENH] Travis #34

Merged
merged 2 commits into from Dec 18, 2017

Conversation

Projects
None yet
4 participants
@jerneju
Copy link
Contributor

commented Dec 18, 2017

Issue

Travis does not work.

Description of changes

Doctests are disabled.

Includes
  • Code changes
  • Tests
  • Documentation

@jerneju jerneju force-pushed the jerneju:travis branch 9 times, most recently from 2e130a1 to 4f36e6c Dec 18, 2017

@codecov-io

This comment has been minimized.

Copy link

commented Dec 18, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@c12932b). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #34   +/-   ##
=========================================
  Coverage          ?   67.02%           
=========================================
  Files             ?        7           
  Lines             ?      643           
  Branches          ?       99           
=========================================
  Hits              ?      431           
  Misses            ?      158           
  Partials          ?       54

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c12932b...c633e55. Read the comment docs.

@jerneju jerneju changed the title [ENH] Travis [FIX][ENH] Travis Dec 18, 2017

@@ -75,5 +75,6 @@ def load_tests(loader, tests, ignore):
# This follows the load_tests protocol
# https://docs.python.org/3/library/unittest.html#load-tests-protocol
import orangecontrib
tests.addTests(suite(orangecontrib.timeseries))
# TODO:
# tests.addTests(suite(orangecontrib.timeseries))

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Disagree with this.

This comment has been minimized.

Copy link
@jerneju

jerneju Dec 18, 2017

Author Contributor

rst files fail

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Could the failing tests be fixed instead? When I last reviewed them, the failures didn't seem like needing a lot of work.

This comment has been minimized.

Copy link
@jerneju

jerneju Dec 18, 2017

Author Contributor

Sure, I am planning to fix them. But that is the next phase. Wait until this PR is finished.

This comment has been minimized.

Copy link
@astaric

astaric Dec 18, 2017

Member

What about setting up travis integration on your own fork, making it work there and opening a PR when it works?

@jerneju jerneju force-pushed the jerneju:travis branch from 5da9a1a to fe03554 Dec 18, 2017

@jerneju jerneju changed the title [FIX][ENH] Travis [WIP][FIX][ENH] Travis Dec 18, 2017

@jerneju jerneju force-pushed the jerneju:travis branch 2 times, most recently from 9d0aa3f to 9b69f42 Dec 18, 2017

@jerneju jerneju changed the title [WIP][FIX][ENH] Travis [FIX][ENH] Travis Dec 18, 2017

@kernc
Copy link
Member

left a comment

Got some issues with the first commit. Much thanks for tending to this, though! 👍

.travis.yml Outdated
- $HOME/.cache/pip
- $HOME/.ccache
- $HOME/nltk_data
- $TRAVIS_BUILD_DIR/pyqt

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

This block is not needed.

.travis.yml Outdated
- $TRAVIS_BUILD_DIR/pyqt

before_cache: # prevent logs from caching
- rm -f $HOME/.cache/pip/log/debug.log

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

One achieves the same with cache: pip: false, or by installing our sw with python setup.py install instead of pip. Try the latter.

.travis.yml Outdated
- pip install -U setuptools pip wheel
- pip install codecov
# Gensim (2.2.0) requires numpy>=1.11.3 but cannot update it itself?
- pip install -U numpy
- mkdir -p /home/travis/.local/share/Orange # create orange app dir

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

This is Timeseries and what is this?

.travis.yml Outdated

install:
- travis_wait pip install -e .
- source $TRAVIS_BUILD_DIR/.travis/install_pyqt.sh

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

No. Just pip install PyQt5 AnyQt if they aren't specified as dependencies for some reason. Should pip-install cleanly on Python 3.5.

setup.py Outdated
top_level_dir='.')

extra_setuptools_args = dict(
test_suite='setup.discover_tests'

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Is it a problem to always set this, regardless of 'test' in sys.argv? When possible, simplify.

@@ -65,7 +65,7 @@ using :func:`interpolate_timeseries` function:

>>> interpolated = interpolate_timeseries(data, method='cubic')
>>> interpolated[7:11].Y
array([ 151.22663433, 146.80661022, 137.77326894, 127.15995178])
array([ 151.2271691 , 146.80723481, 137.77371598, 127.16013142])

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Call interpolated[7:11].Y.round(2) to avoid this in future?

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Or set np.set_printoptions(precision=1) somewhere at the top.

@@ -146,7 +146,7 @@ We can also output the prediction as a :class:`Timeseries` object:
[Air passengers (forecast), Air passengers (95%CI low), Air passengers (95%CI high)]
>>> np.set_printoptions(precision=1)

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

And then remove it here.

.travis.yml Outdated
@@ -18,11 +18,19 @@ cache:
ccache: true

before_install:
- source $TRAVIS_BUILD_DIR/.travis/util.sh

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Remove.

@@ -0,0 +1,14 @@

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

File no longer used.

.travis.yml Outdated
before_script: # required for widget tests
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start

script:
- coverage run setup.py test

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

Think you can just do here:

catchsegv xvfb-run -a -s "-screen 0 1280x1024x24" coverage run setup.py test

Then you don't need before_script.

.travis.yml Outdated
- pip install -U setuptools pip wheel
- pip install codecov

install:
- travis_wait pip install -e .
- pip install PyQt5 AnyQt
- python setup.py develop # assure version.py is present; required for imports

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

version.py? From this repo? Line not needed?

>>> interpolated[7:11].Y
array([ 151.22663433, 146.80661022, 137.77326894, 127.15995178])
>>> interpolated[7:11].Y.round(2)
array([ 151.2271691 , 146.80723481, 137.77371598, 127.16013142])

This comment has been minimized.

Copy link
@kernc

kernc Dec 18, 2017

Member

With np.set_printoptions(precision=1) above, shouldn't this repr rounded to 1 decimal?

@jerneju jerneju force-pushed the jerneju:travis branch 3 times, most recently from 46f0dad to 44ab914 Dec 18, 2017

jerneju added some commits Dec 18, 2017

@jerneju jerneju force-pushed the jerneju:travis branch from 44ab914 to c633e55 Dec 18, 2017

@kernc

kernc approved these changes Dec 18, 2017

@kernc

This comment has been minimized.

Copy link
Member

commented Dec 18, 2017

Much thanks!

@kernc kernc merged commit 7490f39 into biolab:master Dec 18, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jerneju jerneju deleted the jerneju:travis branch Dec 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.