Skip to content

Commit

Permalink
Dev -> Main (#551)
Browse files Browse the repository at this point in the history
* feat: store score components in DB (#518)

* fix: update JAX-CKB URL (#521)

* feat: jax-ckb -> ckb-core (#522)

* fix: chembl version (#524)

* feat: define rake task to generate TSVs (#523)

* fix: remove redundant field (#527)

* build: remove some unused rails boilerplate/imports (#528)

* fix: use declared data version value (#525)

* fix: remove redundant code (#529)

* cicd: update actions revs (#530)

* feat: log graphql requests (#526)

* feat: log API client (#531)

* chore: remove unused readme (#532)

* fix: use docm snapshot data (#533)

* fix: update api uri (#538)

* cicd: add DB check script (#543)

* chore: fix a couple of typos/omissions (#541)

* fix: use latest GO api changes (#542)

* add rows for Download table for 2024 tsvs (#549)

* new row for old Downloads file

* added one more row

---------

Co-authored-by: Cannon <[email protected]>

---------

Co-authored-by: James Stevenson <[email protected]>
Co-authored-by: Cannon <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent a35759a commit 44a8599
Show file tree
Hide file tree
Showing 51 changed files with 18,294 additions and 12,786 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST }}

- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install dependencies
run: yarn install
- name: build
Expand All @@ -26,9 +26,9 @@ jobs:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- name: Install dependencies
run: yarn --prefer-offline
- name: Prettier check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- 5432:5432

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: 'Set up Ruby'
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ rake dgidb:group:interactions
Finally, normalize remaining metadata:

```shell
rake dgidb:normalize:drug_approval_types
rake dgidb:normalize:drug_approval_ratings
rake dgidb:normalize:drug_types
rake dgidb:normalize:populate_source_counters
```
Expand Down
2 changes: 1 addition & 1 deletion client/.env.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_API_URI="https://beta.dgidb.org/api/graphql"
REACT_APP_API_URI="https://dgidb.org/api/graphql"
REACT_APP_ANALYTICS='true'
PORT=443
2 changes: 1 addition & 1 deletion client/.env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_API_URI="https://beta.dgidb.org/api/graphql"
REACT_APP_API_URI="https://dgidb.org/api/graphql"
REACT_APP_ANALYTICS='true'
PORT=443
Binary file added client/.yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions client/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
4 changes: 3 additions & 1 deletion client/src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { GraphQLClient } from 'graphql-request';

export const API_URL = process.env.REACT_APP_API_URI;
export const graphQLClient = new GraphQLClient(API_URL!);
export const graphQLClient = new GraphQLClient(API_URL!, {
headers: { 'dgidb-client-name': 'dgidb-frontend' },
});
11 changes: 8 additions & 3 deletions client/src/hooks/queries/useGetAmbiguousResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,14 @@ export function useGetMatchedResults(names: string[], type: ResultTypes) {
return useQuery(
key,
async () => {
const res = await graphQLClient.request(requestQuery, {
searchTerms: names,
});
const res = await graphQLClient.request(
requestQuery,
{ searchTerms: names },
{
'dgidb-query-type':
type === ResultTypes.Gene ? 'search-genes' : 'search-drugs',
}
);
return res;
},
{ enabled: names.length > 0 }
Expand Down
11 changes: 8 additions & 3 deletions client/src/hooks/queries/useGetCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ export function useGetCategories(names: string[]) {
return useQuery(
'categories' + names,
async () => {
const res = await graphQLClient.request(getCategoriesQuery, {
searchTerms: names,
});
const res = await graphQLClient.request(
getCategoriesQuery,
{ searchTerms: names },
{
'dgidb-query-type': 'search-genes',
'dgidb-genes-search-mode': 'categories',
}
);
return res;
},
{ enabled: names.length > 0 }
Expand Down
6 changes: 5 additions & 1 deletion client/src/hooks/queries/useGetNameSuggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export function useGetNameSuggestions(searchTerm: string, type: SearchTypes) {
return useQuery(
queryName + searchTerm,
async () => {
const res = await graphQLClient.request(query, { term: searchTerm });
const res = await graphQLClient.request(
query,
{ term: searchTerm },
{ 'dgidb-query-type': queryName }
);
return res;
},
{ enabled: searchTerm !== '' }
Expand Down
2 changes: 2 additions & 0 deletions client/src/pages/Downloads/Files/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ function getDataObj(date: string) {

const rows = [
getDataObj('latest'),
getDataObj('2024-Dec'),
getDataObj('2024-Jun'),
getDataObj('2023-Dec'),
getDataObj('2022-Feb'),
getDataObj('2021-May'),
Expand Down
Loading

0 comments on commit 44a8599

Please sign in to comment.