Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #172

Open
wants to merge 380 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
380 commits
Select commit Hold shift + click to select a range
5e2b180
write bam_bai download script to cloud bucket
samwachspress Apr 27, 2021
171293f
Merge pull request #25 from northwestern-mti/feature/bg-thread
samwachspress Apr 27, 2021
cf39fff
fix blobPath
samwachspress Apr 28, 2021
182d107
Merge pull request #26 from northwestern-mti/feature/bg-thread
samwachspress Apr 28, 2021
fc06a07
update indel primer
samwachspress Apr 28, 2021
3203947
update queue
samwachspress Apr 28, 2021
797c61b
fix dockerfile
samwachspress Apr 28, 2021
0c03fd5
Merge pull request #27 from northwestern-mti/feature/indel-primer
samwachspress Apr 28, 2021
257efaf
fix capitalization
samwachspress Apr 28, 2021
c4cc5c1
secure indel primer
samwachspress Apr 28, 2021
36656b6
noindex, update indel primer
samwachspress Apr 28, 2021
59cc877
Merge pull request #28 from northwestern-mti/feature/indel-primer
samwachspress Apr 28, 2021
88d2e96
remove jwt-csrf and revise text content
samwachspress Apr 28, 2021
ec16cb2
Merge pull request #29 from northwestern-mti/feature/indel-primer
samwachspress Apr 28, 2021
067d009
update decrypt key
samwachspress Apr 28, 2021
c8f92d9
Merge pull request #30 from northwestern-mti/feature/indel-primer
samwachspress Apr 28, 2021
cca68f2
do not save output of vk primer
samwachspress Apr 28, 2021
05a5024
log exception
samwachspress Apr 28, 2021
1ffd028
remove none string cast
samwachspress Apr 28, 2021
5ba84b7
Merge pull request #31 from northwestern-mti/hotfix/downloads
samwachspress Apr 28, 2021
7cb0e6c
use service account to init bucket client
samwachspress Apr 28, 2021
c808e2e
Merge pull request #32 from northwestern-mti/hotfix/downloads
samwachspress Apr 28, 2021
7694cc0
fix script download path
samwachspress Apr 28, 2021
0c1cdc9
fix search download tab
samwachspress Apr 28, 2021
61818f6
Merge pull request #33 from northwestern-mti/hotfix/downloads
samwachspress Apr 28, 2021
054fac4
do not save output of vk primer
samwachspress Apr 28, 2021
097cce5
Merge branch 'feature/indel-primer' of https://github.com/northwester…
samwachspress Apr 28, 2021
c32a619
update indel primer reports
samwachspress Apr 29, 2021
67285b1
update text
samwachspress Apr 29, 2021
f93fb1d
Merge pull request #34 from northwestern-mti/feature/indel-primer
samwachspress Apr 29, 2021
d27df17
fix snackbar colors
samwachspress Apr 29, 2021
5577a97
update cron
samwachspress Apr 29, 2021
dbe173d
update content
samwachspress Apr 29, 2021
1867c68
ssl exempt tasks url
samwachspress Apr 29, 2021
68baee4
verify ip for cron tasks
samwachspress Apr 29, 2021
ecb3a20
update browser, buttons, ip results
samwachspress Apr 29, 2021
944c269
update shibboleth sp x509 cert
samwachspress Apr 29, 2021
985e2f7
fix hash id task queueing
samwachspress Apr 30, 2021
619b118
update protocols
samwachspress Apr 30, 2021
c2653c5
handle task queue exception
samwachspress Apr 30, 2021
d4149f1
whitespace
samwachspress Apr 30, 2021
f8bb4ea
scroll lock during paste or sample load
samwachspress Apr 30, 2021
35e494e
ip text update
samwachspress Apr 30, 2021
3852322
fix igv browser
samwachspress May 3, 2021
2369d22
fix igv browser
samwachspress May 3, 2021
4a1baac
Merge pull request #35 from northwestern-mti/feature/genome-browser
samwachspress May 3, 2021
ec61989
log cron task ip
samwachspress May 3, 2021
bef0d9c
Merge branch 'development' of https://github.com/northwestern-mti/CeN…
samwachspress May 3, 2021
c845c30
temp disable ip checking
samwachspress May 3, 2021
84241a3
ignore ip, x-* headers are stripped from external req
samwachspress May 3, 2021
cd7fc30
remove comment
samwachspress May 4, 2021
46684cb
improve indel primer list page
samwachspress May 4, 2021
e5d195e
newline at eof
samwachspress May 4, 2021
e6d9c5a
Merge pull request #36 from northwestern-mti/feature/indel-primer
samwachspress May 4, 2021
5d657fc
fix bam tracks loading
samwachspress May 4, 2021
5992127
remove variants
samwachspress May 4, 2021
4c09231
btn
samwachspress May 4, 2021
e4a80e4
Merge pull request #37 from northwestern-mti/feature/indel-primer
samwachspress May 4, 2021
f358728
sample tracks
samwachspress May 4, 2021
8435c11
Merge pull request #38 from northwestern-mti/feature/indel-primer
samwachspress May 4, 2021
399bf4d
updates to igv browser
samwachspress May 4, 2021
390c436
Merge pull request #39 from northwestern-mti/feature/indel-primer
samwachspress May 4, 2021
2a7521e
improve datatables
samwachspress May 4, 2021
00c35f7
eof newline
samwachspress May 4, 2021
2e436f4
Merge pull request #40 from northwestern-mti/feature/heritability
samwachspress May 4, 2021
fe794d9
initial commit
samwachspress May 5, 2021
f89cd48
fix task queue properties
samwachspress May 5, 2021
96f9823
update retry logic for task queues
samwachspress May 5, 2021
1315d92
add dockerfile
samwachspress May 5, 2021
6642327
replace csi links with tbi
samwachspress May 5, 2021
bc2e093
update queue logic
samwachspress May 5, 2021
251f273
Update README.md
samwachspress May 5, 2021
5de04ca
Merge pull request #42 from northwestern-mti/feature/csi-tbi
samwachspress May 6, 2021
a316f93
update gene browser, relocate
samwachspress May 10, 2021
cdf662e
cleanup wb versions, gbrowser, add vbrowser
samwachspress May 10, 2021
1c93353
construct variant db schema and etl fn
samwachspress May 12, 2021
0d2ddda
update browsers
samwachspress May 12, 2021
29883d2
Merge pull request #43 from northwestern-mti/feature/variant-browser
samwachspress May 12, 2021
08de570
remove cloud run containers
samwachspress May 12, 2021
c76fc28
remove junk env_configs
samwachspress May 12, 2021
c17980f
migrate to external postgresql db
samwachspress May 13, 2021
b381b46
Merge pull request #44 from northwestern-mti/postgres
samwachspress May 13, 2021
30c3086
update dockerfile
samwachspress May 13, 2021
46bdb59
Merge pull request #45 from northwestern-mti/postgres
samwachspress May 13, 2021
8849567
update requirements
samwachspress May 13, 2021
fec4fe5
update db uri
samwachspress May 13, 2021
a646df8
add cloud_sql_instance unix socket to app engine
samwachspress May 13, 2021
2fb849b
update connection string for unix socket
samwachspress May 13, 2021
9d73aea
fix app.yaml
samwachspress May 13, 2021
4568d55
move cloud sql init to start of app.yaml
samwachspress May 13, 2021
d7efe45
update env_conf
samwachspress May 13, 2021
57b1dd2
fix config
samwachspress May 13, 2021
fb08a36
update env_conf and config to force code reload
samwachspress May 13, 2021
18affbb
force relod
samwachspress May 13, 2021
ee46fd9
Merge pull request #46 from northwestern-mti/feature/force-reload
samwachspress May 13, 2021
f798cdf
again
samwachspress May 13, 2021
bcbd0bb
Merge pull request #47 from northwestern-mti/feature/force-reload
samwachspress May 13, 2021
1d3a79d
update sql query for postgres
samwachspress May 13, 2021
c1509bd
Merge pull request #48 from northwestern-mti/feature/force-reload
samwachspress May 13, 2021
7e5bda9
fix isotype count query
samwachspress May 13, 2021
86aa3dd
Merge pull request #49 from northwestern-mti/feature/force-reload
samwachspress May 13, 2021
6b676e1
update navbar text
samwachspress May 13, 2021
23c5c51
Merge pull request #50 from northwestern-mti/feature/force-reload
samwachspress May 13, 2021
294cfa8
travis ver
samwachspress May 13, 2021
39208ac
Merge branch 'development' of https://github.com/northwestern-mti/CeN…
samwachspress May 13, 2021
5d52c3c
update psql uri
samwachspress May 13, 2021
4abe619
add to_json for wormbase gene summary
samwachspress May 13, 2021
891a662
jsonify gene search results
samwachspress May 14, 2021
39676c0
fix homolog search and to_json
samwachspress May 14, 2021
21cce57
return more homolog results
samwachspress May 14, 2021
1d4fd47
col reordering and validation
samwachspress May 14, 2021
62f3953
Merge pull request #51 from northwestern-mti/feature/variant-browser
samwachspress May 14, 2021
129df81
use name to ref columns
samwachspress May 14, 2021
8c93db3
Merge pull request #52 from northwestern-mti/feature/variant-browser
samwachspress May 14, 2021
9df3d99
redraw highlight on page change
samwachspress May 14, 2021
5025a27
Merge pull request #53 from northwestern-mti/feature/variant-browser
samwachspress May 14, 2021
93d54a9
ref strains col by name not index
samwachspress May 14, 2021
adf9448
Merge pull request #54 from northwestern-mti/feature/variant-browser
samwachspress May 14, 2021
d6c236a
block empty form submit
samwachspress May 14, 2021
6923635
ignore case for gene searches
samwachspress May 17, 2021
497c174
update db user and email CCs
samwachspress May 17, 2021
eaa8e18
Merge pull request #55 from northwestern-mti/feature/variant-browser
samwachspress May 17, 2021
3791963
layout updates with bootstrap
samwachspress May 20, 2021
7b4e5a9
Merge pull request #56 from northwestern-mti/feature/flexbox
samwachspress May 20, 2021
d803a2f
fix buttons
samwachspress May 20, 2021
55c8e19
stylesheet
samwachspress May 20, 2021
b183bdc
Merge pull request #57 from northwestern-mti/feature/flexbox
samwachspress May 20, 2021
b08388c
fix other btn
samwachspress May 20, 2021
9a317e3
Merge pull request #58 from northwestern-mti/feature/flexbox
samwachspress May 20, 2021
f26fc74
add styles update
samwachspress May 20, 2021
11207a1
Merge pull request #59 from northwestern-mti/feature/flexbox
samwachspress May 20, 2021
c903048
travis++
samwachspress May 20, 2021
295a2da
Merge pull request #60 from northwestern-mti/feature/flexbox
samwachspress May 20, 2021
a577943
add nemascan task queue
samwachspress May 27, 2021
c42c119
remove logging
samwachspress May 27, 2021
187641a
file upload form stub
samwachspress May 27, 2021
8361a21
add nemascan task datastore kind
samwachspress May 27, 2021
9b18416
add gcloud api to upload file objects as blobs
samwachspress May 27, 2021
ef48f08
create mapping file upload page
samwachspress May 27, 2021
734a597
index for h2 task should be uuid not data hash
samwachspress May 27, 2021
ef6155e
Update DB creation and add variant annotation
samwachspress Jun 1, 2021
3275934
update cloud sql db names
samwachspress Jun 1, 2021
a0c0f02
add readme
samwachspress Jun 1, 2021
d8ef099
missing space
samwachspress Jun 1, 2021
851a20b
create timing decorator
samwachspress Jun 4, 2021
03c2fda
move constants
samwachspress Jun 4, 2021
459880a
Merge pull request #62 from northwestern-mti/feature/heritability
samwachspress Jun 9, 2021
4150877
Merge pull request #63 from northwestern-mti/feature/variant-browser
samwachspress Jun 9, 2021
6ed41ab
Merge branch 'development' into feature/nemascan
samwachspress Jun 9, 2021
a049155
remove sqlite_path to surface any ref errors
samwachspress Jun 11, 2021
e08e4ee
whitespace
samwachspress Jun 11, 2021
d1070e5
update mapping text prompt
samwachspress Jun 11, 2021
0a39303
add list_files to gcloud api
samwachspress Jun 11, 2021
529c564
initial commit for mapping result pages (needs work)
samwachspress Jun 11, 2021
4465f4e
mapping view updates
samwachspress Jun 11, 2021
62213dd
whitespace
samwachspress Jun 11, 2021
7ec5c9a
Merge pull request #61 from northwestern-mti/feature/nemascan
samwachspress Jun 11, 2021
aabc987
update env config
samwachspress Jun 11, 2021
56260d9
Merge pull request #70 from northwestern-mti/feature/nemascan
samwachspress Jun 11, 2021
02ca151
small fixes
samwachspress Jun 11, 2021
a4f41e6
Merge pull request #71 from northwestern-mti/feature/nemascan
samwachspress Jun 11, 2021
8414287
remove filename from schema since it is standardized
samwachspress Jun 11, 2021
6c66ac1
hash file contents instead of file object
samwachspress Jun 11, 2021
f8403e9
stage uploaded file on server for hashing
samwachspress Jun 12, 2021
4151343
whitespace
samwachspress Jun 12, 2021
b7c7f3d
Merge pull request #72 from northwestern-mti/feature/nemascan
samwachspress Jun 12, 2021
d4bef48
fix file hashing
samwachspress Jun 12, 2021
2368ebd
Merge pull request #73 from northwestern-mti/feature/nemascan
samwachspress Jun 12, 2021
ebb6e68
fix button colors, update queue
samwachspress Jun 14, 2021
cb390e5
fix warning snackbar readability
samwachspress Jun 14, 2021
c465955
add mapping results pages
samwachspress Jun 14, 2021
e5f6edf
link profile to mapping results page
samwachspress Jun 14, 2021
b7b4d36
add link to partial result filelist
samwachspress Jun 14, 2021
634330c
cleanup checks for existing data, results; switch task id from data_h…
samwachspress Jun 14, 2021
c2a8ad9
consistency
samwachspress Jun 14, 2021
2d27c41
Merge pull request #74 from northwestern-mti/feature/nemascan
samwachspress Jun 14, 2021
4dd6c58
update mapping result views
samwachspress Jun 14, 2021
0cc3c82
Merge pull request #75 from northwestern-mti/feature/nemascan
samwachspress Jun 14, 2021
8fd5f23
update some styling
samwachspress Jun 14, 2021
ce501a3
Merge pull request #76 from northwestern-mti/feature/nemascan
samwachspress Jun 14, 2021
65ef67d
update checkout button color
samwachspress Jun 14, 2021
6fdba01
enable strain sets 7 and 8
samwachspress Jun 14, 2021
53bee69
add strains 9 and 10 as disabled
samwachspress Jun 14, 2021
e7cce9d
fix dict -> json conversion
samwachspress Jun 14, 2021
2dd51b8
Merge pull request #77 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 14, 2021
7fcd979
remove legacy code
samwachspress Jun 14, 2021
fd0aabf
convert json
samwachspress Jun 14, 2021
526c449
Merge pull request #78 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 14, 2021
efd2e45
fix template path
samwachspress Jun 14, 2021
909fd9c
fix about page (dict -> json)
samwachspress Jun 15, 2021
663bd33
alert user for file error, dont store datastore entry
samwachspress Jun 15, 2021
d0e1b86
Merge pull request #79 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 15, 2021
65bd039
mapping fixes
samwachspress Jun 15, 2021
94f9331
Merge pull request #80 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 15, 2021
99402b3
fix homepage layout issue
samwachspress Jun 15, 2021
26bdf4a
add variant impact filter
samwachspress Jun 15, 2021
9e1625a
Merge pull request #81 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 15, 2021
0a34fc2
style some buttons, update Form -> FlaskForm
samwachspress Jun 16, 2021
563c2d4
add vbrowser feature requests
samwachspress Jun 16, 2021
9916228
Merge pull request #82 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 16, 2021
420f787
fetch isotype values to populate checklist in variant browser
samwachspress Jun 20, 2021
25b3884
disable cloud debugger
samwachspress Jun 20, 2021
5acfddd
update mapping status info
samwachspress Jun 20, 2021
2f896c9
add landing page tiles
samwachspress Jun 20, 2021
0123143
fix button styles and links from home page to landing pages
samwachspress Jun 20, 2021
8c10894
remove inconsistent period
samwachspress Jun 20, 2021
7688501
Merge pull request #83 from northwestern-mti/hotfix/bugsmash
samwachspress Jun 20, 2021
6ada76c
last bits
samwachspress Jun 20, 2021
2edd47b
travis ver
samwachspress Jun 20, 2021
1aeff5a
fix travis
samwachspress Jun 20, 2021
1776de9
force cache busting of css
samwachspress Jun 20, 2021
571716c
disable NU sso
samwachspress Jun 22, 2021
739e62a
update mapping instruction text
samwachspress Jun 22, 2021
8d8c4b3
add alt text to homepage video
samwachspress Jun 22, 2021
122897c
fix release notes
samwachspress Jun 22, 2021
7a67ed5
travis ver
samwachspress Jun 22, 2021
26490a6
fix link styles, update css version
samwachspress Jun 23, 2021
cc0e094
add point estimate if infinite
katiesevans Jun 25, 2021
3802b4d
Merge pull request #1 from AndersenLab/fix_infinite_ci
samwachspress Jun 28, 2021
54c83b0
add results download
samwachspress Jun 28, 2021
0b50b93
update NU styles
samwachspress Jun 28, 2021
8bf6e44
travis++
samwachspress Jun 29, 2021
ac018a3
force clear css cache
samwachspress Jun 29, 2021
493de78
travis++
samwachspress Jun 29, 2021
10835af
force tls ver
samwachspress Jul 9, 2021
a3ce1dc
fix soft filter isotype vcf gz tbi
samwachspress Sep 8, 2021
523c71e
add default cron task
samwachspress Sep 8, 2021
9a0a77a
update travis version
samwachspress Sep 8, 2021
50cc94f
save to bam path
samwachspress Sep 8, 2021
5ee4277
travis++
samwachspress Sep 8, 2021
77e76ba
update version and fix bam download
samwachspress Sep 9, 2021
0fe0a15
Merge pull request #85 from northwestern-mti/version-1.7.0g
samwachspress Sep 13, 2021
4b4a7c2
restore dev env settings
samwachspress Sep 13, 2021
3da27d3
sync env.yaml from local
samwachspress Sep 13, 2021
03bcb6f
Initial commit
samwachspress Sep 14, 2021
c3bb8f4
migrate cloud function to separate repo
samwachspress Sep 14, 2021
baff9a9
Add 'external/cloud-functions/generate-thumbnails/' from commit 'c3bb…
samwachspress Sep 14, 2021
0d6980b
Merge pull request #86 from northwestern-mti/feature/git-submodule
samwachspress Sep 14, 2021
713d187
remove internal mapping_worker prototype code
samwachspress Sep 14, 2021
0002d96
remove internal cloud_function code, moved to external repo
samwachspress Sep 14, 2021
b748b7c
make env_config path static instead of relative
samwachspress Sep 15, 2021
92923a4
Update conrtributing markdown
samwachspress Sep 15, 2021
7a4bd16
minimal conda environment (exclude resolved pkgs)
samwachspress Sep 15, 2021
6912b2b
remove obsolete conda env
samwachspress Sep 15, 2021
6809725
add default cloud config.txt
samwachspress Sep 15, 2021
cafef97
Add 'external/cloud-run/h2calc/' from commit '3802b4d9775afc870fd5d84…
samwachspress Sep 15, 2021
41d38da
link external modules
samwachspress Sep 15, 2021
f17a544
add docker images as submodules
samwachspress Sep 15, 2021
5c13380
add submodules
samwachspress Sep 20, 2021
ee01591
Merge pull request #87 from northwestern-mti/cleanup
samwachspress Sep 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .envrc
@@ -1,6 +1,7 @@
export FLASK_APP=main:app
export GAE_VERSION=development-`cat .travis.yml | grep 'VERSION_NUM=' | cut -f 2 -d '='`
export GOOGLE_APPLICATION_CREDENTIALS=env_config/client-secret.json
export CLOUD_CONFIG=1
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/env_config/client-secret.json
export PYTHONPATH=$(pwd)
export WERKZEUG_DEBUG_PIN=off
export TEMPLATES_AUTO_RELOAD=1
Expand Down
14 changes: 12 additions & 2 deletions .gitignore
Expand Up @@ -61,7 +61,7 @@ target/
#Random
*.DS_Store

