From d8fc7e40a198ac221d69e328d6fee0a2a981548e Mon Sep 17 00:00:00 2001 From: Charlotte Weaver Date: Thu, 14 Mar 2019 12:08:46 -0700 Subject: [PATCH] Support python3.7 (#645) * Support python3.7 * add 3.7 env to travis --- .travis.yml | 20 +++++++++----------- makefile | 2 +- server/requirements.txt | 1 + setup.py | 10 +--------- travis-build.sh | 5 +++++ 5 files changed, 17 insertions(+), 21 deletions(-) create mode 100755 travis-build.sh diff --git a/.travis.yml b/.travis.yml index fd83efb7..12aa5e8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: python -python: - - "3.6" +dist: xenial +sudo: required node_js: - - "8" + - 8 cache: pip: true install: @@ -15,14 +15,12 @@ install: jobs: include: - - name: "Branch Tests" - script: - - set -eo pipefail - - flake8 server - - black --check - - npm run --prefix client/ build - - npm run --prefix client/ unit-test - - pytest -s server/test + - name: "Branch Tests 3.7" + python: "3.7" + script: ./travis-build.sh + - name: "Branch Tests 3.6" + python: "3.6" + script: ./travis-build.sh - name: "Smoke Tests" if: branch = master AND type = cron script: diff --git a/makefile b/makefile index 5239601b..323aeaa5 100644 --- a/makefile +++ b/makefile @@ -123,6 +123,6 @@ install-release : uninstall @echo "Installed cellxgene from pypi.org" uninstall : - yes | pip uninstall cellxgene || true + pip uninstall -y cellxgene || : .PHONY : install install-dev install-release-test install-release uninstall diff --git a/server/requirements.txt b/server/requirements.txt index 00913583..3640bff6 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -12,3 +12,4 @@ pandas>=0.23.1 scanpy>=1.3.2 scipy>=1.1.0 scikit-learn>=0.19.1,!=0.20.0 +tables>=3.5.1 diff --git a/setup.py b/setup.py index c4d51d57..d34cf367 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,4 @@ from setuptools import setup, find_packages -import sys - -if sys.version_info[0:2] != (3, 6): - raise ImportError( - "cellxgene currently only supports python 3.6. Python 3.7 is known to fail; we will look at supporting " - "versions other than 3.6 in the future." - "See https://github.com/chanzuckerberg/cellxgene#conda-and-virtual-environments " - "for more help with installation." - ) with open("README.md", "rb") as fh: long_description = fh.read().decode() @@ -40,6 +31,7 @@ setup( "Programming Language :: JavaScript", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Bio-Informatics", ], diff --git a/travis-build.sh b/travis-build.sh new file mode 100755 index 00000000..9f043d0e --- /dev/null +++ b/travis-build.sh @@ -0,0 +1,5 @@ +set -eo pipefail +flake8 server +npm run --prefix client/ build +npm run --prefix client/ unit-test +pytest -s server/test