mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-28 06:48:11 +08:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea13d3e253 | ||
|
|
b43bce4321 | ||
|
|
8bde7c1c1f | ||
|
|
b11b161dd3 | ||
|
|
eba4c077fc | ||
|
|
3e516bfb2f | ||
|
|
402b9b3f94 |
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 1.3.0
|
current_version = 1.2.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 =
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
### For debugging purposes - uncomment below to run on all PRs
|
||||||
|
pull_request:
|
||||||
|
branches: "*"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
JEST_ENV: prod
|
JEST_ENV: prod
|
||||||
|
|
||||||
@@ -28,6 +32,7 @@ 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", "3.12"]
|
python-version: ["3.10", "3.11", "3.12"]
|
||||||
cellxgene_build: [main, latest]
|
cellxgene_build: [main, latest]
|
||||||
@@ -95,7 +100,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 flatbuffers==2.0.7
|
pip install --force-reinstall numpy==2.0.1 numba>=0.60.0 pandas
|
||||||
- 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
|
||||||
|
|||||||
@@ -28,10 +28,13 @@ jobs:
|
|||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- name: Install dependencies
|
- name: Install dependencies now
|
||||||
run: |
|
run: |
|
||||||
pip install flake8
|
pip install flake8
|
||||||
pip install black
|
pip install black
|
||||||
|
pip install setuptools
|
||||||
|
- name: Install client dependencies
|
||||||
|
run: |
|
||||||
cd client
|
cd client
|
||||||
npm install
|
npm install
|
||||||
- name: Format with black and lint with flake8
|
- name: Format with black and lint with flake8
|
||||||
@@ -98,9 +101,7 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: make pydist install-dist
|
||||||
pip install setuptools
|
|
||||||
make pydist install-dist
|
|
||||||
- name: Smoke tests (without annotations feature)
|
- name: Smoke tests (without annotations feature)
|
||||||
run: |
|
run: |
|
||||||
cd client && make smoke-test
|
cd client && make smoke-test
|
||||||
|
|||||||
@@ -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.10+. 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.6+. 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.
|
||||||
|
|
||||||
@@ -76,6 +76,7 @@ This project was started with the sole goal of empowering the scientific communi
|
|||||||
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
|
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
|
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.
|
[roadmap](https://github.com/chanzuckerberg/cellxgene-documentation/blob/main/roadmap.md) and under active development.
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
18.17.0
|
16.20.0
|
||||||
@@ -14,7 +14,6 @@ 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,
|
||||||
|
|||||||
Generated
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cellxgene",
|
"name": "cellxgene",
|
||||||
"version": "1.3.0",
|
"version": "1.2.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cellxgene",
|
"name": "cellxgene",
|
||||||
"version": "1.3.0",
|
"version": "1.2.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/eslint-parser": "^7.15.0",
|
"@babel/eslint-parser": "^7.15.0",
|
||||||
@@ -116,8 +116,8 @@
|
|||||||
"webpack-obsolete-plugin": "^1.0.5"
|
"webpack-obsolete-plugin": "^1.0.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.17.0",
|
"node": "^16.0.0",
|
||||||
"npm": ">=9.6.7"
|
"npm": ">=3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cellxgene",
|
"name": "cellxgene",
|
||||||
"version": "1.3.0",
|
"version": "1.2.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": ">=9.6.7",
|
"npm": ">=3.0.0",
|
||||||
"node": "^18.17.0"
|
"node": "^16.0.0"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": "./configuration/eslint/eslint.js"
|
"extends": "./configuration/eslint/eslint.js"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- npm
|
- npm
|
||||||
- Python 3.10+
|
- Python 3.6+
|
||||||
- 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.10 with virtualenv) with the `scripts/backend_dev` script.
|
- You can also install/launch the server side code from npm scrips (requires python3.6 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
|
||||||
@@ -11,10 +11,9 @@ $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` builds whole app client and server
|
* `make build-client` runs webpack build
|
||||||
- `make build-client` runs webpack build
|
* `make build-for-server-dev` builds client and copies output directly into
|
||||||
- `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
|
||||||
@@ -22,19 +21,17 @@ $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
|
||||||
|
|
||||||
@@ -45,18 +42,16 @@ 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-dev` - installs from local source tree
|
* `install-release-test` - installs from test pypi
|
||||||
- `install-release-test` - installs from test pypi
|
* `install-release` - installs from pypi
|
||||||
- `install-release` - installs from pypi
|
* `install-dist` - installs from local dist folder
|
||||||
- `install-dist` - installs from local dist folder
|
* `uninstall` - uninstalls cellxgene
|
||||||
- `uninstall` - uninstalls cellxgene
|
|
||||||
|
|
||||||
## Client-level scripts
|
## Client-level scripts
|
||||||
|
|
||||||
@@ -67,9 +62,8 @@ 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).
|
||||||
- The server to be running. Best way to do this is with [backend_dev](#backend_dev).
|
* `make ci` to install the necessary node modules
|
||||||
- `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`
|
||||||
|
|
||||||
@@ -81,24 +75,23 @@ 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.10+`, `virtual-env`, `pip`
|
**Requires** `Python3.6+`, `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.12 -m venv cellxgene | creates cellxgene virtual environment |
|
| python3.6 -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 |
|
||||||
@@ -109,15 +102,14 @@ 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
@@ -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.3.0"
|
__version__ = "1.2.0"
|
||||||
display_version = "cellxgene v" + __version__
|
display_version = "cellxgene v" + __version__
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ with open("server/requirements-annotate.txt") as fh:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="cellxgene",
|
name="cellxgene",
|
||||||
version="1.3.0",
|
version="1.2.0",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
url="https://github.com/chanzuckerberg/cellxgene",
|
url="https://github.com/chanzuckerberg/cellxgene",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
@@ -37,9 +37,8 @@ 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.10",
|
"Programming Language :: Python :: 3.6",
|
||||||
"Programming Language :: Python :: 3.11",
|
"Programming Language :: Python :: 3.7",
|
||||||
"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",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user