Skip to content

Commit

Permalink
Update Travis build to use multiple Python versions 🛠️
Browse files Browse the repository at this point in the history
  • Loading branch information
chomechome committed Jul 14, 2021
1 parent dae41e2 commit 32a983d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ language: python

python:
- 3.6
- 3.7
- 3.8

install:
- "pip install -U pip"
- "pip install poetry"
- "poetry install --no-interaction"
- "poetry install -E tf --no-interaction --no-ansi"

jobs:
include:
- stage: codestyle
python: 3.6
script:
- "make lint"
- stage: test
python: 3.6
script:
- "make test"
- stage: coverage
python: 3.6
script:
- "make coverage"
4 changes: 2 additions & 2 deletions maru/resource/rnn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def load_tags() -> Dict[int, Tag]:
def load_tagger() -> 'tensorflow.keras.Model':
try:
import tensorflow.keras
except ModuleNotFoundError:
except ModuleNotFoundError as e:
raise ImportError(
'RNN tagger requires TensorFlow. You can install it with "pip install maru[tf]"'
)
) from e
# this restrains tensorflow from allocating all of available GPU memory
config = tensorflow.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
Expand Down

0 comments on commit 32a983d

Please sign in to comment.