mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-22 20:48:11 +08:00
Initial packaging working
pip install works if client files are built and moved manually
This commit is contained in:
@@ -44,3 +44,8 @@ server/app/web/static/css/
|
||||
server/app/web/static/img/
|
||||
server/app/web/static/js/
|
||||
server/app/web/templates/index\.html
|
||||
|
||||
|
||||
*.egg-info
|
||||
dist/*
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
recursive-include server/app/web/templates *
|
||||
recursive-include server/app/web/static *
|
||||
@@ -13,7 +13,6 @@ Compress(app)
|
||||
CORS(app)
|
||||
|
||||
# Config
|
||||
CONFIG_FILE = os.environ.get("CXG_CONFIG_FILE", default="scanpy-test.cfg")
|
||||
CXG_DIR = os.environ.get("CXG_DIRECTORY", default="/Users/charlotteweaver/Documents/Git/cxg-v2/data/")
|
||||
SECRET_KEY = os.environ.get("CXG_SECRET_KEY", default="SparkleAndShine")
|
||||
ENGINE = os.environ.get("CXG_ENGINE", default="scanpy")
|
||||
@@ -24,8 +23,6 @@ CXG_API_BASE = os.environ.get("CXG_API_BASE2", default="http://0.0.0.0:5005/api/
|
||||
if not CONFIG_FILE:
|
||||
raise ValueError("No config file set for Flask application")
|
||||
|
||||
# TODO check what is actually being configured here
|
||||
app.config.from_pyfile(os.path.join(CXG_DIR, "config", CONFIG_FILE), silent=True)
|
||||
app.config.update(
|
||||
SECRET_KEY=SECRET_KEY,
|
||||
CXG_API_BASE=CXG_API_BASE,
|
||||
|
||||
@@ -88,7 +88,7 @@ class InitializeAPI(Resource):
|
||||
}
|
||||
})
|
||||
def get(self):
|
||||
from app import data, REACTIVE_LIMIT
|
||||
from .. import data, REACTIVE_LIMIT
|
||||
return make_payload({
|
||||
"schema": data.schema,
|
||||
"cellcount": data.cell_count,
|
||||
@@ -191,7 +191,7 @@ class CellsAPI(Resource):
|
||||
}
|
||||
})
|
||||
def get(self):
|
||||
from app import data
|
||||
from .. import data
|
||||
payload = {
|
||||
"cellids": [],
|
||||
"metadata": [],
|
||||
@@ -200,8 +200,8 @@ class CellsAPI(Resource):
|
||||
"ranges": {},
|
||||
}
|
||||
# get query params
|
||||
filter = parse_filter(request.args, data.schema)
|
||||
filtered_data = data.filter_cells(filter)
|
||||
cells_filter = parse_filter(request.args, data.schema)
|
||||
filtered_data = data.filter_cells(cells_filter)
|
||||
payload["metadata"] = data.metadata(filtered_data)
|
||||
payload["ranges"] = data.metadata_ranges(filtered_data)
|
||||
payload["graph"] = data.create_graph(filtered_data)
|
||||
@@ -253,7 +253,7 @@ class ExpressionAPI(Resource):
|
||||
}
|
||||
})
|
||||
def get(self):
|
||||
from app import data
|
||||
from .. import data
|
||||
expression_data = data.expression()
|
||||
return make_payload(expression_data)
|
||||
|
||||
@@ -311,7 +311,7 @@ class ExpressionAPI(Resource):
|
||||
}
|
||||
})
|
||||
def post(self):
|
||||
from app import data
|
||||
from .. import data
|
||||
args = request.get_json()
|
||||
cell_list = args.get("celllist", [])
|
||||
gene_list = args.get("genelist", [])
|
||||
@@ -417,7 +417,7 @@ class DifferentialExpressionAPI(Resource):
|
||||
}
|
||||
})
|
||||
def post(self):
|
||||
from app import data
|
||||
from .. import data
|
||||
args = request.get_json()
|
||||
cell_list_1 = args.get("celllist1", [])
|
||||
cell_list_2 = args.get("celllist2", [])
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
aniso8601==3.0.2
|
||||
anndata==0.6.4
|
||||
anndata==0.6.1
|
||||
certifi==2018.4.16
|
||||
chardet==3.0.4
|
||||
click==6.7
|
||||
cycler==0.10.0
|
||||
decorator==4.3.0
|
||||
Flask==1.0.2
|
||||
Flask==0.12.4
|
||||
Flask-Compress==1.4.0
|
||||
Flask-Cors==3.0.6
|
||||
Flask-RESTful==0.3.6
|
||||
@@ -38,4 +38,4 @@ six==1.11.0
|
||||
statsmodels==0.9.0
|
||||
tables==3.4.4
|
||||
urllib3==1.23
|
||||
Werkzeug==0.14.1
|
||||
Werkzeug==0.14.1
|
||||
@@ -0,0 +1,27 @@
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
with open('server/requirements.txt') as fh:
|
||||
requirements = fh.read().splitlines()
|
||||
|
||||
setup(
|
||||
name='cellxgene',
|
||||
version='0.0.1',
|
||||
packages=find_packages(),
|
||||
url='https://github.com/chanzuckerberg/cellxgene',
|
||||
license='MIT',
|
||||
author='Colin Megill, Charlotte Weaver',
|
||||
author_email='cweaver@chanzuckerberg.com',
|
||||
description='Web application for exploration of large scale scRNA-seq datasets',
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
install_requires=requirements,
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
classifiers=(
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user