Refactor czi_hosted and server into backend directory, pull common code into backend/common, refactor tests (#2102)

* move local_server -> backend/server server-> backend/czi_hosted, pull common code into backend/common update imports, tests and make commands
This commit is contained in:
Madison Dunitz
2021-03-26 00:27:07 -05:00
committed by GitHub
parent e6e358ddc8
commit 78c9d24ed4
425 changed files with 734 additions and 5317 deletions
+5 -5
View File
@@ -41,8 +41,8 @@ jobs:
run: |
# 1. only install the dev requirements on top of what is in the cellxgene pip package
sudo apt-get update && sudo apt-get install -y libhdf5-serial-dev
sed -i 's/-r requirements.txt//' server/requirements-dev.txt
pip install -r server/requirements-dev.txt
sed -i 's/-r requirements.txt//' backend/server/requirements-dev.txt
pip install -r backend/server/requirements-dev.txt
# 2. install cellxgene
make pydist install-dist
# 3. install anndata
@@ -73,8 +73,8 @@ jobs:
cd cellxgene
# 1. only install the dev requirements on top of what is in the cellxgene pip package
make dev-env-client
sed -i 's/-r requirements.txt//' server/requirements-dev.txt
pip install -r server/requirements-dev.txt
sed -i 's/-r requirements.txt//' backend/server/requirements-dev.txt
pip install -r backend/server/requirements-dev.txt
# 2. install cellxgene
pip install --upgrade cellxgene
# 3. install anndata
@@ -101,7 +101,7 @@ jobs:
- name: Install dependencies
run: |
cd cellxgene
sed -i -E 's/^anndata[>=]=[0-9]+.[0-9]+.[0-9]+$/anndata/g' server/requirements.txt
sed -i -E 's/^anndata[>=]=[0-9]+.[0-9]+.[0-9]+$/anndata/g' backend/server/requirements.txt
make pydist install-dist dev-env
pip install git+https://github.com/theislab/anndata
- name: Tests
+8 -8
View File
@@ -68,11 +68,11 @@ jobs:
run: make pydist install-dist dev-env-server
- name: Unit tests
run: |
make unit-test
bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k server -cF backend,python,unitTest
make unit-test-server
bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k backend/server -cF backend,python,unitTest
cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest
unit-test-local:
unit-test-czi-hosted:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -95,11 +95,11 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: make pydist-local install-dist dev-env-local-server
run: make pydist-czi-hosted install-dist dev-env-czi-hosted
- name: Unit tests
run: |
make unit-test-local
bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k local_server -cF backend,python,unitTest
make unit-test-czi-hosted
bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k backend/czi-hosted -cF backend,python,unitTest
cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest
smoke-tests:
@@ -126,7 +126,7 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: make pydist install-dist
run: make pydist-czi-hosted install-dist
- name: Smoke tests (without annotations feature)
run: |
cd client && make smoke-test
@@ -156,7 +156,7 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: make pydist-local install-dist
run: make pydist install-dist
- name: Smoke tests (with annotations feature)
run: |
cd client && make smoke-test-annotations
+2 -2
View File
@@ -15,10 +15,10 @@ jobs:
python-version: 3.7
- name: Install dependencies
run: |
pip install -r server/test/locust/requirements-locust.txt
pip install -r backend/czi_hosted/test/locust/requirements-locust.txt
- name: Dev Scale Test
run: |
locust -f server/test/locust/locustfile.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt
locust -f backend/czi_hosted/test/locust/locustfile.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt
- name: Slack success webhook
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}