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

feat: Implement gene search functionality and gene information page (#11) #14

Merged
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ee5ab62
feat: environment files
gromdimon Aug 15, 2023
ca15639
feat: implement reverse_proxy
gromdimon Aug 15, 2023
655cf0b
feat: tests for proxies
gromdimon Aug 15, 2023
2c1a2b4
fix: temporary fix for failing tests
gromdimon Aug 15, 2023
0b94d4c
feat: first try to implement search bar
gromdimon Aug 15, 2023
8474734
feat: search logic
gromdimon Aug 16, 2023
49bca7e
feat: new styling
gromdimon Aug 16, 2023
7f3a086
wip
gromdimon Aug 17, 2023
41684f7
wip
gromdimon Aug 21, 2023
5fc52ba
wip
gromdimon Aug 22, 2023
0818705
feat: environment files
gromdimon Aug 15, 2023
56fd581
feat: implement reverse_proxy
gromdimon Aug 15, 2023
81ab44d
feat: tests for proxies
gromdimon Aug 15, 2023
0909ef6
fix: temporary fix for failing tests
gromdimon Aug 15, 2023
fd79e52
feat: first try to implement search bar
gromdimon Aug 15, 2023
a670963
feat: search logic
gromdimon Aug 16, 2023
bf56aa8
feat: new styling
gromdimon Aug 16, 2023
424b259
wip
gromdimon Aug 17, 2023
9dc6ca8
wip
gromdimon Aug 21, 2023
74d8450
pull
gromdimon Aug 22, 2023
ad9a08b
cleanup
gromdimon Aug 22, 2023
89c89b2
cleanup#2
gromdimon Aug 22, 2023
2a3a39c
feat: search logic + ui view
gromdimon Aug 22, 2023
967cc01
feat: geneInformation
gromdimon Aug 22, 2023
f95d69e
wip
gromdimon Aug 22, 2023
c7ec27a
wip
gromdimon Aug 23, 2023
0e1a011
Delete info?hgnc-id=HGNC:1100
gromdimon Aug 23, 2023
e7fcdde
wip
gromdimon Aug 23, 2023
2ced3e9
Merge branch '11-implement-gene-search-functionality-and-gene-informa…
gromdimon Aug 23, 2023
6254d7b
wip
gromdimon Aug 23, 2023
c4f00fc
wip
gromdimon Aug 23, 2023
b1689cf
ci
gromdimon Aug 23, 2023
fe59d8f
tests
gromdimon Aug 23, 2023
8f10113
backend cleanup
gromdimon Aug 24, 2023
50e411c
tests
gromdimon Aug 24, 2023
22d1e85
wip
gromdimon Aug 25, 2023
eadad2d
new structure
gromdimon Aug 25, 2023
db627cf
wip
gromdimon Aug 25, 2023
9f15977
testing
gromdimon Aug 28, 2023
08adc56
wip
gromdimon Aug 28, 2023
afe7302
wip
gromdimon Aug 28, 2023
0a74af2
docker issue
gromdimon Aug 28, 2023
15c9515
minor
gromdimon Aug 28, 2023
3e5237a
docker
gromdimon Aug 28, 2023
8cb98ee
doc
gromdimon Aug 28, 2023
7bdd23e
minor
gromdimon Aug 29, 2023
f6002f7
minor
gromdimon Aug 29, 2023
6cb433f
wip
gromdimon Aug 29, 2023
f8827a0
test
gromdimon Aug 30, 2023
f992523
resize
gromdimon Aug 30, 2023
61e5f88
tests
gromdimon Aug 30, 2023
a9502c6
wip
gromdimon Aug 30, 2023
45ec64b
wip
gromdimon Aug 30, 2023
73323e1
wip
gromdimon Aug 30, 2023
6e1d313
wip
gromdimon Aug 30, 2023
0bf2b48
wip
gromdimon Aug 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/__tests__/*.json filter=lfs diff=lfs merge=lfs -text
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'

- name: Set up Python 3.10
uses: actions/setup-python@v4
Expand Down Expand Up @@ -106,6 +108,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'

- name: Set up node 20.x
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion backend/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ async def reverse_proxy(request: Request) -> Response:
backend_url = None

if url.path.startswith("/proxy/annonars"):
backend_url = BACKEND_PREFIX_ANNONARS + url.path.replace("/proxy/annonars", "/annos")
backend_url = BACKEND_PREFIX_ANNONARS + url.path.replace("/proxy/annonars", "")
elif url.path.startswith("/proxy/mehari"):
backend_url = BACKEND_PREFIX_MEHARI + url.path.replace("/proxy/mehari", "")
elif url.path.startswith("/proxy/viguno"):
backend_url = BACKEND_PREFIX_VIGUNO + url.path.replace("/proxy/viguno", "")

import sys

print(f"backend_url = {backend_url}", file=sys.stderr)

if backend_url:
backend_url = backend_url + (f"?{url.query}" if url.query else "")
backend_req = client.build_request(
Expand All @@ -82,6 +86,14 @@ async def reverse_proxy(request: Request) -> Response:


# Routes
@app.get("/api/search")
async def search_gene(
geneSymbol: str = Query(...), spdi: str = Query(""), genomeRelease: str = Query("hg19")
):
gene_details = {"geneSymbol": geneSymbol, "genomeRelease": genomeRelease}
return JSONResponse(content=gene_details)


if SERVE_FRONTEND: # pragma: no cover
print(f"SERVE_FRONTEND = {SERVE_FRONTEND}", file=sys.stderr)
app.mount("/ui", StaticFiles(directory=SERVE_FRONTEND), name="app")
Expand Down
1 change: 1 addition & 0 deletions backend/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
@pytest.fixture
def non_mocked_hosts() -> typing.List[str]:
"""List of hosts that should not be mocked.

We read the host from ``client``.
"""
return [client._base_url.host]
Expand Down
Loading