Skip to content

Commit 3ea3bc9

Browse files
committed
Merge remote-tracking branch 'origin/master' into feat/remove-mesh-keywords-in-streamgraph
2 parents 10f5efc + a57f643 commit 3ea3bc9

30 files changed

Lines changed: 50685 additions & 1398 deletions

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ local_dev/paper_preview
3838
# php files
3939
/server/classes/headstart/vendor
4040
/server/classes/headstart/var/*
41+
**.phpunit.cache
4142

4243
# R files
4344
server/preprocessing/other-scripts/.Rhistory
@@ -46,6 +47,9 @@ server/preprocessing/other-scripts/renv
4647
.Rprofile
4748
.Rproj*
4849
/*.Rproj
50+
*/**/*.Rproj
51+
*/**/*.RData
52+
server/workers/*/renv
4953
.Rproj.user
5054

5155
# python files
@@ -66,6 +70,9 @@ server/preprocessing/other-scripts/renv
6670
# temporal
6771
local_dev/config_local_headstart.ini
6872
local_dev/config_local_searchflow.ini
73+
local_dev/tools/**/*.csv
74+
local_dev/tools/**/*.json
75+
local_dev/tools/**/*.log
6976

7077
# mac os
7178
.DS_Store

examples/public/main_integration/base_sg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<meta name="keywords" content="knowldege visualization, open knowledge, open science">
2121

2222
<meta name="description"
23-
content="Get an overview of digital education, find relevant papers, and identify important concepts.">
23+
content="Get an overview of digital education, find relevant research outputs, and identify important concepts.">
2424

2525
<!-- FAVICONS -->
2626
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=xQz6nej7eR">

examples/public/main_integration/openaire.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<meta name="keywords" content="knowldege visualization, open knowledge, open science">
2121

2222
<meta name="description"
23-
content="Get an overview of digital education, find relevant papers, and identify important concepts.">
23+
content="Get an overview of digital education, find relevant research outputs, and identify important concepts.">
2424

2525
<!-- FAVICONS -->
2626
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=xQz6nej7eR">

examples/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<link rel="icon" type="image/png" sizes="16x16" href="./main_integration/img/favicon-16x16.png?v=xQz6nej7eR">
2323

2424
<meta name="description"
25-
content="Get an overview of digital education, find relevant papers, and identify important concepts.">
25+
content="Get an overview of digital education, find relevant research outputs, and identify important concepts.">
2626

2727
<!-- FAVICONS -->
2828
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=xQz6nej7eR">

examples/templates/pubmed.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<link rel="icon" type="image/png" sizes="16x16" href="./main_integration/img/favicon-16x16.png?v=xQz6nej7eR">
2323

2424
<meta name="description"
25-
content="Get an overview of &quot;climate change&quot;, find relevant papers, and identify important concepts.">
25+
content="Get an overview of &quot;climate change&quot;, find relevant research outputs, and identify important concepts.">
2626

2727
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
2828
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800' rel='stylesheet' type='text/css'>

examples/templates/triple.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>Overview of research on psychology</title>
88
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
99
<meta name="description"
10-
content="Get an overview of psychology, find relevant papers, and identify important concepts.">
10+
content="Get an overview of psychology, find relevant research outputs, and identify important concepts.">
1111

1212
<script type="text/javascript" src="./triple/data-config-km.js"></script>
1313
<script type="text/javascript" src="./triple/data-config-sg.js"></script>

server/preprocessing/other-scripts/openaire.R

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ get_papers <- function(query, params) {
5252
funder = funder,
5353
format = 'xml')
5454
pubs_metadata <- parse_response(response)
55-
# FYI: The deactivation of the fill_dois() function is a hotfix
56-
# to enable creation of OpenAIRE project maps
57-
# TODO: root cause analysis of failure mode
58-
# TODO: refactor/replace/remove the function, decision pending
59-
#pubs_metadata <- fill_dois(pubs_metadata)
6055
},
6156
error = function(err){
6257
olog$warn(paste0("vis_id:", .GlobalEnv$VIS_ID, "publications: ", err))
@@ -193,34 +188,6 @@ parse_response <- function(response) {
193188
}
194189
}
195190

