added unit test

This commit is contained in:
Alok Saldanha
2019-09-16 10:58:02 -04:00
parent 15998beb68
commit 1e1de19878
5 changed files with 51 additions and 18 deletions
+9 -2
View File
@@ -65,6 +65,7 @@ Here's what the environment variables mean:
* `CELLXGENE_DATA` - a directory that can contain subdirectories with `.h5ad` data files, *without* trailing slash, e.g. `/mnt/cellxgene_data`
* `GATEWAY_HOST` - the hostname and port that the gateway will run on, typically `localhost:5005` if running locally
* `GATEWAY_PROTOCOL` - typically http when running locally, can be https when deployed if the gateway is behind a load balancer or reverse proxy.
* `GATEWAY_EXTRA_SCRIPTS` - (optional) JSON array of script paths, will be embedded into each page and forwarded with `--scripts` to cellxgene server
The defaults should be fine if you set up a venv and cellxgene_data folder as above.
@@ -73,11 +74,11 @@ The defaults should be fine if you set up a venv and cellxgene_data folder as ab
The current paradigm for customization is to modify files during a build or deployment phase:
* To modify CSS or JS on particular gateway pages, overwrite or append to the templates
* To add script tags such as for user analytics to all pages, overwrite the extra_scripts.py file.
* To add script tags such as for user analytics to all pages, set GATEWAY_EXTRA_SCRIPTS
* these scripts will also be run on the pages served by cellxgene server via the --scripts parameter
* See https://github.com/chanzuckerberg/cellxgene/pull/680 for details on --scripts parameter
Currently we use a build.sh that copies the gateway to a "build" directory before modifying with sed and the like.
Currently we use a bash script that copies the gateway to a "build" directory before modifying templates with sed and the like. There is probably a better way.
# Development
@@ -106,6 +107,12 @@ python setup.py develop
For convenience, the code repo includes a `run.sh.example` shell script to run the gateway.
## Running Tests
```bash
python -m unittest discover tests
```
## Running Linters
pip install isort flake8 black