Skip to content

Commit

Permalink
Update default prop values for nihms loader
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed Oct 21, 2024
1 parent d31b588 commit 27ee007
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ nihmsetl.http.connect-timeout-ms=30000
# Format ought to be CSV, otherwise the loader won't be able to process the saved files
nihmsetl.api.url.param.format=csv
# Institution name, unclear as to how it is used
nihmsetl.api.url.param.inst=${NIHMS_API_INST:}
nihmsetl.api.url.param.inst=${NIHMS_API_INST}
# IPF (Institutional Profile File) number, the unique ID assigned to a grantee organization in the eRA system.
nihmsetl.api.url.param.ipf=${NIHMS_API_IPF:}
nihmsetl.api.url.param.ipf=${NIHMS_API_IPF}
# The API token retrieved from the PACM website. These expire every three months.
nihmsetl.api.url.param.api-token=${NIHMS_API_TOKEN:}
nihmsetl.api.url.param.api-token=${NIHMS_API_TOKEN}
# Date in MM/YYYY format that the PACM data should start from (may be set using the `-s` harvester command line option).
# By default this date will be set to the current month, one year ago
nihmsetl.api.url.param.pdf=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
spring.main.web-application-type=NONE
nihmsetl.repository.id=${NIHMS_REPO_ID:}
nihmsetl.repository.id=${NIHMS_REPO_ID}
nihmsetl.data.dir=/data/nihmsloader/data
nihmsetl.pmcurl.template=https://www.ncbi.nlm.nih.gov/pmc/articles/%s/

pmc.entrez.service.url=https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&retmode=json&rettype=abstract&id=%s

pass.client.url=${PASS_CORE_URL:localhost:8080}
pass.client.user=${PASS_CORE_USER:fakeuser}
pass.client.password=${PASS_CORE_PASSWORD:fakepassword}
pass.client.url=${PASS_CORE_URL}
pass.client.user=${PASS_CORE_USER}
pass.client.password=${PASS_CORE_PASSWORD}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
properties = {
"spring.cloud.aws.credentials.access-key=noop",
"spring.cloud.aws.credentials.secret-key=noop",
"spring.cloud.aws.region.static=us-east-1"
"spring.cloud.aws.region.static=us-east-1",
"pass.client.url=http://localhost:8080/",
"pass.client.user=${PASS_CORE_USER:test}",
"pass.client.password=${PASS_CORE_PASSWORD:test-pw}",
})
@ContextConfiguration(initializers = ConfigDataApplicationContextInitializer.class)
@Testcontainers
Expand Down Expand Up @@ -79,7 +82,7 @@ static void beforeAll() throws IOException, InterruptedException {
@Test
public void testLoadPropFromParamStore() {
String clientUrlNameProp = environment.getProperty("pass.client.url");
assertEquals("localhost:8080", clientUrlNameProp);
assertEquals("http://localhost:8080/", clientUrlNameProp);
String repoIdProp = environment.getProperty("nihmsetl.repository.id");
assertEquals("aws-param-store-repo-id", repoIdProp);
String passClientPwProp = environment.getProperty("pass.client.password");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# directory to harvest data from
nihmsetl.data.dir=./src/test/resources/data
nihmsetl.repository.id=test-repo-id
# PubMed Central Entrez Service URL
pmc.entrez.service.url=http://localhost:9911/entrez/eutils/esummary.fcgi?db=pubmed&retmode=json&rettype=abstract&id=%s
# pass-core properties
Expand Down

0 comments on commit 27ee007

Please sign in to comment.