196-
fill_dois <- function(df) {
197-
missing_doi_indices <- which(is.na(df$doi))
198-
titles <- df[missing_doi_indices,]$title
199-
if (exists("DEBUG") && DEBUG) {
200-
olog$debug(paste("Missing DOIs:", length(titles)))
201-
olog$debug("Time for filling missing DOIs")
202-
olog$debug(system.time(cr_works(query=queries(titles), async=TRUE)))
203-
}
204-
tryCatch({
205-
if (length(titles) > 1) {
206-
response <- cr_works(query=queries(titles))
207-
candidates <- lapply(response, get_doi_candidates)
208-
dois <- mapply(check_distance, titles, candidates, USE.NAMES=FALSE)
209-
} else if (length(titles) == 1) {
210-
response <- cr_works(flq=c('query.title'=titles))$data
211-
candidate_response = response[1,]
212-
dois <- check_distance(titles, candidate_response)
213-
} else {
214-
dois <- ""
215-
}
216-
df$doi[c(missing_doi_indices)] <- dois
217-
}, error=function(err){
218-
olog$error(paste("vis_id:", .GlobalEnv$VIS_ID, "DOI enrichment failed:", paste(err)))
219-
}
220-
)
221-
return (df)
222-
}
223-
224191
get_doi_candidates <- function(response){
225192
if (nrow(response) >= 1) {
226193
candidate = response[1,c('doi', 'title')]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
rm(list = ls())
2+
3+
args <- commandArgs(TRUE)
4+
wd <- args[1]
5+
setwd(wd)
6+
7+
renv::activate()
8+
renv::restore(lockfile = '../renv.lock')
9+
Sys.setlocale(category = "LC_ALL", locale = "en_US.UTF-8")
10+
11+
library(jsonlite)
12+
library(rbace)
13+
library(logging)
14+
15+
source('utils.R')
16+
if (Sys.getenv("LOGLEVEL") == "DEBUG") {
17+
DEBUG <- FALSE
18+
} else {
19+
DEBUG <- TRUE
20+
}
21+
22+
if (DEBUG == TRUE) {
23+
setup_logging('DEBUG')
24+
} else {
25+
setup_logging('INFO')
26+
}
27+
28+
log <- getLogger('update_contentproviders')
29+
30+
output_path <- if (length(args) >= 2) args[2] else {
31+
file.path(wd, "../../workers/common/common/contentproviders.json")
32+
}
33+
output_path <- normalizePath(output_path, mustWork = FALSE)
34+
35+
tryCatch({
36+
contentproviders <- bs_repositories("")
37+
if (is.null(contentproviders) || nrow(contentproviders) == 0) {
38+
stop("No content providers retrieved.")
39+
}
40+
triple <- list(name = "GoTriple", internal_name = "fttriple")
41+
contentproviders <- rbind(contentproviders, triple)
42+
43+
write(toJSON(contentproviders, pretty = TRUE), file = output_path)
44+
log$info(paste("contentproviders.json updated:", output_path,
45+
"", nrow(contentproviders), "entries"))
46+
}, error = function(err) {
47+
log$error(paste("Content provider update failed", "base",
48+
"update_contentproviders", "", err, sep = "||"))
49+
quit(status = 1)
50+
})

server/services/searchAQUANAVI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
$post_params["lang_id"] = ["all-lang"];
1717
$post_params["vis_type"] = "geomap";
1818
$post_params["from"] = "1665-01-01";
19-
$post_params["to"] = "2026-01-21";
19+
$post_params["to"] = date("Y-m-d");
2020
$post_params["document_types"] = ["F"];
2121
$post_params["sorting"] = "most-relevant";
2222
$post_params["time_range"] = "user-defined";

server/workers/build_docker_images.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
# Defines the script directory
44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
55

6+
CONTENTPROVIDERS_FILE="$SCRIPT_DIR/common/common/contentproviders.json"
7+
8+
# Update contentproviders.json cache from the running dev-base-1 container
9+
echo ""
10+
echo "Updating contentproviders.json cache..."
11+
echo ""
12+
docker exec dev-base-1 Rscript /headstart/other-scripts/update_contentproviders.R \
13+
/headstart/other-scripts \
14+
/common/contentproviders.json
15+
docker cp dev-base-1:/common/contentproviders.json "$CONTENTPROVIDERS_FILE"
16+
17+
# Commit if the file changed
18+
cd "$SCRIPT_DIR/../.." && git diff --quiet "$CONTENTPROVIDERS_FILE"
19+
if [ $? -ne 0 ]; then
20+
echo "contentproviders.json changed, committing..."
21+
git add "$CONTENTPROVIDERS_FILE"
22+
git commit -m "update of contentprovider.json cache"
23+
fi
24+
cd "$SCRIPT_DIR"
25+
626
# Define the list of services
727
services=("api" "persistence" "dataprocessing" "base" "pubmed" "openaire" "orcid" "metrics")
828

0 commit comments

Comments
 (0)