Skip to content

Commit

Permalink
add missing dependencies (#124)
Browse files Browse the repository at this point in the history
* add  missing dependencies

* create setup test in ci

* add make init to ci config

* remove --user config in make init

* remove --q argument in install script

* quick fix print error in python3

* remove sudo in ci for pyyaml
  • Loading branch information
bwanglzu committed May 27, 2018
1 parent dbcb7e7 commit 11d5b8e
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 45 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Expand Up @@ -2,6 +2,10 @@ language: python
python:
- "2.7"
- "3.6"
sudo: enabled
script: make test
sudo: false
script:
- make init
- make test
env: PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR/tests:$TRAVIS_BUILD_DIR/matchzoo
install:
- python setup.py install
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
init:
pip install -r requirements.txt --user
pip install -r requirements.txt

test:
pytest tests/ --ignore=tests/inte_tests/ --cov matchzoo/ --cov-report term-missing --cov-config .coveragerc
Expand Down
4 changes: 2 additions & 2 deletions matchzoo/models/matchsrnn.py
Expand Up @@ -23,11 +23,11 @@ def __init__(self, config):
'embed', 'embed_size', 'vocab_size', 'channal', 'dropout_rate']
self.embed_trainable = config['train_embed']
self.channel = config['channel']
print self.channel
print(self.channel)
self.setup(config)
if not self.check():
raise TypeError('[MatchSRNN] parameter check wrong')
print '[MatchSRNN] init done'
print('[MatchSRNN] init done')

def setup(self, config):
if not isinstance(config, dict):
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Expand Up @@ -5,6 +5,9 @@ numpy >= 1.12.1
six >= 1.10.0
h5py >= 2.7.0
tqdm >= 4.19.4
scipy >= 1.0.0
matplotlib >= 2.2.0
jieba >= 0.39
coverage >= 4.3.4
codecov >= 2.0.15
pytest >= 3.0.3
Expand Down
96 changes: 56 additions & 40 deletions setup.py
@@ -1,40 +1,56 @@
import os
from setuptools import setup, find_packages

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding= 'utf').read()

setup(
name = "MatchZoo",
version = "0.2.0",
author = "Yixing Fan, Liang Pang, Jianpeng Hou, Jiafeng Guo, Yanyan Lan, Xueqi Cheng",
author_email = "fanyixing@software.ict.ac.cn",
description = ("MatchZoo is a toolkit for text matching. It was developed with a focus on facilitating the designing, comparing and sharing of deep text matching models."),
license = "BSD",
keywords = "text matching models",
url = "https://github.com/faneshion/MatchZoo",
packages=find_packages(),#['data', 'docs', 'examples', 'matchzoo', 'tests'],
#long_description=read('README.md'),
classifiers=[
# How mature is this project? Common values are
"Development Status :: 3 - Alpha",
'Environment :: Console',
'Operating System :: POSIX :: Linux',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
"License :: OSI Approved :: Apache License",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
install_requires=[
'keras >= 2.0.5',
'tensorflow >= 1.1.0',
'nltk >= 3.2.3',
'numpy >= 1.12.1',
'six >= 1.10.0',
'h5py >= 2.7.0',
'tqdm >= 4.19.4'
]
)
import os
from setuptools import setup, find_packages


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf').read()


setup(
name="MatchZoo",
version="0.2.0",
author="Yixing Fan, Liang Pang, Jianpeng Hou, Jiafeng Guo, Yanyan Lan, Xueqi Cheng",
author_email="fanyixing@software.ict.ac.cn",
description=("MatchZoo is a toolkit for text matching. It was developed with a focus on facilitating the designing, comparing and sharing of deep text matching models."),
license="BSD",
keywords="text matching models",
url="https://github.com/faneshion/MatchZoo",
# ['data', 'docs', 'examples', 'matchzoo', 'tests'],
packages=find_packages(),
# long_description=read('README.md'),
classifiers=[
# How mature is this project? Common values are
"Development Status :: 3 - Alpha",
'Environment :: Console',
'Operating System :: POSIX :: Linux',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
"License :: OSI Approved :: Apache License",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
install_requires=[
'keras >= 2.0.5',
'tensorflow >= 1.1.0',
'nltk >= 3.2.3',
'numpy >= 1.12.1',
'six >= 1.10.0',
'h5py >= 2.7.0',
'tqdm >= 4.19.4',
'scipy >= 1.0.0',
'jieba >= 0.39'
],
extras_require={
'visualize': ['matplotlib >= 2.2.0'],
'tests': [
'coverage >= 4.3.4',
'codecov >= 2.0.15',
'pytest >= 3.0.3',
'pytest-cov >= 2.4.0',
'mock >= 2.0.0',
'flake8 >= 3.2.1',
'flake8_docstrings >= 1.0.2'],
}
)

0 comments on commit 11d5b8e

Please sign in to comment.