rlworkgroup / akro

Spaces types for reinforcement learning
MIT License
11 stars 4 forks source link

Fix flake8 failure from importing theano.tensor as TT. #17

Closed krzentner closed 5 years ago

codecov-io commented 5 years ago

Codecov Report

Merging #17 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #17   +/-   ##
=======================================
  Coverage   71.59%   71.59%           
=======================================
  Files          17       17           
  Lines         352      352           
=======================================
  Hits          252      252           
  Misses        100      100
Impacted Files Coverage Δ
src/akro/theano/_util.py 100% <100%> (ø) :arrow_up:

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 cfcda67...65ca831. Read the comment docs.

ryanjulian commented 5 years ago

Why remove the coverage?

krzentner commented 5 years ago

pytest-cov doesn't seem to be working on python 3.5, and I would like the CI to work. Are we doing something different for garage? Alternatively, is there an easy way to fix the coverage or only check it for python 3.6?

ryanjulian commented 5 years ago

garage is organized as an application with a single canonical Python version (specified in environment.yml), so we don't have a Python version testing matrix for it.

akro is library, so we test it on a matrix of Python version >= 3.5. Right now that's 3.5 and 3.6, since 3.7 is a bit bleeding edge for some libraries. It's also significantly easier to set this up for akro than garage.

You're right that we only need really coverage data for a single run in the testing matrix.

In this case, Travis induces a testing matrix from the stanza:

python:
  - "3.5"
  - "3.6"

You can access which element of the matrix you're in using environment variables. So I think in this case the best quick fix is to see if we're in Python 3.5 and run non-coverage testing.

script:
  # ...
  - |
    if [[ "${TRAVIS_PYTHON_VERSION}" == "3.5" ]]; then
      pytest
    else
      pytest --cov=akro
    fi

# ...

after_script:
  - |
    if [[ "${TRAVIS_PYTHON_VERSION}" != "3.5" ]]; then
      coverage xml
      bash <(curl -s https://codecov.io/bash)
      coveralls
    fi
  #...
ryanjulian commented 5 years ago

ah i think this fix might not work because pytest is trying to load all installed plugins before execution, rather than just choosing what you use. i will do some spelunking.

ryanjulian commented 5 years ago

FTFY

ryanjulian commented 5 years ago

I suggest you rebase-merge