Skip to content

Commit

Permalink
Make adjustments so that DATASET path is predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
mweiden committed Apr 15, 2020
1 parent 7b7ec44 commit adca916
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
6 changes: 0 additions & 6 deletions client/Makefile
@@ -1,6 +1,5 @@
include ../common.mk

DATASET := $(if $(DATASET),$(DATASET),../example-dataset/pbmc3k.h5ad)
ANNOTATIONS := $(if $(ANNOTATIONS),$(ANNOTATIONS),../server/test/test_datasets/pbmc3k-annotations.csv)
ANNOTATIONS_FILENAME := $(shell basename $(ANNOTATIONS))

Expand All @@ -23,15 +22,10 @@ build:


# Development convenience methods

.PHONY: start-frontend
start-frontend:
node server/development.js

.PHONY: start-server
start-server:
cellxgene launch -p $(CXG_SERVER_PORT) $(CXG_OPTIONS) $(DATASET)

.PHONY: e2e
e2e:
node node_modules/jest/bin/jest.js \
Expand Down
7 changes: 4 additions & 3 deletions common.mk
Expand Up @@ -13,10 +13,11 @@ endef
export CXG_SERVER_PORT := $(call get_or_else_dev_env_default,CXG_SERVER_PORT)
export CXG_CLIENT_PORT := $(call get_or_else_dev_env_default,CXG_CLIENT_PORT)
export JEST_ENV := $(call get_or_else_dev_env_default,JEST_ENV)
export DATASET := $(if $(DATASET),$(DATASET),$(PROJECT_ROOT)/example-dataset/pbmc3k.h5ad)

export CXG_SERVER_PORT
export CXG_CLIENT_PORT
export JEST_ENV
.PHONY: start-server
start-server:
cellxgene launch -p $(CXG_SERVER_PORT) $(CXG_OPTIONS) $(DATASET)

# copy the client assests to a location known to the server
# $(1) is the source of the client assets
Expand Down
11 changes: 4 additions & 7 deletions scripts/backend_dev
@@ -1,15 +1,12 @@
#!/usr/bin/env bash
set -e

PROJECT_ROOT=$(git rev-parse --show-toplevel)

cd ${PROJECT_ROOT}
${PROJECT_ROOT}/scripts/dev_setup

./scripts/dev_setup

source venv/bin/activate

cd client
source ${PROJECT_ROOT}/venv/bin/activate

export CXG_OPTIONS=${CXG_OPTIONS:---debug}

make start-server
make --file=${PROJECT_ROOT}/common.mk start-server
2 changes: 1 addition & 1 deletion scripts/frontend_dev
@@ -1,7 +1,7 @@
#!/usr/bin/osascript

set DATASET to system attribute "DATASET"
if DATASET is "" then set DATASET to "../example-dataset/pbmc3k.h5ad"
if DATASET is "" then set DATASET to "example-dataset/pbmc3k.h5ad"

set CXG_OPTIONS to system attribute "CXG_OPTIONS"

Expand Down

0 comments on commit adca916

Please sign in to comment.