mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-24 01:58:12 +08:00
Refactor developer convenience scripts (#1377)
* Cleanup the backend-dev convenience method * Add the frontend_dev convenience method frontend_dev is a soup-to-nuts convenience method for setting up the FE development environment with node running a the client code on port 3000 with the a separate cellxgene package serving the API over port 5005 in the background. The script can be run from Finder. * Update the developer scripts documentation * Remove the 'test' make target in the client Makefile Rationale: * Given how long the smoke tests take to run, it is unlikely that developers will want to run all tests together. * It is unlikely that developers will have set up the backend server properly for the tests to pass. * Available commands should be safe-ish and not lend themselves to confusing errors. * You can still group tests by concatenating them in a make command, as in `make unit-test smoke-test`. * This target isn't used in any of our CI pipelines -- KISS. * Some version of python3... * Minor typos in docs * Respond to feedback from @bkmartinjr * Make adjustments so that DATASET path is predictable * Simplify environment defaults a bit
This commit is contained in:
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/osascript
|
||||
|
||||
set DATASET to system attribute "DATASET"
|
||||
set CXG_OPTIONS to system attribute "CXG_OPTIONS"
|
||||
|
||||
on gotoProjectRootDir()
|
||||
tell application "Finder"
|
||||
set current_path to container of (path to me) as alias
|
||||
end tell
|
||||
tell application "Terminal"
|
||||
do script "cd " & (POSIX path of current_path) & ".." in front window
|
||||
end tell
|
||||
end gotoProjectRootDir
|
||||
|
||||
on newTab()
|
||||
tell application "System Events" to keystroke "t" using command down
|
||||
delay 0.05
|
||||
end newTab
|
||||
|
||||
tell application "Terminal"
|
||||
activate
|
||||
reopen
|
||||
|
||||
my newTab()
|
||||
my gotoProjectRootDir()
|
||||
if DATASET is not equal to "" then
|
||||
do script "export DATASET=" & DATASET in front window
|
||||
end if
|
||||
if CXG_OPTIONS is not equal to "" then
|
||||
do script "export CXG_OPTIONS=" & CXG_OPTIONS in front window
|
||||
end if
|
||||
do script "./scripts/backend_dev" in front window
|
||||
|
||||
my newTab()
|
||||
my gotoProjectRootDir()
|
||||
do script "sleep 1
|
||||
# This tab is for the client hot-reloading node server. It will wait until cellxgene is built before continuing. Please hang in there while the other tab completes.
|
||||
while [ `ps aux | grep dev_setup | grep -v grep | awk '{ print $2 }'` ]; do sleep 1; done
|
||||
cd client/
|
||||
make start-frontend" in window 1
|
||||
|
||||
end tell
|
||||
Reference in New Issue
Block a user