mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-24 01:58:12 +08:00
server update
This commit is contained in:
+11
-6
@@ -294,7 +294,9 @@ def layout_obs_get(request, data_adaptor):
|
||||
|
||||
try:
|
||||
return make_response(
|
||||
data_adaptor.layout_to_fbs_matrix(fields, data_adaptor.get_spatial()), HTTPStatus.OK, {"Content-Type": "application/octet-stream"}
|
||||
data_adaptor.layout_to_fbs_matrix(fields, data_adaptor.get_spatial()),
|
||||
HTTPStatus.OK,
|
||||
{"Content-Type": "application/octet-stream"},
|
||||
)
|
||||
except (KeyError, DatasetAccessError) as e:
|
||||
return abort_and_log(HTTPStatus.BAD_REQUEST, str(e), include_exc_info=True)
|
||||
@@ -380,7 +382,7 @@ def summarize_var_helper(request, data_adaptor, key, raw_query):
|
||||
HTTPStatus.OK,
|
||||
{"Content-Type": "application/octet-stream"},
|
||||
)
|
||||
except (ValueError) as e:
|
||||
except ValueError as e:
|
||||
return abort(HTTPStatus.NOT_FOUND, description=str(e))
|
||||
except (UnsupportedSummaryMethod, FilterError) as e:
|
||||
return abort(HTTPStatus.BAD_REQUEST, description=str(e))
|
||||
@@ -399,9 +401,10 @@ def summarize_var_post(request, data_adaptor):
|
||||
key = request.args.get("key", default=None)
|
||||
return summarize_var_helper(request, data_adaptor, key, request.get_data())
|
||||
|
||||
|
||||
def spatial_image_get(request, data_adaptor):
|
||||
import io
|
||||
import matplotlib.pyplot
|
||||
import matplotlib.pyplot
|
||||
|
||||
resolution = "hires"
|
||||
spatial = data_adaptor.get_spatial()
|
||||
@@ -417,7 +420,9 @@ def spatial_image_get(request, data_adaptor):
|
||||
return abort_and_log(HTTPStatus.BAD_REQUEST, "spatial information does not contain images")
|
||||
|
||||
if resolution not in spatial[library_id]["images"]:
|
||||
return abort_and_log(HTTPStatus.BAD_REQUEST, f"spatial information does not contain requested resolution '{resolution}'")
|
||||
return abort_and_log(
|
||||
HTTPStatus.BAD_REQUEST, f"spatial information does not contain requested resolution '{resolution}'"
|
||||
)
|
||||
|
||||
response_image = io.BytesIO()
|
||||
img = spatial[library_id]["images"][resolution]
|
||||
@@ -425,7 +430,7 @@ def spatial_image_get(request, data_adaptor):
|
||||
response_image.seek(0)
|
||||
|
||||
try:
|
||||
return send_file(response_image, attachment_filename=f"{library_id}-{resolution}.png", mimetype="image/png")
|
||||
return send_file(response_image, download_name=f"{library_id}-{resolution}.png", mimetype="image/png")
|
||||
except (KeyError, DatasetAccessError) as e:
|
||||
return abort_and_log(HTTPStatus.BAD_REQUEST, str(e), include_exc_info=True)
|
||||
except PrepareError:
|
||||
@@ -434,4 +439,4 @@ def spatial_image_get(request, data_adaptor):
|
||||
f"No spatial image available {request.path}",
|
||||
loglevel=logging.ERROR,
|
||||
include_exc_info=True,
|
||||
)
|
||||
)
|
||||
|
||||
+23
-169
@@ -1,171 +1,25 @@
|
||||
alembic==1.4.2
|
||||
aniso8601==8.0.0
|
||||
anndata==0.8.0
|
||||
appdirs==1.4.4
|
||||
astroid==2.4.2
|
||||
attrs==19.3.0
|
||||
Authlib==0.14.3
|
||||
autopep8==1.5.4
|
||||
aws-sam-translator==1.25.0
|
||||
aws-xray-sdk==2.6.0
|
||||
bitarray==2.7.3
|
||||
black==23.12.1
|
||||
bleach==3.1.5
|
||||
boto==2.49.0
|
||||
boto3==1.26.94
|
||||
botocore==1.29.165
|
||||
Brotli==1.0.7
|
||||
bump2version==1.0.0
|
||||
bumpversion==0.6.0
|
||||
-e git+git@github.com:chanzuckerberg/cellxgene.git@7d61f47a31a661f49cef6c7d2356228d0aeb044c#egg=cellxgene
|
||||
certifi==2020.4.5.1
|
||||
cffi==1.14.0
|
||||
cfn-lint==0.34.0
|
||||
chalice==1.12.0
|
||||
chardet==3.0.4
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.3
|
||||
clickclick==1.2.2
|
||||
codecov==2.1.3
|
||||
connexion==2.7.0
|
||||
contourpy==1.1.1
|
||||
coverage==7.4.0
|
||||
cryptography==2.9.2
|
||||
cycler==0.10.0
|
||||
decorator==4.4.2
|
||||
docker==4.2.2
|
||||
docutils==0.15.2
|
||||
ecdsa==0.18.0
|
||||
enum-compat==0.0.3
|
||||
envyaml==1.10.211231
|
||||
fastobo==0.7.2
|
||||
flake8==7.0.0
|
||||
flake8-black==0.2.0
|
||||
# NOTE: If you update 'anndata' min version, also update the 'anndata_version'
|
||||
# matrix value in .github/workflows/compatibility_tests.yml
|
||||
anndata>=0.7.6 # we need to_memory(), added in 0.7.6
|
||||
boto3>=1.12.18
|
||||
click>=7.1.2
|
||||
Flask==2.2.3
|
||||
Flask-Caching==1.8.0
|
||||
Flask-Compress==1.13
|
||||
Flask-Cors==3.0.10
|
||||
Flask-RESTful==0.3.9
|
||||
flask-server-timing==0.1.2
|
||||
flask-talisman==1.0.0
|
||||
flatbuffers==1.12
|
||||
flatten-dict==0.4.2
|
||||
fonttools==4.47.2
|
||||
fsspec==0.7.4
|
||||
furl==2.1.0
|
||||
future==0.18.2
|
||||
get-version==2.1
|
||||
gevent==23.9.1
|
||||
greenlet==3.0.3
|
||||
gunicorn==20.0.4
|
||||
h5py==3.10.0
|
||||
idna==2.8
|
||||
importlib-metadata==7.0.1
|
||||
importlib-resources==6.1.1
|
||||
inflection==0.5.0
|
||||
isort==4.3.21
|
||||
itsdangerous==2.1.2
|
||||
Jinja2==3.1.3
|
||||
jmespath==0.10.0
|
||||
joblib==0.16.0
|
||||
jsondiff==1.1.2
|
||||
jsonpatch==1.26
|
||||
jsonpickle==1.4.1
|
||||
jsonpointer==2.0
|
||||
jsonschema==3.2.0
|
||||
junit-xml==1.9
|
||||
keyring==21.2.1
|
||||
kiwisolver==1.2.0
|
||||
lazy-object-proxy==1.4.3
|
||||
legacy-api-wrap==1.2
|
||||
llvmlite==0.39.1
|
||||
Mako==1.1.3
|
||||
MarkupSafe==2.1.4
|
||||
matplotlib==3.7.4
|
||||
mccabe==0.7.0
|
||||
mock==4.0.2
|
||||
more-itertools==8.3.0
|
||||
moto==1.3.14
|
||||
mypy==1.8.0
|
||||
mypy-extensions==0.4.3
|
||||
natsort==7.0.1
|
||||
networkx==2.4
|
||||
numba==0.56.4
|
||||
numexpr==2.7.1
|
||||
numpy==1.23.5
|
||||
openapi-spec-validator==0.2.8
|
||||
orderedmultidict==1.0.1
|
||||
Owlready2==0.24
|
||||
packaging==20.4
|
||||
pandas==1.5.3
|
||||
parameterized==0.7.4
|
||||
pathlib2==2.3.5
|
||||
pathspec==0.12.1
|
||||
patsy==0.5.1
|
||||
Pillow==7.2.0
|
||||
pkginfo==1.5.0.1
|
||||
platformdirs==4.1.0
|
||||
pluggy==0.13.1
|
||||
psycopg2-binary==2.8.5
|
||||
py==1.8.1
|
||||
pyasn1==0.4.8
|
||||
pycodestyle==2.11.1
|
||||
pycparser==2.20
|
||||
pydantic==1.10.6
|
||||
pyflakes==3.2.0
|
||||
Pygments==2.6.1
|
||||
pylint==2.5.3
|
||||
PyMySQL==0.9.3
|
||||
pyparsing==2.4.7
|
||||
pyrsistent==0.16.0
|
||||
pytest==5.4.2
|
||||
pytest-subtests==0.11.0
|
||||
python-dateutil==2.8.1
|
||||
python-editor==1.0.4
|
||||
python-jose==3.3.0
|
||||
python-json-logger==2.0.7
|
||||
pytz==2020.1
|
||||
PyYAML==6.0.1
|
||||
readme-renderer==26.0
|
||||
regex==2020.5.14
|
||||
requests==2.28.2
|
||||
requests-toolbelt==0.9.1
|
||||
responses==0.10.15
|
||||
rsa==4.9
|
||||
s3fs==0.4.2
|
||||
s3transfer==0.6.2
|
||||
scanpy==1.4.6
|
||||
scikit-learn==0.23.2
|
||||
scipy==1.10.1
|
||||
seaborn==0.10.1
|
||||
setuptools-scm==4.1.2
|
||||
sinfo==0.3.1
|
||||
six==1.15.0
|
||||
SQLAlchemy==1.3.19
|
||||
sshpubkeys==3.1.0
|
||||
statsmodels==0.12.0rc0
|
||||
stdlib-list==0.7.0
|
||||
swagger-ui-bundle==0.0.6
|
||||
tables==3.6.1
|
||||
threadpoolctl==2.1.0
|
||||
tiledb==0.21.4
|
||||
toml==0.10.1
|
||||
tomli==2.0.1
|
||||
tqdm==4.46.0
|
||||
twine==3.1.1
|
||||
typed-ast==1.4.1
|
||||
types-PyYAML==6.0.12.12
|
||||
types-requests==2.31.0.20240106
|
||||
types-setuptools==69.0.0.20240115
|
||||
typing-extensions==3.7.4.3
|
||||
umap-learn==0.4.6
|
||||
urllib3==1.25.9
|
||||
wcwidth==0.2.2
|
||||
webencodings==0.5.1
|
||||
websocket-client==0.57.0
|
||||
Flask-Compress>=1.4.0
|
||||
Flask-Cors>=3.0.9 # CVE-2020-25032
|
||||
Flask-RESTful>=0.3.6
|
||||
flask-server-timing>=0.1.2
|
||||
flask-talisman>=0.7.0
|
||||
flatbuffers>=1.11.0,<2.0.0 # cellxgene is not compatible with 2.0.0. Requires migration
|
||||
flatten-dict>=0.2.0
|
||||
fsspec>=0.4.4,<0.8.0
|
||||
gunicorn>=20.0.4
|
||||
h5py>=3.0.0
|
||||
matplotlib>=3.5.0
|
||||
numba>=0.51.2
|
||||
numpy>=1.17.5
|
||||
packaging>=20.0
|
||||
pandas>=1.0,!=1.1 # pandas 1.1 breaks tests, https://github.com/pandas-dev/pandas/issues/35446
|
||||
PyYAML>=5.4 # CVE-2020-14343
|
||||
scipy>=1.4
|
||||
requests>=2.22.0
|
||||
Werkzeug==2.2.3
|
||||
wrapt==1.12.1
|
||||
xmltodict==0.12.0
|
||||
zipp==3.1.0
|
||||
zope.event==5.0
|
||||
zope.interface==6.1
|
||||
|
||||
Reference in New Issue
Block a user