Compare commits

...
Author SHA1 Message Date
LiudengZhang 76a39fcf92 fix: correct opacity prop typo and style object in centroid labels (#2767) 2026-03-09 13:39:56 -07:00
rwbaber 5eb3021752 fix: Handle non-categorical columns with colors + update deprecated AnnData API (#2758)
Yeah that makes sense! Mergingg
2026-02-24 13:37:57 -08:00
Timmy HuangandClaude Opus 4.5 7c7203bdfe chore: replace deprecated codecov with GitHub Action (#2747)
Migrate from the deprecated codecov npm package and bash uploader to the
official codecov/codecov-action@v5. This fixes gcov errors on macOS runners
and provides better reliability for coverage uploads.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 09:28:12 -08:00
rwbaber 5ac256fc8b fix: remove incompatible float16 fixture from general adaptor tests (#2746)
* test: remove incompatible float16 fixture from generic adaptor tests

* test: remove obsolete error test file for float16
2026-01-15 15:18:45 -08:00
2b86f8e600 fix: improve anndata error msg (#2743)
* feat: improve error message for anndata version mismatches

* fix: Remove mentioning of python update and only mention upgrading anndata

* Update server/data_anndata/anndata_adaptor.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-14 09:22:22 -08:00
Timmy Huang 0fddcd042a docs: Add open source required docs (#2745) 2026-01-14 09:13:54 -08:00
Justin Kiggins eb1dc8944f Update README.md (#2725)
CodeQL Scan / Analyze (javascript) (push) Has been cancelled
CodeQL Scan / Analyze (python) (push) Has been cancelled
Compatibility Tests / docker-build (push) Has been cancelled
Compatibility Tests / cxg:latest os: py:3.12 anndata:==0.10.9 (push) Has been cancelled
Compatibility Tests / cxg:latest os:macos-13 py:3.10 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:macos-13 py:3.11 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:macos-13 py:3.12 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:macos-latest py:3.10 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:macos-latest py:3.11 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:macos-latest py:3.12 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:ubuntu-latest py:3.10 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:ubuntu-latest py:3.11 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:latest os:ubuntu-latest py:3.12 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:macos-13 py:3.10 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:macos-13 py:3.11 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:macos-13 py:3.12 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:macos-latest py:3.10 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:macos-latest py:3.11 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:macos-latest py:3.12 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:ubuntu-latest py:3.10 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:ubuntu-latest py:3.11 anndata:latest (push) Has been cancelled
Compatibility Tests / cxg:main os:ubuntu-latest py:3.12 anndata:latest (push) Has been cancelled
Close inactive pull requests / close-issues (push) Has been cancelled
Trademark
2025-05-14 12:03:19 -07:00
Ronen fd8b47b78e chore: Release 1.3.0 (#2700)
* Bump version: 1.2.0 → 1.3.0-rc.0

* Bump version: 1.3.0-rc.0 → 1.3.0
2024-09-12 16:05:14 -04:00
Ronen 487bd13ff8 chore: add support for python 3.12 (#2694) 2024-09-12 14:16:46 -04:00
24 changed files with 131 additions and 310 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 1.2.0 current_version = 1.3.0
commit = True commit = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<prerel>rc)\.(?P<prerelversion>\d+))? parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<prerel>rc)\.(?P<prerelversion>\d+))?
serialize = serialize =
+3 -8
View File
@@ -7,10 +7,6 @@ on:
branches: branches:
- main - main
# For debug - uncomment below to run on all PRs
# pull_request:
# branches: "*"
env: env:
JEST_ENV: prod JEST_ENV: prod
@@ -32,14 +28,13 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# note: The `macos-latest` is latest Catalina version, and not Big Sur. So we explicitly ask for Big Sur (`macos-11`)
os: [ubuntu-latest, macos-latest, macos-13] os: [ubuntu-latest, macos-latest, macos-13]
python-version: ["3.10", "3.11"] python-version: ["3.10", "3.11", "3.12"]
cellxgene_build: [main, latest] cellxgene_build: [main, latest]
# add anndata pinned version test for subset of matrix configurations, # add anndata pinned version test for subset of matrix configurations,
# in order to reduce matrix cross-product explosion # in order to reduce matrix cross-product explosion
include: include:
- python-version: 3.11 - python-version: 3.12
cellxgene_build: latest cellxgene_build: latest
# TODO: dynamically use the literal version in requirements.txt, # TODO: dynamically use the literal version in requirements.txt,
# to avoid having to update this in manually in the future # to avoid having to update this in manually in the future
@@ -100,7 +95,7 @@ jobs:
# keep same pip pkg versions as in the cxg release # keep same pip pkg versions as in the cxg release
sed -i'' -e 's/-r requirements.txt//' server/requirements-dev.txt sed -i'' -e 's/-r requirements.txt//' server/requirements-dev.txt
pip install -r server/requirements-dev.txt pip install -r server/requirements-dev.txt
pip install --force-reinstall numpy==2.0.1 numba>=0.60.0 pandas pip install --force-reinstall numpy==2.0.1 numba>=0.60.0 pandas flatbuffers==2.0.7
- name: Install anndata version per matrix variable - name: Install anndata version per matrix variable
run: pip install anndata${{ matrix.anndata_version }} run: pip install anndata${{ matrix.anndata_version }}
- name: Install node - name: Install node
+25 -14
View File
@@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: | - run: |
git fetch --depth=1 origin +${{github.base_ref}} git fetch --depth=1 origin +${{github.base_ref}}
- name: Set up Python 3.11 - name: Set up Python 3.12
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: 3.11 python-version: 3.12
- name: Node cache - name: Node cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
@@ -46,10 +46,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python 3.11 (pyenv) # pyenv needed for mlflow in cli annotate tests - name: Set up Python 3.12 (pyenv) # pyenv needed for mlflow in cli annotate tests
uses: gabrielfalcao/pyenv-action@v9 uses: gabrielfalcao/pyenv-action@v9
with: with:
default: 3.11 default: 3.12
command: pip install -U pip # upgrade pip after installing python command: pip install -U pip # upgrade pip after installing python
- run: pip install virtualenv # virtualenv needed for mlflow in cli annotate tests - run: pip install virtualenv # virtualenv needed for mlflow in cli annotate tests
- name: Python cache - name: Python cache
@@ -69,20 +69,31 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: make pydist install-dist dev-env-server run: make pydist install-dist dev-env-server
- name: Unit tests - name: Unit tests
run: | run: make unit-test-server unit-test-client
make unit-test-server unit-test-client - name: Generate server coverage XML
bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k server -cF server,python,unitTest run: coverage xml -o server/coverage.xml
cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest - name: Upload server coverage
uses: codecov/codecov-action@v5
with:
flags: server,python,unitTest
files: ./server/coverage.xml
fail_ci_if_error: false
- name: Upload client coverage
uses: codecov/codecov-action@v5
with:
flags: frontend,javascript,unitTest
files: ./client/coverage/lcov.info
fail_ci_if_error: false
smoke-tests: smoke-tests:
runs-on: macos-latest runs-on: macos-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python 3.11 - name: Set up Python 3.12
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: 3.11 python-version: 3.12
- name: Python cache - name: Python cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
@@ -98,11 +109,11 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-node- ${{ runner.os }}-node-
- name: Install dependencies - name: Install dependencies
run: make pydist install-dist
- name: Smoke tests (without annotations feature)
run: | run: |
cd client && make smoke-test pip install setuptools
./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,smokeTest make pydist install-dist
- name: Smoke tests (without annotations feature)
run: cd client && make smoke-test
# TODO: reinstate: https://github.com/chanzuckerberg/cellxgene/issues/2544 # TODO: reinstate: https://github.com/chanzuckerberg/cellxgene/issues/2544
# smoke-tests-annotations: # smoke-tests-annotations:
+2 -2
View File
@@ -1,6 +1,6 @@
The MIT License (MIT) # The MIT License (MIT)
Copyright (c) 2017-2023 Chan Zuckerberg Initiative Copyright (c) 2017-2026 Chan Zuckerberg Initiative
Permission is hereby granted, free of charge, to any person obtaining a copy of Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in this software and associated documentation files (the "Software"), to deal in
+14 -8
View File
@@ -27,7 +27,7 @@ Whether you need to visualize one thousand cells or one million, CELLxGENE Annot
### Quick start ### Quick start
To install CELLxGENE Annotate you need Python 3.6+. We recommend [installing Annotate into a conda or virtual environment.](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/desktop/install.md) To install CELLxGENE Annotate you need Python 3.10+. We recommend [installing Annotate into a conda or virtual environment.](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/desktop/install.md)
Install the package. Install the package.
@@ -66,22 +66,28 @@ For any errors, [report bugs on Github](https://github.com/chanzuckerberg/cellxg
### Contributing ### Contributing
We warmly welcome contributions from the community! Please see our [contributing guide](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/contribute.md) and don't hesitate to open an issue or send a pull request to improve CELLxGENE Annotate. Please see the [dev_docs](https://github.com/chanzuckerberg/cellxgene/tree/main/dev_docs) for pull request suggestions, unit test details, local documentation preview, and other development specifics. We warmly welcome contributions from the community! Please see our [contributing guide](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/contribute.md) and don't hesitate to open an issue or send a pull request to improve CELLxGENE Annotate. Please see the [dev_docs](https://github.com/chanzuckerberg/cellxgene/tree/main/dev_docs) for pull request suggestions, unit test details, local documentation preview, and other development specifics.
This project adheres to the Contributor Covenant [code of conduct](https://github.com/chanzuckerberg/.github/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource@chanzuckerberg.com. This project adheres to the Contributor Covenant [code of conduct](https://github.com/chanzuckerberg/.github/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource@chanzuckerberg.com.
### Reuse ### Reuse
This project was started with the sole goal of empowering the scientific community to explore and understand their data. This project was started with the sole goal of empowering the scientific community to explore and understand their data.
As such, we encourage other scientific tool builders in academia or industry to adopt the patterns, tools, and code from As such, we encourage other scientific tool builders in academia or industry to adopt the patterns, tools, and code from
this project. All code is freely available for reuse under the [MIT license](https://opensource.org/licenses/MIT). this project. All code is freely available for reuse under the [MIT license](https://opensource.org/licenses/MIT).
Before extending CELLxGENE Annotate, we encourage you to reach out to us with ideas or questions. It might be possible that an
extension could be directly contributed, which would make it available for a wider audience, or that it's on our
[roadmap](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/roadmap.md) and under active development.
Before extending CELLxGENE Annotate, we encourage you to reach out to us with ideas or questions. It might be possible that an See the [CELLxGENE extensions](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/community-extensions.md) section of our documentation for examples of community use and CELLxGENE extensions.
extension could be directly contributed, which would make it available for a wider audience, or that it's on our
[roadmap](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/roadmap.md) and under active development. ### Trademarks
CZ CELLXGENE, CZ CELLXGENE DISCOVER, and CZ CELLXGENE ANNOTATE are trademarks of the Chan Zuckerberg Initiative. All rights reserved.
Use, reuse, modification, and re-distribution of the source code in this repository is subject to the terms of the applicable open source [license](LICENSE.txt). However, that license does not grant permission to use the trademarks without separate, express permission from the Chan Zuckerberg Initiative.
See the [CELLxGENE extensions](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/community-extensions.md) section of our documentation for examples of community use and CELLxGENE extensions.
### Security ### Security
+3
View File
@@ -0,0 +1,3 @@
# Reporting Security Issues
If you believe you have found a security issue, please responsibly disclose by contacting us at [security@chanzuckerberg.com](mailto:security@chanzuckerberg.com).
+1 -1
View File
@@ -1 +1 @@
16.20.0 18.17.0
+1
View File
@@ -14,6 +14,7 @@ const DEFAULT_LAUNCH_CONFIG = {
headless: !isHeadful, headless: !isHeadful,
args: ["--ignore-certificate-errors", "--ignore-ssl-errors"], args: ["--ignore-certificate-errors", "--ignore-ssl-errors"],
ignoreHTTPSErrors: true, ignoreHTTPSErrors: true,
timeout: 90000,
defaultViewport: { defaultViewport: {
width: 1280, width: 1280,
height: 960, height: 960,
+4 -196
View File
@@ -1,12 +1,12 @@
{ {
"name": "cellxgene", "name": "cellxgene",
"version": "1.2.0", "version": "1.3.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "cellxgene", "name": "cellxgene",
"version": "1.2.0", "version": "1.3.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/eslint-parser": "^7.15.0", "@babel/eslint-parser": "^7.15.0",
@@ -71,7 +71,6 @@
"cheerio": "^1.0.0-rc.6", "cheerio": "^1.0.0-rc.6",
"clean-css": "^5.1.2", "clean-css": "^5.1.2",
"clean-webpack-plugin": "^4.0.0-alpha.0", "clean-webpack-plugin": "^4.0.0-alpha.0",
"codecov": "^3.7.1",
"css-loader": "^5.2.4", "css-loader": "^5.2.4",
"css-minimizer-webpack-plugin": "^4.0.0", "css-minimizer-webpack-plugin": "^4.0.0",
"eslint": "^7.24.0", "eslint": "^7.24.0",
@@ -116,8 +115,8 @@
"webpack-obsolete-plugin": "^1.0.5" "webpack-obsolete-plugin": "^1.0.5"
}, },
"engines": { "engines": {
"node": "^16.0.0", "node": "^18.17.0",
"npm": ">=3.0.0" "npm": ">=9.6.7"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
@@ -5371,16 +5370,6 @@
"sprintf-js": "~1.0.2" "sprintf-js": "~1.0.2"
} }
}, },
"node_modules/argv": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz",
"integrity": "sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw==",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"dev": true,
"engines": {
"node": ">=0.6.10"
}
},
"node_modules/aria-query": { "node_modules/aria-query": {
"version": "4.2.2", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
@@ -6448,26 +6437,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/codecov": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz",
"integrity": "sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==",
"deprecated": "https://about.codecov.io/blog/codecov-uploader-deprecation-plan/",
"dev": true,
"dependencies": {
"argv": "0.0.2",
"ignore-walk": "3.0.4",
"js-yaml": "3.14.1",
"teeny-request": "7.1.1",
"urlgrey": "1.0.0"
},
"bin": {
"codecov": "bin/codecov"
},
"engines": {
"node": ">=4.0"
}
},
"node_modules/collect-v8-coverage": { "node_modules/collect-v8-coverage": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz",
@@ -9173,21 +9142,6 @@
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
}, },
"node_modules/fast-url-parser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
"integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==",
"dev": true,
"dependencies": {
"punycode": "^1.3.2"
}
},
"node_modules/fast-url-parser/node_modules/punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
"dev": true
},
"node_modules/fastest-levenshtein": { "node_modules/fastest-levenshtein": {
"version": "1.0.12", "version": "1.0.12",
"resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz",
@@ -10251,15 +10205,6 @@
"node": ">= 4" "node": ">= 4"
} }
}, },
"node_modules/ignore-walk": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz",
"integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==",
"dev": true,
"dependencies": {
"minimatch": "^3.0.4"
}
},
"node_modules/import-fresh": { "node_modules/import-fresh": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@@ -16921,15 +16866,6 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/stream-events": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
"integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==",
"dev": true,
"dependencies": {
"stubs": "^3.0.0"
}
},
"node_modules/string_decoder": { "node_modules/string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -17089,12 +17025,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/stubs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz",
"integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==",
"dev": true
},
"node_modules/stylehacks": { "node_modules/stylehacks": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz",
@@ -17353,22 +17283,6 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/teeny-request": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.1.tgz",
"integrity": "sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==",
"dev": true,
"dependencies": {
"http-proxy-agent": "^4.0.0",
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.1",
"stream-events": "^1.0.5",
"uuid": "^8.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/terminal-link": { "node_modules/terminal-link": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz",
@@ -17957,15 +17871,6 @@
"requires-port": "^1.0.0" "requires-port": "^1.0.0"
} }
}, },
"node_modules/urlgrey": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-1.0.0.tgz",
"integrity": "sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w==",
"dev": true,
"dependencies": {
"fast-url-parser": "^1.1.3"
}
},
"node_modules/use": { "node_modules/use": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@@ -17996,15 +17901,6 @@
"node": ">= 0.4.0" "node": ">= 0.4.0"
} }
}, },
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/v8-compile-cache": { "node_modules/v8-compile-cache": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
@@ -22694,12 +22590,6 @@
"sprintf-js": "~1.0.2" "sprintf-js": "~1.0.2"
} }
}, },
"argv": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz",
"integrity": "sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw==",
"dev": true
},
"aria-query": { "aria-query": {
"version": "4.2.2", "version": "4.2.2",
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
@@ -23489,19 +23379,6 @@
"integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
"dev": true "dev": true
}, },
"codecov": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz",
"integrity": "sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==",
"dev": true,
"requires": {
"argv": "0.0.2",
"ignore-walk": "3.0.4",
"js-yaml": "3.14.1",
"teeny-request": "7.1.1",
"urlgrey": "1.0.0"
}
},
"collect-v8-coverage": { "collect-v8-coverage": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz",
@@ -25575,23 +25452,6 @@
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
}, },
"fast-url-parser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
"integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==",
"dev": true,
"requires": {
"punycode": "^1.3.2"
},
"dependencies": {
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
"dev": true
}
}
},
"fastest-levenshtein": { "fastest-levenshtein": {
"version": "1.0.12", "version": "1.0.12",
"resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz",
@@ -26382,15 +26242,6 @@
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg=="
}, },
"ignore-walk": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz",
"integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==",
"dev": true,
"requires": {
"minimatch": "^3.0.4"
}
},
"import-fresh": { "import-fresh": {
"version": "3.3.0", "version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@@ -31562,15 +31413,6 @@
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
"dev": true "dev": true
}, },
"stream-events": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
"integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==",
"dev": true,
"requires": {
"stubs": "^3.0.0"
}
},
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -31693,12 +31535,6 @@
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
}, },
"stubs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz",
"integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==",
"dev": true
},
"stylehacks": { "stylehacks": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz",
@@ -31896,19 +31732,6 @@
} }
} }
}, },
"teeny-request": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.1.tgz",
"integrity": "sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==",
"dev": true,
"requires": {
"http-proxy-agent": "^4.0.0",
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.1",
"stream-events": "^1.0.5",
"uuid": "^8.0.0"
}
},
"terminal-link": { "terminal-link": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz",
@@ -32347,15 +32170,6 @@
"requires-port": "^1.0.0" "requires-port": "^1.0.0"
} }
}, },
"urlgrey": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-1.0.0.tgz",
"integrity": "sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w==",
"dev": true,
"requires": {
"fast-url-parser": "^1.1.3"
}
},
"use": { "use": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
@@ -32380,12 +32194,6 @@
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
"dev": true "dev": true
}, },
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true
},
"v8-compile-cache": { "v8-compile-cache": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
+3 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "cellxgene", "name": "cellxgene",
"version": "1.2.0", "version": "1.3.0",
"license": "MIT", "license": "MIT",
"description": "cellxgene is a web application for the interactive exploration of single cell sequence data.", "description": "cellxgene is a web application for the interactive exploration of single cell sequence data.",
"repository": "https://github.com/chanzuckerberg/cellxgene", "repository": "https://github.com/chanzuckerberg/cellxgene",
@@ -18,8 +18,8 @@
}, },
"engineStrict": true, "engineStrict": true,
"engines": { "engines": {
"npm": ">=3.0.0", "npm": ">=9.6.7",
"node": "^16.0.0" "node": "^18.17.0"
}, },
"eslintConfig": { "eslintConfig": {
"extends": "./configuration/eslint/eslint.js" "extends": "./configuration/eslint/eslint.js"
@@ -101,7 +101,6 @@
"cheerio": "^1.0.0-rc.6", "cheerio": "^1.0.0-rc.6",
"clean-css": "^5.1.2", "clean-css": "^5.1.2",
"clean-webpack-plugin": "^4.0.0-alpha.0", "clean-webpack-plugin": "^4.0.0-alpha.0",
"codecov": "^3.7.1",
"css-loader": "^5.2.4", "css-loader": "^5.2.4",
"css-minimizer-webpack-plugin": "^4.0.0", "css-minimizer-webpack-plugin": "^4.0.0",
"eslint": "^7.24.0", "eslint": "^7.24.0",
@@ -150,7 +150,7 @@ class CentroidLabels extends PureComponent {
dilatedValue={dilatedValue} dilatedValue={dilatedValue}
coords={coords} coords={coords}
inverseTransform={inverseTransform} inverseTransform={inverseTransform}
opactity={selected ? 1 : deselectOpacity} opacity={selected ? 1 : deselectOpacity}
colorAccessor={colorAccessor} colorAccessor={colorAccessor}
displayLabel={displayLabel} displayLabel={displayLabel}
onMouseEnter={this.handleMouseEnter} onMouseEnter={this.handleMouseEnter}
@@ -205,7 +205,7 @@ const Label = ({
fontWeight, fontWeight,
fill: "black", fill: "black",
userSelect: "none", userSelect: "none",
opacity: { opacity }, opacity,
}} }}
onMouseEnter={(e) => onMouseEnter(e, colorAccessor, label)} onMouseEnter={(e) => onMouseEnter(e, colorAccessor, label)}
onMouseOut={(e) => onMouseOut(e, colorAccessor, label)} onMouseOut={(e) => onMouseOut(e, colorAccessor, label)}
+3 -3
View File
@@ -3,7 +3,7 @@
## Requirements ## Requirements
- npm - npm
- Python 3.6+ - Python 3.10+
- Chrome - Chrome
[See dev section of README](../README.md) [See dev section of README](../README.md)
@@ -148,6 +148,6 @@ If you would like to run the smoke tests against a hot-reloaded version of the c
### Tips ### Tips
- You can also install/launch the server side code from npm scrips (requires python3.6 with virtualenv) with the `scripts/backend_dev` script. - You can also install/launch the server side code from npm scrips (requires python3.10 with virtualenv) with the `scripts/backend_dev` script.
- Check out [e2e Tests](e2e_tests.md) for more details - Check out [e2e Tests](e2e_tests.md) for more details
+31 -23
View File
@@ -11,9 +11,10 @@ $PROJECT_ROOT`.
### Build ### Build
**Usage:** from the `$PROJECT_ROOT` directory run: **Usage:** from the `$PROJECT_ROOT` directory run:
* `make build` builds whole app client and server
* `make build-client` runs webpack build - `make build` builds whole app client and server
* `make build-for-server-dev` builds client and copies output directly into - `make build-client` runs webpack build
- `make build-for-server-dev` builds client and copies output directly into
source tree (only for server devlopment) source tree (only for server devlopment)
### Clean ### Clean
@@ -21,17 +22,19 @@ $PROJECT_ROOT`.
Deletes generated files. Deletes generated files.
**Usage:** from the `$PROJECT_ROOT` directory run: **Usage:** from the `$PROJECT_ROOT` directory run:
* `make clean` cleans everything including node modules (means build with take
- `make clean` cleans everything including node modules (means build with take
a while a while
* `make clean-lite` cleans built directories - `make clean-lite` cleans built directories
* `make clean-server` cleans source tree - `make clean-server` cleans source tree
### Distribution ### Distribution
Creates distribution for python module to upload to pypi. Creates distribution for python module to upload to pypi.
**Usage:** from the `$PROJECT_ROOT` directory run: **Usage:** from the `$PROJECT_ROOT` directory run:
* `make pydist` builds code and then builds sdist
- `make pydist` builds code and then builds sdist
### Release ### Release
@@ -42,16 +45,18 @@ See `release_process.md`.
Installs requirements files. Installs requirements files.
**Usage:** from the `$PROJECT_ROOT` directory run: **Usage:** from the `$PROJECT_ROOT` directory run:
* `make dev-env` installs requirements and requirments-dev (for building code)
- `make dev-env` installs requirements and requirments-dev (for building code)
### Installing cellxgene packages ### Installing cellxgene packages
**Usage:** from the `$PROJECT_ROOT` directory: **Usage:** from the `$PROJECT_ROOT` directory:
* `install-dev` - installs from local source tree
* `install-release-test` - installs from test pypi - `install-dev` - installs from local source tree
* `install-release` - installs from pypi - `install-release-test` - installs from test pypi
* `install-dist` - installs from local dist folder - `install-release` - installs from pypi
* `uninstall` - uninstalls cellxgene - `install-dist` - installs from local dist folder
- `uninstall` - uninstalls cellxgene
## Client-level scripts ## Client-level scripts
@@ -62,8 +67,9 @@ Installs requirements files.
**About** Serve the current client javascript independently from the `server` code. **About** Serve the current client javascript independently from the `server` code.
**Requires** **Requires**
* The server to be running. Best way to do this is with [backend_dev](#backend_dev).
* `make ci` to install the necessary node modules - The server to be running. Best way to do this is with [backend_dev](#backend_dev).
- `make ci` to install the necessary node modules
**Usage:** from the `$PROJECT_ROOT/client` directory run `make start-frontend` **Usage:** from the `$PROJECT_ROOT/client` directory run `make start-frontend`
@@ -75,23 +81,24 @@ the FE developer gets the current version of the backend with a single command
and no knowledge of python necessary. It creates and activates a virtual and no knowledge of python necessary. It creates and activates a virtual
environment and installs cellxgene from the current branch. environment and installs cellxgene from the current branch.
**Requires** `Python3.6+`, `virtual-env`, `pip` **Requires** `Python3.10+`, `virtual-env`, `pip`
**Usage:** from the `$PROJECT_ROOT` directory run `./scripts/backend_dev` **Usage:** from the `$PROJECT_ROOT` directory run `./scripts/backend_dev`
**Options:** **Options:**
* In parallel, you can then launch the node development server to serve the
- In parallel, you can then launch the node development server to serve the
current state of the FE with [`start-frontend`](#start-frontend), usually in current state of the FE with [`start-frontend`](#start-frontend), usually in
a different terminal tab. a different terminal tab.
* You can also select a specific dataset using `DATASET=<dataset path> ./scripts/backend_dev`. - You can also select a specific dataset using `DATASET=<dataset path> ./scripts/backend_dev`.
* You can also use `CXG_OPTIONS` to pass options to the `cellxgene launch` - You can also use `CXG_OPTIONS` to pass options to the `cellxgene launch`
command, as in `CXG_OPTIONS='--disable-annotations' ./scripts/backend_dev`. command, as in `CXG_OPTIONS='--disable-annotations' ./scripts/backend_dev`.
**Breakdown** **Breakdown**
| command | purpose | | command | purpose |
| ---------------------------------------- | ---------------------------------------------------------- | | ---------------------------------------- | ---------------------------------------------------------- |
| python3.6 -m venv cellxgene | creates cellxgene virtual environment | | python3.12 -m venv cellxgene | creates cellxgene virtual environment |
| source cellxgene/bin/activate | activates virtual environment | | source cellxgene/bin/activate | activates virtual environment |
| yes \| pip uninstall cellxgene \|\| true | uninstalls cellxgene (if installed) | | yes \| pip uninstall cellxgene \|\| true | uninstalls cellxgene (if installed) |
| pip install -e . | installs current local version of cellxgene | | pip install -e . | installs current local version of cellxgene |
@@ -102,14 +109,15 @@ environment and installs cellxgene from the current branch.
Methods used to test the client javascript code Methods used to test the client javascript code
**Usage:** from the `$PROJECT_ROOT/client` directory run: **Usage:** from the `$PROJECT_ROOT/client` directory run:
* `make unit-test` Runs all unit tests. It excludes any tests in the e2e
- `make unit-test` Runs all unit tests. It excludes any tests in the e2e
folder. This is used by travis to run unit tests. folder. This is used by travis to run unit tests.
* `make smoke-test` Starts backend development server and runs end to end - `make smoke-test` Starts backend development server and runs end to end
tests. This is what travis runs. It depends on the `e2e` and the tests. This is what travis runs. It depends on the `e2e` and the
`backend-dev` targets. One starts the server, the other runs the tests. If `backend-dev` targets. One starts the server, the other runs the tests. If
developing a front-end feature and just checking if tests pass, this is developing a front-end feature and just checking if tests pass, this is
probabaly the one you want to run. probabaly the one you want to run.
* `npm run e2e` Runs backend tests without starting the server. You will need to - `npm run e2e` Runs backend tests without starting the server. You will need to
start the rest api separately with the pbmc3k.h5ad file. Note you can use start the rest api separately with the pbmc3k.h5ad file. Note you can use
the `JEST_ENV` environment variable to change how JEST runs in the browser. the `JEST_ENV` environment variable to change how JEST runs in the browser.
The test runs against `localhost:3000` by default. You can use the The test runs against `localhost:3000` by default. You can use the
+1 -1
View File
@@ -2,7 +2,7 @@ import logging
import sys import sys
from server.common.utils.utils import import_plugins from server.common.utils.utils import import_plugins
__version__ = "1.2.0" __version__ = "1.3.0"
display_version = "cellxgene v" + __version__ display_version = "cellxgene v" + __version__
try: try:
+4 -4
View File
@@ -128,12 +128,12 @@ def prepare(
raise click.FileError(data, hint="not a valid file or path") raise click.FileError(data, hint="not a valid file or path")
if not set_obs_names == "": if not set_obs_names == "":
if set_obs_names not in adata.obs_keys(): if set_obs_names not in list(adata.obs.keys()):
raise click.UsageError(f"obs {set_obs_names} not found, options are: {adata.obs_keys()}") raise click.UsageError(f"obs {set_obs_names} not found, options are: {list(adata.obs.keys())}")
adata.obs_names = adata.obs[set_obs_names] adata.obs_names = adata.obs[set_obs_names]
if not set_var_names == "": if not set_var_names == "":
if set_var_names not in adata.var_keys(): if set_var_names not in list(adata.var.keys()):
raise click.UsageError(f"var {set_var_names} not found, options are: {adata.var_keys()}") raise click.UsageError(f"var {set_var_names} not found, options are: {list(adata.var.keys())}")
adata.var_names = adata.var[set_var_names] adata.var_names = adata.var[set_var_names]
if make_obs_names_unique: if make_obs_names_unique:
adata.obs.index = make_index_unique(adata.obs.index) adata.obs.index = make_index_unique(adata.obs.index)
+1 -1
View File
@@ -228,6 +228,6 @@ def convert_anndata_category_colors_to_cxg_category_colors(data):
# create the cellxgene color entry for this category # create the cellxgene color entry for this category
cxg_colors[category_name] = dict( cxg_colors[category_name] = dict(
zip(data.obs[category_name].cat.categories, [convert_color_to_hex_format(c) for c in data.uns[uns_key]]) zip(data.obs[category_name].astype('category').cat.categories, [convert_color_to_hex_format(c) for c in data.uns[uns_key]])
) )
return cxg_colors return cxg_colors
+1 -1
View File
@@ -22,7 +22,7 @@ def corpora_get_versions_from_anndata(adata):
""" """
# per Corpora AnnData spec, this is a corpora file if the following is true # per Corpora AnnData spec, this is a corpora file if the following is true
if "version" not in adata.uns_keys(): if "version" not in list(adata.uns.keys()):
return None return None
version = adata.uns["version"] version = adata.uns["version"]
if not isinstance(version, collections.abc.Mapping) or "corpora_schema_version" not in version: if not isinstance(version, collections.abc.Mapping) or "corpora_schema_version" not in version:
+21 -9
View File
@@ -1,4 +1,5 @@
import warnings import warnings
import importlib.metadata
import anndata import anndata
import numpy as np import numpy as np
@@ -16,7 +17,7 @@ from server.common.utils.type_conversion_utils import get_schema_type_hint_of_ar
from server.data_common.data_adaptor import DataAdaptor from server.data_common.data_adaptor import DataAdaptor
from server.common.fbs.matrix import encode_matrix_fbs from server.common.fbs.matrix import encode_matrix_fbs
anndata_version = version.parse(str(anndata.__version__)).release anndata_version = version.parse(str(importlib.metadata.version('anndata'))).release
def anndata_version_is_pre_070(): def anndata_version_is_pre_070():
@@ -63,7 +64,7 @@ class AnndataAdaptor(DataAdaptor):
return "cellxgene anndata adaptor version" return "cellxgene anndata adaptor version"
def get_library_versions(self): def get_library_versions(self):
return dict(anndata=str(anndata.__version__)) return dict(anndata=str(importlib.metadata.version('anndata')))
@staticmethod @staticmethod
def _create_unique_column_name(df, col_name_prefix): def _create_unique_column_name(df, col_name_prefix):
@@ -173,13 +174,24 @@ class AnndataAdaptor(DataAdaptor):
) )
except MemoryError: except MemoryError:
raise DatasetAccessError("Out of memory - file is too large for available memory.") raise DatasetAccessError("Out of memory - file is too large for available memory.")
except Exception: except Exception as e:
import traceback import traceback
error_msg = str(e)
# IMPROVEMENT: Broadly catch ANY version incompatibility
if "No read method registered" in error_msg and "IOSpec" in error_msg:
message = (
"Error loading file: This H5AD file uses a newer internal format that "
"your version of 'anndata' cannot read.\n"
f"The specific error was: {error_msg}\n"
"Please upgrade anndata in your environment (pip install --upgrade anndata)."
)
else:
message = (
"File not found or is inaccessible. File must be an .h5ad object. "
"Please check your input and try again."
)
message = (
"File not found or is inaccessible. File must be an .h5ad object. "
"Please check your input and try again."
)
if self.server_config.app__verbose: if self.server_config.app__verbose:
message += f"\n{traceback.format_exc()}" message += f"\n{traceback.format_exc()}"
raise DatasetAccessError(message) raise DatasetAccessError(message)
@@ -302,11 +314,11 @@ class AnndataAdaptor(DataAdaptor):
layouts = self.dataset_config.embeddings__names layouts = self.dataset_config.embeddings__names
if layouts is None or len(layouts) == 0: if layouts is None or len(layouts) == 0:
layouts = [key[2:] for key in self.data.obsm_keys() if type(key) is str and key.startswith("X_")] layouts = [key[2:] for key in list(self.data.obsm.keys()) if type(key) is str and key.startswith("X_")]
# remove invalid layouts # remove invalid layouts
valid_layouts = [] valid_layouts = []
obsm_keys = self.data.obsm_keys() obsm_keys = list(self.data.obsm.keys())
for layout in layouts: for layout in layouts:
layout_name = f"X_{layout}" layout_name = f"X_{layout}"
if layout_name not in obsm_keys: if layout_name not in obsm_keys:
+1 -1
View File
@@ -1,6 +1,6 @@
black black
bumpversion>=0.5 bumpversion>=0.5
codecov>=2.0.15 coverage>=5.0
parameterized>=0.7.0 parameterized>=0.7.0
pytest>=3.6.3 pytest>=3.6.3
python-jose>=3.2.0 python-jose>=3.2.0
+3 -2
View File
@@ -7,7 +7,7 @@ Flask-Cors>=3.0.9
Flask-RESTful>=0.3.6 Flask-RESTful>=0.3.6
flask-server-timing>=0.1.2 flask-server-timing>=0.1.2
flask-talisman>=0.7.0 flask-talisman>=0.7.0
flatbuffers>=1.11.0,<2.0.0 # cellxgene is not compatible with 2.0.0. Requires migration flatbuffers==2.0.7
flatten-dict>=0.2.0 flatten-dict>=0.2.0
fsspec>0.8.0 fsspec>0.8.0
gunicorn>=20.0.4 gunicorn>=20.0.4
@@ -19,4 +19,5 @@ pandas>=2.2.2
PyYAML>=5.4 # CVE-2020-14343 PyYAML>=5.4 # CVE-2020-14343
requests>=2.22.0 requests>=2.22.0
s3fs==0.4.2 s3fs==0.4.2
scipy>=1.4 scipy>=1.4
setuptools
+5 -4
View File
@@ -14,7 +14,7 @@ with open("server/requirements-annotate.txt") as fh:
setup( setup(
name="cellxgene", name="cellxgene",
version="1.2.0", version="1.3.0",
packages=find_packages(), packages=find_packages(),
url="https://github.com/chanzuckerberg/cellxgene", url="https://github.com/chanzuckerberg/cellxgene",
license="MIT", license="MIT",
@@ -24,7 +24,7 @@ setup(
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
install_requires=requirements, install_requires=requirements,
python_requires=">=3.6", python_requires=">=3.10",
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,
classifiers=[ classifiers=[
@@ -37,8 +37,9 @@ setup(
"Operating System :: MacOS :: MacOS X", "Operating System :: MacOS :: MacOS X",
"Programming Language :: JavaScript", "Programming Language :: JavaScript",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Bio-Informatics", "Topic :: Scientific/Engineering :: Bio-Informatics",
], ],
@@ -36,7 +36,6 @@ Test the anndata adaptor using the pbmc3k data set.
(f"{FIXTURES_ROOT}/pbmc3k-CSC-gz.h5ad", True, "normal"), (f"{FIXTURES_ROOT}/pbmc3k-CSC-gz.h5ad", True, "normal"),
(f"{FIXTURES_ROOT}/pbmc3k-CSR-gz.h5ad", True, "normal"), (f"{FIXTURES_ROOT}/pbmc3k-CSR-gz.h5ad", True, "normal"),
(f"{FIXTURES_ROOT}/pbmc3k_64.h5ad", False, "auto"), # 64 bit conversion tests (f"{FIXTURES_ROOT}/pbmc3k_64.h5ad", False, "auto"), # 64 bit conversion tests
(f"{FIXTURES_ROOT}/pbmc3k_16.h5ad", False, "auto"), # 16 bit conversion tests
], ],
) )
class AdaptorTest(unittest.TestCase): class AdaptorTest(unittest.TestCase):
@@ -1,23 +0,0 @@
import unittest
from parameterized import parameterized_class
from server.common.errors import DatasetAccessError
from test import FIXTURES_ROOT
from test.unit import app_config
@parameterized_class(
("data_locator", "backed", "X_approximate_distribution"),
[
(f"{FIXTURES_ROOT}/pbmc3k_16.h5ad", True, "auto"), # 16 bit conversion tests
],
)
class AdaptorLoadErrorTest(unittest.TestCase):
def test_float16_backed_raises_err(self):
with self.assertRaises(DatasetAccessError):
config = app_config(
self.data_locator,
backed=self.backed,
extra_dataset_config=dict(X_approximate_distribution=self.X_approximate_distribution),
)
@@ -134,7 +134,7 @@ float_OK_cases = [
np.arange(-128, 1000, dtype=dtype), np.arange(-128, 1000, dtype=dtype),
pd.Series(np.arange(-128, 1000, dtype=dtype)), pd.Series(np.arange(-128, 1000, dtype=dtype)),
pd.Index(np.arange(-129, 1000, dtype=dtype)), pd.Index(np.arange(-129, 1000, dtype=dtype)),
np.array([-np.nan, np.inf, -1, 0.0, 0, 0.0, 1, np.inf, np.nan], dtype=dtype), np.array([-np.nan, -np.inf, -1, -0.0, 0, 0.0, 1, np.inf, np.nan], dtype=dtype),
np.array([np.finfo(dtype).min, 0, np.finfo(dtype).max], dtype=dtype), np.array([np.finfo(dtype).min, 0, np.finfo(dtype).max], dtype=dtype),
sparse.csr_matrix((10, 100), dtype=dtype), sparse.csr_matrix((10, 100), dtype=dtype),
] ]