From 5bd04d0c2c76906e160069386ef5a80921a2a234 Mon Sep 17 00:00:00 2001 From: Alistair Miles Date: Tue, 6 Nov 2018 11:38:06 -0500 Subject: [PATCH 1/4] rework requirements --- .travis.yml | 1 - appveyor.yml | 1 + requirements.txt | 1 + requirements_dev.txt | 33 +-------------------------------- requirements_test.txt | 8 ++++++++ tox.ini | 1 + 6 files changed, 12 insertions(+), 33 deletions(-) create mode 100644 requirements_test.txt diff --git a/.travis.yml b/.travis.yml index 54865cff..906bcf47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ matrix: install: - pip install -U tox-travis coveralls pip setuptools wheel - - pip install -r requirements_dev.txt - python setup.py build_ext --inplace script: diff --git a/appveyor.yml b/appveyor.yml index 96c8ebc2..376d1cf2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,6 +46,7 @@ build: off test_script: - "%CMD_IN_ENV% python -m pip install -U pip setuptools wheel" - "%CMD_IN_ENV% python -m pip install -rrequirements_dev.txt" + - "%CMD_IN_ENV% python -m pip install -rrequirements_test.txt" - "%CMD_IN_ENV% python setup.py build_ext --inplace" - "%CMD_IN_ENV% python -m pytest -v numcodecs" diff --git a/requirements.txt b/requirements.txt index b813046c..543bfb43 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +cython numpy msgpack pytest diff --git a/requirements_dev.txt b/requirements_dev.txt index 32c2cda3..4a50a0d4 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,34 +1,3 @@ -appdirs==1.4.3 -args==0.1.0 -certifi==2017.7.27.1 -chardet==3.0.4 -clint==0.5.1 -coverage==4.4.1 -coveralls==1.2.0 Cython==0.29 -docopt==0.6.2 -fasteners==0.14.1 -flake8==3.5.0 -idna==2.6 -mccabe==0.6.1 -monotonic==1.3 msgpack==0.5.6 -numpy==1.15.3 -packaging==16.8 -pkginfo==1.4.1 -pluggy==0.5.2 -py==1.4.34 -pycodestyle==2.3.1 -pyflakes==1.6.0 -pyparsing==2.2.0 -pytest==3.2.3 -pytest-cov==2.5.1 -requests==2.18.4 -requests-toolbelt==0.8.0 -setuptools-scm==1.15.6 -tox==2.9.1 -tox-travis==0.8 -tqdm==4.19.4 -twine==1.9.1 -urllib3==1.22 -virtualenv==15.1.0 +numpy==1.15.4 diff --git a/requirements_test.txt b/requirements_test.txt new file mode 100644 index 00000000..abdc250c --- /dev/null +++ b/requirements_test.txt @@ -0,0 +1,8 @@ +coverage +coveralls +flake8 +pytest +pytest-cov +setuptools +setuptools-scm +tox diff --git a/tox.ini b/tox.ini index f71d33d8..70936374 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,7 @@ commands = deps = py27: backports.lzma -rrequirements_dev.txt + -rrequirements_test.txt [testenv:docs] basepython = python2.7 From 248ac31bced256ed1c4b53917479cf8a37513f39 Mon Sep 17 00:00:00 2001 From: Alistair Miles Date: Tue, 6 Nov 2018 12:20:37 -0500 Subject: [PATCH 2/4] fix flake8 --- numcodecs/tests/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numcodecs/tests/common.py b/numcodecs/tests/common.py index 76068564..0a18f101 100644 --- a/numcodecs/tests/common.py +++ b/numcodecs/tests/common.py @@ -12,7 +12,7 @@ from numcodecs.compat import buffer_tobytes, ndarray_from_buffer -from numcodecs import * # flake8: noqa +from numcodecs.registry import get_codec greetings = [u'¡Hola mundo!', u'Hej Världen!', u'Servus Woid!', u'Hei maailma!', From 5a934ec047046340c4fde4a39dfb62372a6b2b50 Mon Sep 17 00:00:00 2001 From: Alistair Miles Date: Tue, 6 Nov 2018 12:22:35 -0500 Subject: [PATCH 3/4] pip freeze to log environment --- .travis.yml | 1 + appveyor.yml | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 906bcf47..feb2d5f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ matrix: install: - pip install -U tox-travis coveralls pip setuptools wheel - python setup.py build_ext --inplace + - pip freeze script: - tox diff --git a/appveyor.yml b/appveyor.yml index 376d1cf2..8a212559 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,14 +40,15 @@ environment: install: - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - git submodule update --init --recursive - -build: off - -test_script: - "%CMD_IN_ENV% python -m pip install -U pip setuptools wheel" - "%CMD_IN_ENV% python -m pip install -rrequirements_dev.txt" - "%CMD_IN_ENV% python -m pip install -rrequirements_test.txt" - "%CMD_IN_ENV% python setup.py build_ext --inplace" + - "%CMD_IN_ENV% python -m pip freeze" + +build: off + +test_script: - "%CMD_IN_ENV% python -m pytest -v numcodecs" after_test: From 7399d9dfd9504bd4b5a3ccddcd995d4d694b16fd Mon Sep 17 00:00:00 2001 From: Alistair Miles Date: Tue, 6 Nov 2018 18:15:10 -0500 Subject: [PATCH 4/4] fix repr tests --- numcodecs/tests/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/numcodecs/tests/common.py b/numcodecs/tests/common.py index 0a18f101..0e61e418 100644 --- a/numcodecs/tests/common.py +++ b/numcodecs/tests/common.py @@ -13,6 +13,8 @@ from numcodecs.compat import buffer_tobytes, ndarray_from_buffer from numcodecs.registry import get_codec +# star import needed for repr tests so eval finds names +from numcodecs import * # noqa greetings = [u'¡Hola mundo!', u'Hej Världen!', u'Servus Woid!', u'Hei maailma!',