Skip to content

Commit

Permalink
Add configuration and data files for dictionary services
Browse files Browse the repository at this point in the history
Added HTTP request examples, application properties, and a CSV file for dictionary weights. Also included Docker commands for local development setup.
  • Loading branch information
Gcolon021 committed Nov 13, 2024
1 parent b779fec commit c6e26e6
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dictionaryweights/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Docker commands for local development
### Docker build
```bash
docker build --no-cache --build-arg SPRING_PROFILE=bdc-dev -t weights:latest .
```

### Docker run
You will need a local weights.csv file.
```bash
docker run --rm -t --name dictionary-weights --network=host -v ./weights.csv:/weights.csv weights:latest
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
spring.application.name=dictionaryweights
spring.main.web-application-type=none

spring.datasource.url=jdbc:postgresql://localhost:5432/dictionary_db?currentSchema=dict
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.driver-class-name=org.postgresql.Driver

weights.filename=/weights.csv
7 changes: 7 additions & 0 deletions dictionaryweights/weights.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
concept_node.DISPLAY,2
concept_node.CONCEPT_PATH,2
dataset.FULL_NAME,1
dataset.DESCRIPTION,1
parent.DISPLAY,1
grandparent.DISPLAY,1
concept_node_meta_str,1
15 changes: 15 additions & 0 deletions dictonaryReqeust.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# curl 'https://dev.picsure.biodatacatalyst.nhlbi.nih.gov/picsure/proxy/dictionary-api/concepts?page_number=1&page_size=1'
# -H 'origin: https://dev.picsure.biodatacatalyst.nhlbi.nih.gov'
# -H 'referer: https://dev.picsure.biodatacatalyst.nhlbi.nih.gov/'
# --data-raw '{"facets":[],"search":"","consents":[]}'
POST http://localhost:80/concepts?page_number=1&page_size=100
Content-Type: application/json

{"facets":[],"search":"age","consents":[]}

###

POST http://localhost:80/search
Content-Type: application/json

{"query":{"searchTerm":"AGEDIANA","includedTags":[],"excludedTags":[],"returnTags":"true","offset":0,"limit":5}}
14 changes: 14 additions & 0 deletions src/main/resources/application-bdc-dev.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
spring.application.name=dictionary
spring.datasource.url=jdbc:postgresql://localhost:5432/dictionary_db?currentSchema=dict
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.driver-class-name=org.postgresql.Driver
server.port=80

dashboard.columns={abbreviation:'Abbreviation',name:'Name',clinvars:'Clinical Variables'}
dashboard.column-order=abbreviation,name,clinvars
dashboard.nonmeta-columns=abbreviation,name
dashboard.enable.extra_details=true
dashboard.enable.bdc_hack=true

filtering.unfilterable_concepts=stigmatized

0 comments on commit c6e26e6

Please sign in to comment.