*.json
package-lock.json

tmp/

Expand All @@ -72,6 +72,10 @@ mapping_worker/.envrc

env_config/
env_config.zip
env_config_mti/
env_config_mti.zip
env_config_al/
env_config_al.zip


.python-version
Expand All @@ -92,4 +96,10 @@ photos/*
*.done

# Heritability run go tool
invoke
invoke

.vscode/launch.json
cloud_functions/heritability_run/strain_data.tsv
base/bam_bai_signed_download_script.sh

uploads/
18 changes: 18 additions & 0 deletions .gitmodules
@@ -0,0 +1,18 @@
[submodule "external/generate-thumbnails"]
path = external/generate-thumbnails
url = https://github.com/AndersenLab/generate-thumbnails
[submodule "external/h2calc"]
path = external/h2calc
url = https://github.com/AndersenLab/h2calc
[submodule "external/nscalc"]
path = external/nscalc
url = https://github.com/AndersenLab/nscalc
[submodule "external/ipcalc"]
path = external/ipcalc
url = https://github.com/AndersenLab/ipcalc
[submodule "external/dockerfile"]
path = external/dockerfile
url = https://github.com/AndersenLab/dockerfile
[submodule "external/NemaScan"]
path = external/NemaScan
url = https://github.com/AndersenLab/NemaScan
29 changes: 29 additions & 0 deletions .travis-al.yml
@@ -0,0 +1,29 @@
language: bash

env:
- GOOGLE_CLOUD_BUCKET="elegansvariation.org" GOOGLE_CLOUD_PROJECT_ID="andersen-lab"

install:
- openssl aes-256-cbc -K $encrypted_f7a2e30d9b29_key -iv $encrypted_f7a2e30d9b29_iv -in env_config_al.zip.enc -out env_config.zip -d
- unzip -qo env_config.zip
- mv env_config_al env_config
- export VERSION_NUM=1-5-9
- export APP_CONFIG=master
- export CLOUD_CONFIG=1
- if [ "${TRAVIS_BRANCH}" != "master" ]; then export APP_CONFIG=development; fi;
- export GAE_VERSION=${APP_CONFIG}-${VERSION_NUM}
- export GOOGLE_APPLICATION_CREDENTIALS=env_config/client-secret.json
- export GOOGLE_CLOUD_BUCKET=${GOOGLE_CLOUD_BUCKET}
- export GOOGLE_CLOUD_PROJECT_ID=${GOOGLE_CLOUD_PROJECT_ID}


deploy:
provider: gae
version: "${GAE_VERSION}"
project: "${GOOGLE_CLOUD_PROJECT_ID}"
keyfile: env_config/client-secret.json
on:
all_branches: true
no_promote: true
no_stop_previous_version: true
skip_cleanup: true
28 changes: 28 additions & 0 deletions .travis-mti.yml
@@ -0,0 +1,28 @@
language: bash

env:
- GOOGLE_CLOUD_BUCKET="elegansvariation" GOOGLE_CLOUD_PROJECT_ID="andersen-lab-302418"

install:
- openssl aes-256-cbc -K $encrypted_eb81f51f2e9b_key -iv $encrypted_eb81f51f2e9b_iv -in env_config_mti.zip.enc -out env_config.zip -d
- unzip -qo env_config.zip
- mv env_config_mti env_config
- export VERSION_NUM=1-5-9
- export APP_CONFIG=master
- export CLOUD_CONFIG=1
- if [ "${TRAVIS_BRANCH}" != "master" ]; then export APP_CONFIG=development; fi;
- export GAE_VERSION=${APP_CONFIG}-${VERSION_NUM}
- export GOOGLE_APPLICATION_CREDENTIALS=env_config/client-secret.json
- export GOOGLE_CLOUD_BUCKET=${GOOGLE_CLOUD_BUCKET}
- export GOOGLE_CLOUD_PROJECT_ID=${GOOGLE_CLOUD_PROJECT_ID}

deploy:
provider: gae
version: "${GAE_VERSION}"
project: "${GOOGLE_CLOUD_PROJECT_ID}"
keyfile: env_config/client-secret.json
on:
all_branches: true
no_promote: true
no_stop_previous_version: true
skip_cleanup: true
14 changes: 10 additions & 4 deletions .travis.yml
@@ -1,18 +1,24 @@
language: bash

env:
- GOOGLE_CLOUD_BUCKET="elegansvariation.org" GOOGLE_CLOUD_PROJECT_ID="andersen-lab"

install:
- openssl aes-256-cbc -K $encrypted_53077b9a3e95_key -iv $encrypted_53077b9a3e95_iv -in env_config.zip.enc -out env_config.zip -d
- openssl aes-256-cbc -K $encrypted_86f5a1ab1ccf_key -iv $encrypted_86f5a1ab1ccf_iv -in env_config.zip.enc -out env_config.zip -d
- unzip -qo env_config.zip
- export VERSION_NUM=1-5-3
- export APP_CONFIG=master
- export VERSION_NUM=9-9-9-9
- export APP_CONFIG=development
- export CLOUD_CONFIG=1
- if [ "${TRAVIS_BRANCH}" != "master" ]; then export APP_CONFIG=development; fi;
- export GAE_VERSION=${APP_CONFIG}-${VERSION_NUM}
- export GOOGLE_APPLICATION_CREDENTIALS=env_config/client-secret.json
- export GOOGLE_CLOUD_BUCKET=${GOOGLE_CLOUD_BUCKET}
- export GOOGLE_CLOUD_PROJECT_ID=${GOOGLE_CLOUD_PROJECT_ID}

deploy:
provider: gae
version: "${GAE_VERSION}"
project: andersen-lab
project: "${GOOGLE_CLOUD_PROJECT_ID}"
keyfile: env_config/client-secret.json
on:
all_branches: true
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
@@ -1,6 +1,6 @@
## Making Changes

* Propose an issue or change you would like ot make using the issue tracker.
* Propose an issue or change you would like to make using the issue tracker.
* Create a fork of the development branch. Once you have completed your work, create a pull request.
* Rebase the latest development branch changes if updates were made in the interim.
* email danielecook@gmail.com if you have further questions.
* email danielecook@gmail.com or sam.wachspress@gmail.com if you have further questions.
7 changes: 6 additions & 1 deletion Dockerfile
Expand Up @@ -16,6 +16,11 @@ tabix \
graphviz \
libgraphviz-dev \
pkg-config \
libxml2 \
xmlsec1 \
libxml2-dev \
libxmlsec1-dev \
libxmlsec1-openssl \
&& rm -rf /var/lib/apt/lists/*

ENV BCFTOOLS_BIN="bcftools-1.10.tar.bz2" \
Expand Down Expand Up @@ -56,6 +61,6 @@ ADD . /app
RUN FLASK_APP=main:app GAE_VERSION=blank-blank flask

# Download the database; GAE_VERSION set as dummy variable
RUN FLASK_APP=main:app GAE_VERSION=blank-blank flask download_db
# RUN FLASK_APP=main:app GAE_VERSION=blank-blank flask download_db

CMD gunicorn -b :$PORT main:app
14 changes: 9 additions & 5 deletions app.yaml
@@ -1,6 +1,10 @@
beta_settings:
cloud_sql_instances: andersen-lab:us-central1:cendr

runtime: custom
service: dev
env: flex
entrypoint: gunicorn -b :$PORT main:app
entrypoint: gunicorn -b :$PORT main:app --ssl-version TLSv1_2
runtime_config:
python_version: 3

Expand Down Expand Up @@ -32,15 +36,15 @@ resources:

liveness_check:
path: "/liveness_check"
check_interval_sec: 30
timeout_sec: 4
check_interval_sec: 60
timeout_sec: 10
failure_threshold: 2
success_threshold: 2

readiness_check:
path: "/readiness_check"
check_interval_sec: 5
timeout_sec: 4
check_interval_sec: 120
timeout_sec: 10
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 300
97 changes: 65 additions & 32 deletions base/application.py
@@ -1,31 +1,40 @@
from datetime import datetime
import os
import json
import requests

from os.path import basename
from base.config import config
from flask import Flask, render_template
from flask_wtf.csrf import CSRFProtect
from base.utils.text_utils import render_markdown
from werkzeug.middleware.proxy_fix import ProxyFix
from werkzeug.exceptions import HTTPException


from base.constants import GOOGLE_CLOUD_BUCKET
from base.config import config
from base.utils.text_utils import render_markdown
from base.manage import (initdb,
update_strains,
update_credentials,
decrypt_credentials,
download_db)
decrypt_credentials)

# --------- #
# Routing #
# --------- #
from base.views.about import about_bp
from base.views.primary import primary_bp
from base.views.strains import strain_bp
from base.views.strains import strains_bp
from base.views.order import order_bp
from base.views.data import data_bp
from base.views.mapping import mapping_bp
from base.views.gene import gene_bp
from base.views.user import user_bp
from base.views.maintenance import maintenance_bp
from base.views.admin.admin import admin_bp
from base.views.admin.users import users_bp
from base.views.admin.data import data_admin_bp



# Tools
from base.views.tools import (tools_bp,
Expand All @@ -42,9 +51,9 @@
from base.views.api.api_data import api_data_bp

# Auth
from base.auth import (auth_bp,
google_bp,
github_bp)
from base.views.auth import (auth_bp,
google_bp,
saml_bp)


# ---- End Routing ---- #
Expand All @@ -54,7 +63,8 @@
cache,
debug_toolbar,
sslify,
sqlalchemy)
sqlalchemy,
jwt)

# Template filters
from base.filters import (comma, format_release)
Expand Down Expand Up @@ -86,7 +96,7 @@ def configure_ssl(app):
# Running on server
app.debug = False
# Ignore leading slash of urls; skips must use start of path
sslify(app)
sslify(app, skips=['tasks'])
elif app.config['DEBUG']:
debug_toolbar(app)
app.config['PRESERVE_CONTEXT_ON_EXCEPTION'] = True
Expand All @@ -97,8 +107,7 @@ def register_commands(app):
for command in [initdb,
update_strains,
update_credentials,
decrypt_credentials,
download_db]:
decrypt_credentials]:
app.cli.add_command(command)


Expand All @@ -110,20 +119,26 @@ def register_template_filters(app):
def register_extensions(app):
markdown(app)
cache.init_app(app, config={'CACHE_TYPE': 'base.utils.cache.datastore_cache'})
sqlalchemy(app)
CSRFProtect(app)
app.config['csrf'] = CSRFProtect(app)

sqlalchemy.init_app(app)
# protect all routes (except the ones listed) from cross site request forgery
csrf = CSRFProtect(app)
csrf.exempt(auth_bp)
csrf.exempt(saml_bp)
csrf.exempt(maintenance_bp)
app.config['csrf'] = csrf
jwt.init_app(app)

def register_blueprints(app):
"""Register blueprints with the Flask application."""
app.register_blueprint(primary_bp, url_prefix='')
app.register_blueprint(about_bp, url_prefix='/about')
app.register_blueprint(strain_bp, url_prefix='/strain')
app.register_blueprint(strains_bp, url_prefix='/strains')
app.register_blueprint(order_bp, url_prefix='/order')
app.register_blueprint(data_bp, url_prefix='/data')
app.register_blueprint(mapping_bp, url_prefix='')
app.register_blueprint(gene_bp, url_prefix='/gene')

# User
app.register_blueprint(user_bp, url_prefix='/user')

# Tools
Expand All @@ -138,33 +153,51 @@ def register_blueprints(app):
app.register_blueprint(api_data_bp, url_prefix='/api')

# Auth
app.register_blueprint(auth_bp, url_prefix='')
app.register_blueprint(auth_bp, url_prefix='/auth')
app.register_blueprint(saml_bp, url_prefix='/saml')
app.register_blueprint(google_bp, url_prefix='/login')
app.register_blueprint(github_bp, url_prefix='/login')

# Healthchecks
# Admin
app.register_blueprint(admin_bp, url_prefix='/admin')
app.register_blueprint(users_bp, url_prefix='/admin/users')
app.register_blueprint(data_admin_bp, url_prefix='/admin/data')

# Healthchecks/Maintenance
app.register_blueprint(maintenance_bp, url_prefix='/tasks')
app.register_blueprint(check_bp, url_prefix='')


def gs_static(url, prefix='static'):
return f"https://storage.googleapis.com/elegansvariation.org/{prefix}/{url}"
return f"https://storage.googleapis.com/{GOOGLE_CLOUD_BUCKET}/{prefix}/{url}"


def configure_jinja(app):
# Injects "contexts" into templates
@app.context_processor
def inject():
return dict(version=os.environ.get("GAE_VERSION", "-9-9-9").split("-", 1)[1].replace("-", "."),
json=json,
list=list,
str=str,
int=int,
len=len,
gs_static=gs_static,
basename=basename,
render_markdown=render_markdown)


return dict(version=os.environ.get("GAE_VERSION", "-9-9-9").split("-", 1)[1].replace("-", "."),
json=json,
list=list,
str=str,
int=int,
len=len,
gs_static=gs_static,
basename=basename,
render_markdown=render_markdown)

# Datetime filters for Jinja
@app.template_filter('date_format')
def _jinja2_filter_datetime(date, fmt=None):
if fmt:
return date.strftime(fmt)
else:
return date.strftime('%c')

'''
2021-04-14 17:26:51.348674+00:00

'%Y-%m-%d %H:%M:%S.%f+%z'
'''
def register_errorhandlers(app):

def render_error(e="generic"):
Expand Down