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

Dev live #103

Draft
wants to merge 429 commits into
base: prod-live
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
429 commits
Select commit Hold shift + click to select a range
5671c85
change color of action bar - to better complement website
IsmailM Jul 6, 2020
ed254f9
start with the actionbar closed
IsmailM Jul 6, 2020
dfaf772
move meta data component to its own folder
IsmailM Jul 6, 2020
cdccfc1
#95 - update UI
IsmailM Jul 6, 2020
2275c18
remove warnings
IsmailM Jul 6, 2020
4d65334
Fix bug for string-object mix column.
YuanTian1991 Jul 7, 2020
a3fb90c
Eslint automatic Prettier
YuanTian1991 Jul 7, 2020
6ab9498
add _redirects_localhost
IsmailM Jul 8, 2020
5d3ef6f
Feature#100 (#137)
YuanTian1991 Jul 10, 2020
237993f
refactored search and added the functionality to redux
tamarkhachatryan Jul 20, 2020
b7a1f28
fixed routing refresh bug
tamarkhachatryan Jul 21, 2020
c1dbd4d
Improve search ui (#149)
YuanTian1991 Jul 26, 2020
54a4b3d
add missing check_auth in change_password
IsmailM Jul 12, 2020
b00c791
adding variant search + some refactoring around conversion of results…
priesgo Jul 19, 2020
760e9c8
Code tidy (#97)
alanwilter Jul 27, 2020
861f236
61 consanguinity editing (#101)
priesgo Jul 29, 2020
65fbc07
improve search with HGVS, Ensembl ids and HPO ids (#105)
priesgo Jul 31, 2020
7f27b31
44 create new patient (#109)
priesgo Aug 1, 2020
2b56446
add endpoint to create users (#114)
priesgo Aug 1, 2020
105da6e
add 404s to individuals endpoints (#113)
priesgo Aug 2, 2020
cf77c22
89 create new user individuals (#116)
priesgo Aug 3, 2020
4f8104c
PyTest at last (#117)
alanwilter Aug 3, 2020
d805c5f
copy config from admin user for new users (#118)
priesgo Aug 3, 2020
eec36d1
Updated tests after PR #118 (#119)
alanwilter Aug 3, 2020
d638376
Update requirements.txt (#120)
pontikos Aug 3, 2020
a96aa0b
Fix db (#121)
alanwilter Aug 4, 2020
fd2c639
Update python-app.yml (#125)
alanwilter Aug 4, 2020
0f991cf
Update python-app.yml (#126)
alanwilter Aug 4, 2020
b7a4550
Update python-app.yml (#127)
alanwilter Aug 4, 2020
92295ef
Update python-app.yml (#128)
alanwilter Aug 4, 2020
1d4f8bf
fix #160 - use `user` instead of name of login (#162)
IsmailM Aug 4, 2020
c6e52cd
98 configurable search limmit (#129)
priesgo Aug 4, 2020
ca9883f
Improve searching (#133)
YuanTian1991 Aug 8, 2020
7078921
Improve searching (#164)
YuanTian1991 Aug 8, 2020
5366e04
authentication refactoring (#165)
tamarkhachatryan Aug 8, 2020
ac77931
New hpo (#141)
dvarrazzo Aug 9, 2020
053c3b3
Solve issues (#168)
YuanTian1991 Aug 9, 2020
f8b33dc
Black run on a couple of scripts
dvarrazzo Aug 10, 2020
8c2a7ae
my patients refactored (#182)
tamarkhachatryan Aug 10, 2020
67fbed3
Separate the app db user from the superuser and default db (#140)
dvarrazzo Aug 10, 2020
ea82290
Don't expose port 5432 (#138)
dvarrazzo Aug 10, 2020
c11135c
Made HPO tables writable by the phenopolis_api user (#144)
dvarrazzo Aug 10, 2020
d40766e
Added gnomad annotations table and import script (#145)
dvarrazzo Aug 10, 2020
d9214c8
Use a persistent volume for the db in docker-compose
dvarrazzo Aug 10, 2020
58304cd
Remove dead code (#185)
IsmailM Aug 10, 2020
aadd810
refactor search (#187)
IsmailM Aug 10, 2020
c40d6a6
refactor home component (#186)
IsmailM Aug 10, 2020
5e14343
Exclude .vscode and convert to unix variant.csv (was CRLF) (#147)
alanwilter Aug 10, 2020
01ea856
autocomple.py failed black and flake8 (#148)
alanwilter Aug 10, 2020
90a14e3
update eb config
IsmailM Aug 11, 2020
73d9f2d
authCheck refactor (#192)
tamarkhachatryan Aug 11, 2020
767c3e0
general fixes (#195)
tamarkhachatryan Aug 11, 2020
3ddad42
gene refactoring (#196)
tamarkhachatryan Aug 12, 2020
0a1f08b
fix #194
YuanTian1991 Aug 12, 2020
8a62afe
Enslint
YuanTian1991 Aug 12, 2020
915db8e
variant refactoring (#197)
tamarkhachatryan Aug 15, 2020
f7df474
Fixed bug that gene page will not fetch new information.
YuanTian1991 Aug 15, 2020
9a0047d
Enslint
YuanTian1991 Aug 15, 2020
968612d
Updating pytest part1 (#151)
alanwilter Aug 15, 2020
b2992d5
Create phenopolis_api as a role rather than an user in the database (…
dvarrazzo Aug 15, 2020
baf63e9
fixes #152 (#153)
pontikos Aug 15, 2020
58d7599
HPO refactoring (#198)
tamarkhachatryan Aug 18, 2020
e6f2695
Added dchost file and documentation (#154)
dvarrazzo Aug 18, 2020
d266315
Moved styles to SCSS and used functional component instead of class b…
tamarkhachatryan Aug 19, 2020
b906250
Moved CustomizedSnackbars file from page folder to the components, mo…
tamarkhachatryan Aug 19, 2020
ac9e398
Added CADD annotation import (#155)
dvarrazzo Aug 19, 2020
5ddcb92
Publication refactor (#212)
tamarkhachatryan Aug 21, 2020
99f50cd
fix #133
YuanTian1991 Aug 22, 2020
d1c645d
Enslint
YuanTian1991 Aug 22, 2020
bd7dfcf
fix #214
YuanTian1991 Aug 23, 2020
4800246
Enslint
YuanTian1991 Aug 23, 2020
4153590
Added scripts wrapper to patch dev/prod databases (#159)
dvarrazzo Aug 23, 2020
f9e73d5
Added audit functions to the database (#161)
dvarrazzo Aug 23, 2020
a6815b0
Solve issues (#220)
YuanTian1991 Aug 23, 2020
9591f10
Create Individual (#162)
YuanTian1991 Aug 23, 2020
6c6bc7b
Remove Banner for Publication Page.
YuanTian1991 Aug 23, 2020
2d4e495
Moved styles from component to scss. (#224)
tamarkhachatryan Aug 24, 2020
4912c40
Moved styles to the SCSS folder, moved API calls to the redux and use…
tamarkhachatryan Aug 24, 2020
fbed359
Used functional component instead of class based and moved styles to …
tamarkhachatryan Aug 24, 2020
4c23ef6
General refactor (#225)
tamarkhachatryan Aug 24, 2020
c62a333
Moved styles to scss. (#227)
tamarkhachatryan Aug 25, 2020
d220391
AuthCheck.js moved from page folder to components (#226)
tamarkhachatryan Aug 25, 2020
b22cbc9
Used react hooks and moved styles to scss. (#230)
tamarkhachatryan Aug 27, 2020
a9f8cef
Moved AutoComplete.js file to the components/search and used function…
tamarkhachatryan Aug 27, 2020
802b17b
Moved styles to scss and used functional components for ExportExcel.j…
tamarkhachatryan Aug 28, 2020
b4f3eda
Bug fix#229 (#232)
YuanTian1991 Aug 29, 2020
9d2dd56
Buxfix#223 (#233)
YuanTian1991 Aug 29, 2020
4a60e20
Bug fix#234 (#238)
YuanTian1991 Aug 30, 2020
8eada30
Bug fix#237 (#239)
YuanTian1991 Aug 30, 2020
2513d1a
Alan tidying (#173)
alanwilter Sep 1, 2020
ec46e0f
hpo description fields size increased (#177)
dvarrazzo Sep 4, 2020
b9cf073
Import variant (#176)
dvarrazzo Sep 4, 2020
aaccc49
Bug fix#222 (#243)
YuanTian1991 Sep 5, 2020
d2aedbb
Bu fix#242 (#244)
YuanTian1991 Sep 6, 2020
f91a8b4
Bug fix#216 (#245)
YuanTian1991 Sep 6, 2020
d0cd657
Coverage (#179)
alanwilter Sep 12, 2020
5614a5a
Migrate variants (#180)
dvarrazzo Sep 12, 2020
e3296e0
add endpoint to fetch a user with its individuals by id (#185)
priesgo Sep 12, 2020
a6f1646
Added script to import Kaviar annotations (#186)
dvarrazzo Sep 16, 2020
b614f0c
add endpoint to delete user_individuals (#187)
priesgo Sep 17, 2020
e1c69b7
Endpoint to enable/disable users (#188)
priesgo Sep 17, 2020
b6d0f5f
181 list individuals (#190)
priesgo Sep 22, 2020
90b35d8
increase individuals page size to 100000 (#196)
priesgo Oct 4, 2020
96d65f1
Patient CRUD (#248)
YuanTian1991 Oct 4, 2020
ee1f23e
19 migrate individuals sqlalchemy (#195)
priesgo Oct 5, 2020
65cf838
Remove logzero (#194)
alanwilter Oct 5, 2020
cbfe4e6
189 import transcripts (#192)
priesgo Oct 5, 2020
d824f89
add ebignore (#198)
IsmailM Oct 12, 2020
d532f98
102 search order (#197)
priesgo Oct 12, 2020
05b8b73
add self-signed https between LB + Web servers within the VPC (#201)
IsmailM Oct 14, 2020
ca466bd
further changes to eb config
IsmailM Oct 14, 2020
76da479
100 improve hgvs search (#199)
priesgo Oct 15, 2020
7c2b5e5
correct user config seeded in the testing database (#200)
priesgo Oct 15, 2020
0679444
ensures that user creation sets enabled flag by default (#204)
priesgo Oct 16, 2020
deff621
User CRUD (#256)
YuanTian1991 Oct 17, 2020
4e7423c
205/complete users tests (#206)
priesgo Oct 17, 2020
051dadd
205/complete users tests (#207)
priesgo Oct 18, 2020
2e85a38
manage transactions right (#208)
priesgo Oct 19, 2020
37f9598
fix #258, changed enable API into newer version. (#259)
YuanTian1991 Oct 19, 2020
fb8939f
fix #255 (#260)
YuanTian1991 Oct 19, 2020
56994fb
Fixed audit table for users after `enabled` field was added. (#209)
dvarrazzo Oct 21, 2020
c353335
257 error user create (#210)
priesgo Oct 24, 2020
c103be6
adds variant autocomplete by genomic region (#215)
priesgo Oct 25, 2020
e07ae2c
Genome plot (#262)
YuanTian1991 Oct 29, 2020
6816941
Fix accidental change
IsmailM Oct 29, 2020
356008f
add caching on browser of entities querying (#213)
priesgo Oct 31, 2020
9d16810
216 user specific stats (#217)
priesgo Nov 2, 2020
ef0f006
add patch for some old changes to the database (#211)
priesgo Nov 2, 2020
a85ab85
216 user specific stats 2 (#219)
priesgo Nov 7, 2020
ce6c792
Update API (#264)
YuanTian1991 Nov 8, 2020
a636fb4
23 user registration (#218)
priesgo Nov 9, 2020
60ebdab
changing the reference in hom_variants and het_variants to individual…
priesgo Nov 9, 2020
b29e6c5
214 improve variants (#223)
priesgo Nov 9, 2020
f43b1c3
add mising imports (#226)
priesgo Nov 9, 2020
ed3995a
Fix stats performance (#227)
priesgo Nov 9, 2020
46ac12a
Fix stats performance (#228)
priesgo Nov 9, 2020
ad59030
db patch for user registration + callback URL (#225)
priesgo Nov 10, 2020
93905d6
Update variant api (#266)
YuanTian1991 Nov 10, 2020
54034ac
Individual variant (#231)
dvarrazzo Nov 11, 2020
9a2db0c
Replace PySAM with cyvcf2 (#229)
alanwilter Nov 11, 2020
0ede8e2
Update user crud (#267)
YuanTian1991 Nov 14, 2020
20338e9
Multiple confirmations (#237)
priesgo Nov 14, 2020
f8bfa7b
Add 'frontend/' from commit '0ede8e2789387ade4ea4c665833d299d5f804b3d'
IsmailM Nov 14, 2020
011df25
add frontend to docker
IsmailM Nov 14, 2020
7134a60
docker-compose cleanup
dvarrazzo Nov 14, 2020
e65a9d3
update netlify site id with new netlify setup
IsmailM Nov 14, 2020
4a3a403
fix netlify ignore command
IsmailM Nov 14, 2020
9f4da3c
Fixed typo in docker build script
dvarrazzo Nov 14, 2020
a71a18f
Update README.md
pontikos Nov 15, 2020
a98e15a
Added tip about how to query HPO descendants
dvarrazzo Nov 15, 2020
5ee8d68
Confirm component (#247)
YuanTian1991 Nov 16, 2020
d967e3e
Fix varaint preview (#248)
YuanTian1991 Nov 16, 2020
72244da
Get back data missing for variant page (#249)
alanwilter Nov 16, 2020
d4bb43a
Added extra fields to individual_variant (#232)
dvarrazzo Nov 17, 2020
bf43afe
Simplifying tests and improving coverage (#246)
alanwilter Nov 20, 2020
3b9b7ba
New chip tooltip (#281)
YuanTian1991 Nov 21, 2020
aa0106c
Solve some simple issues (#282)
YuanTian1991 Nov 21, 2020
1e34992
Fix some mistaken when I push last night
YuanTian1991 Nov 21, 2020
a43b961
User register (#284)
YuanTian1991 Nov 21, 2020
d6eacbf
Modify password (#286)
YuanTian1991 Nov 22, 2020
9c58e81
Update _redirects_docker
alanwilter Nov 23, 2020
a44157e
Typo, misisng '/' for confirmation link
alanwilter Nov 23, 2020
dace113
Flake/Black users.py
alanwilter Nov 23, 2020
9d59003
Fixing backend variant data format to frontend (#283)
alanwilter Nov 26, 2020
3c76b06
change from windows CRLF to unix LF end of line (#288)
IsmailM Nov 27, 2020
fd64ef7
Feature#279 (#292)
YuanTian1991 Nov 28, 2020
20b1f3e
Improved docker-compose usage (#289)
IsmailM Dec 1, 2020
b2f961f
Fix time out (#294)
YuanTian1991 Dec 1, 2020
82e604b
Improving variants (#290)
IsmailM Dec 2, 2020
6563ec9
GH actions now uses cache and secrets (#295)
alanwilter Dec 7, 2020
291371c
Re-order frontend dockerfile and add node_modules to dockerignore
IsmailM Dec 7, 2020
d424182
Build with latest patchlevel packages
dvarrazzo Dec 13, 2020
7703a52
Corrected ENV
alanwilter Dec 14, 2020
3a8611d
wheel is ineffective here and also cause issues with cyvcf2
alanwilter Dec 14, 2020
e032446
gunicorn must be out of requirements, see issue #183
alanwilter Dec 14, 2020
eb98431
Schema patch psql (#301)
dvarrazzo Dec 20, 2020
a5373b8
Individual variant import (#300)
dvarrazzo Dec 20, 2020
add63c4
Upload files (#304)
YuanTian1991 Dec 26, 2020
3c7f4d8
Import variants from s3 (#305)
dvarrazzo Dec 28, 2020
5d87f88
Lint and fix views/upload.py
dvarrazzo Dec 28, 2020
31e26cf
Don't traceback on aws error (bad credentials, file not found)
dvarrazzo Dec 28, 2020
08884f6
individual_variant.dp larger
dvarrazzo Dec 28, 2020
51c66e9
phenopolis.individual_gene.individual_id changed to int too
dvarrazzo Dec 28, 2020
2212369
Fixed dp field in import script too
dvarrazzo Dec 28, 2020
4114eee
import_hpo can upsert an existing import
dvarrazzo Dec 29, 2020
0766329
Update Footer.js
pontikos Jan 4, 2021
a8713de
fix #307 (#308)
YuanTian1991 Jan 8, 2021
ae27c17
15 variant classification -> refactoring tables from public to phenop…
alanwilter Jan 30, 2021
d661a82
fix #311
YuanTian1991 Jan 30, 2021
41b4e43
Base table (#310)
YuanTian1991 Feb 14, 2021
3939ea6
Updated frontend Dockerfile, using latest netlify (#314)
alanwilter Feb 26, 2021
444d3df
fix #316 (#317)
YuanTian1991 Mar 20, 2021
d495045
Fix no-reply email from org to com (#321)
alanwilter Mar 26, 2021
bf33a84
Fixed Patient edit (#320)
alanwilter Mar 27, 2021
9218b03
fix_dev_db_alan (#322)
alanwilter Mar 28, 2021
25cc0d4
To include phenopolis.individual_gene (#323)
alanwilter Apr 4, 2021
e9751e6
Fix ind (#324)
alanwilter Apr 6, 2021
043c58b
Improved some tests and add sorted to individuals (#325)
alanwilter Apr 7, 2021
f82b107
basic_changes_alan (#326)
alanwilter Apr 7, 2021
d5f8326
Code cleaning
alanwilter Apr 13, 2021
8a2467e
Imroved hpo query and fixed preview numbers
alanwilter Apr 13, 2021
a2a1245
New hpo preview test
alanwilter Apr 13, 2021
c2663e2
fix #327
YuanTian1991 Apr 18, 2021
f784f73
Eslint
YuanTian1991 Apr 18, 2021
91ed042
Make preview window not disappear.
YuanTian1991 Apr 18, 2021
64447d4
Another hpo fix (#336)
alanwilter Apr 18, 2021
a33b19f
Fixed #327 once and for all (#343)
alanwilter May 13, 2021
2990de7
Fix #341
YuanTian1991 May 14, 2021
e7db009
Create LICENSE
pontikos May 16, 2021
3f4a447
A fix for 328 and 318 in the old schema (#344)
alanwilter May 16, 2021
265536f
instructions for troubleshooting docker build
pontikos May 19, 2021
c5f6cc0
Update README.md
pontikos May 19, 2021
50995ac
Updated instructions, fixed typos and format
alanwilter May 19, 2021
f69c767
Introduce end-of-line normalization
alanwilter May 19, 2021
2b3d60e
Introduce end-of-line normalization
alanwilter May 19, 2021
ec8aa19
Add VERSION tag to code based on commit_id
alanwilter May 20, 2021
3278be7
Version tag now works on emails and log
alanwilter May 20, 2021
9cde99e
Update README.md
pontikos May 21, 2021
b21edb0
Update README.md
pontikos May 21, 2021
3d004f8
Fix #175 (#345)
YuanTian1991 May 22, 2021
e1ae831
add nextflow-genome as a submodule
logust79 May 24, 2021
98fffff
Update README.md
pontikos May 25, 2021
51e2394
Update README.md
pontikos May 25, 2021
f7c6ad2
Fix HPO to return 404 for non existent entries (#346)
alanwilter May 25, 2021
f0d04fa
Remove pLI
alanwilter May 25, 2021
8d1572c
fix #242
YuanTian1991 May 28, 2021
e57cc44
handle Demo create patient 405 error.
YuanTian1991 May 28, 2021
76cbeac
Delete user #352 (#353)
alanwilter May 28, 2021
12b9335
Updated troubleshooting frontend docker
alanwilter May 28, 2021
9f399e4
Redesign actionbar (#356)
YuanTian1991 May 29, 2021
99b0ea0
Feature#271 (#357)
YuanTian1991 May 29, 2021
6b09476
Added Skeleton to replace all loading. Except Auth and Translation lo…
YuanTian1991 May 29, 2021
c0eb872
Use decorator, user can delete/enable itself (#355)
alanwilter May 29, 2021
462d4cd
API for version
alanwilter May 30, 2021
c569403
Safer variant page for demo (#363)
alanwilter Jun 2, 2021
599ac69
An attempt to migrate variants to new schema (#340)
alanwilter Jun 3, 2021
a3c3425
Frontend packages/ docker updates (#366)
IsmailM Jun 6, 2021
05ec0d0
add fix for yarn install (#373)
IsmailM Jun 11, 2021
a07a29e
Migrate gene to new schema (#374)
alanwilter Jun 22, 2021
a7514de
Migration of autocomplete to new DB schema (#375)
alanwilter Nov 2, 2021
80eb096
print debug info when dealing with vcf file (#377)
alanwilter Nov 8, 2021
3262561
Able to use either local or S3 remote vcf file (#378)
alanwilter Nov 9, 2021
8848eff
To close #169 by adding endpoint 'my_hpos' (#379)
alanwilter Nov 11, 2021
6da9909
Update 01_install_packages.sh
IsmailM Dec 12, 2021
b2e55c8
Hide external_id for demo (#385)
alanwilter Jan 12, 2022
ed72040
Use dynamic year for copyright (#391)
alanwilter Mar 4, 2022
fa15544
Future proofing maintenance with pre-commit (#392)
alanwilter Apr 8, 2022
b67778f
Untrack a file
alanwilter Apr 8, 2022
7faa67b
clarify that this is the open-source browser, not the company website
pontikos May 9, 2023
9676673
Bump black from 19.10b0 to 24.3.0 (#394)
dependabot[bot] Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .ebextensions/https-instance-securitygroup.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
FromPort: 443
CidrIp: 0.0.0.0/0
83 changes: 83 additions & 0 deletions .ebignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.setting*
nosetests.xml
coverage.xml
*,cover
.hypothesis/
venv/
.python-version

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

#Ipython Notebook
.ipynb_checkpoints

# Elastic Beanstalk Files
# .elasticbeanstalk/*
# !.elasticbeanstalk/*.cfg.yml
# !.elasticbeanstalk/*.global.yml
private.env

# pycharm
.idea

.pytest_cache
.vscode/

tests
db/seed
.git

frontend
6 changes: 3 additions & 3 deletions .elasticbeanstalk/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
branch-defaults:
prod-live:
environment: Phenopolis-prod
environment: phenopolis-production-live
dev-live:
environment: Phenopolisapi-dev-env
environment: phenopolis-development-live
environment-defaults:
Phenopolis-prod:
phenopolis-production-live:
branch: null
repository: null
global:
Expand Down
74 changes: 43 additions & 31 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: check_app_api
on:
push:
branches:
- prod-live
- dev-live
pull_request:
branches:
- prod-live
- dev-live
jobs:
build:
runs-on: ubuntu-latest
steps:

name: Python application
- uses: actions/checkout@v2

on:
push:
branches: [ prod-live ]
pull_request:
branches: [ prod-live ]
- name: Set empty Private ENV mockup
run: touch private.env

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest
# https://github.com/marketplace/actions/docker-layer-caching
- run: docker-compose pull app db

- uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Build docker-compose stack
run: docker-compose build app

- name: Lint with flake8
run: docker-compose run app flake8 -v --count

- name: Check format with black
run: docker-compose run app black --diff --check .

- name: Test with PyTest
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
run: docker-compose run -e APP_ENV=prod -e AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID app pytest --color=yes
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,8 @@ private.env

# pycharm
.idea

.pytest_cache
.vscode/

dc_dev.yml
22 changes: 22 additions & 0 deletions .platform/hooks/postdeploy/01_install_ssl_certificates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

if [ -f "/etc/pki/tls/certs/server-key.pem" ]; then
echo '/etc/pki/tls/certs/server-key.pem already exists'
else
openssl req -x509 -sha256 -nodes -newkey rsa:4096 -days 365 \
-keyout /etc/pki/tls/certs/server-key.pem \
-out /etc/pki/tls/certs/server-cert.pem \
-subj "/C=GB/ST=London/L=London/O=Phenopolis/OU=Org/CN=api-dev.phenopolis.org"
fi

if [ -f "/etc/nginx/conf.d/webapp-ssl.conf" ]; then
echo '/etc/nginx/conf.d/webapp-ssl.conf already exists'
else
mv /etc/nginx/conf.d/webapp-ssl.pre /etc/nginx/conf.d/webapp-ssl.conf
fi

echo "Restarting nginx"
nginx -t
nginx -s reload
4 changes: 2 additions & 2 deletions .platform/hooks/prebuild/01_install_packages.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

yum install -y libcurl-devel bzip2-devel xz-devel zlib-devel
yum install -y libcurl-devel bzip2-devel xz-devel zlib-devel openssl-devel

amazon-linux-extras enable postgresql11

yum install -y postgresql

"${PYTHONPATH}/pip3" install cython
"${PYTHONPATH}/pip3" install pysam==0.15.3
"${PYTHONPATH}/pip3" install cyvcf2==0.20.9
25 changes: 25 additions & 0 deletions .platform/nginx/conf.d/webapp-ssl.pre
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
server {
listen 443 ssl;
server_name _ localhost; # need to listen to localhost for worker tier

ssl_certificate /etc/pki/tls/certs/server-cert.pem;
ssl_certificate_key /etc/pki/tls/certs/server-key.pem;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;

proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
gzip_static on;
gzip on;
}
}
16 changes: 4 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
FROM debian:buster-slim
FROM amazonlinux:latest

# set work directory
WORKDIR /app

# set environment variables, to avoid pyc files and flushing buffer
# Avoid generating .pyc files
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

COPY ./requirements.txt /app/requirements.txt

RUN apt-get update \
&& apt-get install --no-install-recommends -y python3-pip=18.1-5 python3-pysam=0.15.2+ds-2 \
&& pip3 --no-cache-dir install --upgrade pip \
&& pip --no-cache-dir install setuptools==49.1.0 gunicorn==20.0.4 \
&& pip --no-cache-dir install -r requirements.txt \
&& pip uninstall pip -y && apt-get purge python3-pip -y \
&& apt-get autoremove -y && apt-get autoclean -y && apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
COPY ./scripts/docker_app_packages.sh ./scripts/
RUN ./scripts/docker_app_packages.sh
34 changes: 15 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Phenopolis API
# Phenopolis Browser

A description of the code setup is available [here](code_setup.md).

Expand All @@ -7,8 +7,10 @@ A description of the code setup is available [here](code_setup.md).
Set the following environment variables in `private.env`:

```bash
VCF_S3_SECRET=....
VCF_S3_KEY=....
AWS_SECRET_ACCESS_KEY=....
AWS_ACCESS_KEY_ID=....

NETLIFY_AUTH_TOKEN=....
```

Note: do not add single or double quotes around the value as they are preserved.
Expand All @@ -21,6 +23,16 @@ This will set up the database and load the demo database.
docker-compose up
```

The API server should be available at [http://localhost:5000](http://localhost:5000) and the frontend will be available at [http://localhost:8888](http://localhost:8888)

With the demo data the following exemplar links should work on the frontend:

* My Patient Page: [http://localhost:8888/my_patients](http://localhost:8888/my_patients)
* Individual Page: [http://localhost:8888/individual/PH00008258](http://localhost:8888/individual/PH00008258)
* Variant Page: [http://localhost:8888/variant/22-38212762-A-G](http://localhost:8888/variant/22-38212762-A-G)
* HPO Page: [http://localhost:8888/hpo/HP:0000478](http://localhost:8888/hpo/HP:0000478)
* Gene Page: [http://localhost:8888/gene/ENSG00000119685](http://localhost:8888/gene/ENSG00000119685)

#### Rebuild if you change dependencies

Rebuild, if you change `Dockerfile` or `requirements.txt`
Expand Down Expand Up @@ -49,19 +61,3 @@ docker-compose exec db psql --user phenopolis_api --dbname phenopolis_db
```bash
docker-compose exec db sh -c 'createuser rdsadmin -U phenopolis_api'
```

## Setup frontend

In a separate terminal (and directory), clone and follow the setup instructions at: [https://github.com/phenopolis/phenopolis_frontend_react](https://github.com/phenopolis/phenopolis_frontend_react).

> Make sure that you create the local `_redirects` file (instructions at the bottom of the README) which redirects api requests to the FLASK API set up above.

Next, open [http://localhost:8888](http://localhost:8888) in your favourite browser

With the demo data the following exemplar links should work on the frontend:

* My Patient Page: [http://localhost:8888/my_patients](http://localhost:8888/my_patients)
* Individual Page: [http://localhost:8888/individual/PH00008258](http://localhost:8888/individual/PH00008258)
* Variant Page: [http://localhost:8888/variant/22-38212762-A-G](http://localhost:8888/variant/22-38212762-A-G)
* HPO Page: [http://localhost:8888/hpo/HP:0000478](http://localhost:8888/hpo/HP:0000478)
* Gene Page: [http://localhost:8888/gene/ENSG00000119685](http://localhost:8888/gene/ENSG00000119685)
14 changes: 6 additions & 8 deletions application.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'''
"""
Flask app
'''
"""
from views import application, APP_ENV

from views import application

'''
Flask app
'''
if __name__ == "__main__":
application.debug = True
application.debug = False
if APP_ENV == "debug":
application.debug = True
application.run()
Loading