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

update team task contributor section #366

Merged
merged 7 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
/site_libs
*.rmarkdown
/.luarc.json
/tmp
63 changes: 45 additions & 18 deletions team/_rerender_contributors.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
library(rlang)

repositories <- c(
"openproblems-bio/openproblems",
# "openproblems-bio/task_dimensionality_reduction",
# "openproblems-bio/task_spatially_variable_genes",
"openproblems-bio/task_perturbation_prediction"
"openproblems-bio/task_denoising",
"openproblems-bio/task_dimensionality_reduction",
"openproblems-bio/task_spatially_variable_genes",
"openproblems-bio/task_perturbation_prediction",
"openproblems-bio/task_batch_integration",
"openproblems-bio/task_cell_cell_communication",
"openproblems-bio/task_label_projection",
"openproblems-bio/task_spatial_decomposition",
"openproblems-bio/task_predict_modality"
)

cache_repository <- function(repo) {
Expand All @@ -20,20 +25,26 @@ cache_repository <- function(repo) {
zzz <- processx::run("git", c("fetch", "--all"), wd = repo_dir)

# reset the repository to the latest commit
zzz <- processx::run("git", c("pull", "origin", "main"), wd = repo_dir)
if (repo == "openproblems-bio/task_spatial_decomposition") {
zzz <- processx::run("git", c("pull", "origin", "add-missing-authors"), wd = repo_dir)
} else if (repo == "openproblems-bio/task_dimensionality_reduction") {
zzz <- processx::run("git", c("pull", "origin", "add_author"), wd = repo_dir)
} else {
zzz <- processx::run("git", c("pull", "origin", "main"), wd = repo_dir)
}

# return the path to the repository
return(repo_dir)
}

find_task_info <- function(repo_dir) {
# find all authors in the repository
task_info <- list.files(repo_dir, pattern = "task_info.yaml", full.names = TRUE, recursive = TRUE)
task_info <- task_info[grep("/api/task_info.yaml", task_info)]
# task_info <- list.files(repo_dir, pattern = "task_info.yaml", full.names = TRUE, recursive = TRUE)
# task_info <- task_info[grep("/api/task_info.yaml", task_info)]

if (length(task_info) > 0) {
return(task_info)
}
# if (length(task_info) > 0) {
# return(task_info)
# }

viash_yaml <- list.files(repo_dir, pattern = "_viash.yaml", full.names = TRUE, recursive = TRUE)

Expand All @@ -52,8 +63,18 @@ render_author <- function(author) {
email_clean <- tolower(stringr::str_trim(author$info$email))
checksum <- digest::digest(email_clean, algo = "md5", serialize = FALSE)
paste0("https://www.gravatar.com/avatar/", checksum)
} else {
} else if (file.exists("/images/avatar.svg")){
"/images/avatar.svg"
} else {
# generate random avatar
name <- strsplit(author$name, " ")
url <- paste0("https://avatar.iran.liara.run/username?username=",name[[1]][[1]],"+",name[[1]][[2]])
output_dir <- file.path("tmp", gsub(" ", "_", author$name))
if (!dir.exists(output_dir)) {
dir.create(output_dir, recursive = TRUE)
}
download.file(url, file.path(output_dir, "avatar.png"), mode = "wb")
"avatar.png"
}

# process links
Expand All @@ -74,7 +95,7 @@ render_author <- function(author) {
},
orcid = function(value) {
list(
icon = "fa-brands fa-orcid",
icon = "fa-brands--orcid",
text = "ORCID",
href = paste0("https://orcid.org/", value)
)
Expand All @@ -98,8 +119,8 @@ render_author <- function(author) {
out <- list(
title = author$name,
image = out_image,
# role = paste(stringr::str_to_title(author$roles), collapse = ", "),
role = "Task Contributor",
role = paste(stringr::str_to_title(author$roles), collapse = ", "),
# role = "Task Contributor",
about = list(
template = "jolla",
links = out_links
Expand Down Expand Up @@ -162,18 +183,22 @@ for (task_name in names(tasks)) {
author <- task$authors[[author_id]]

txt <- render_author(author)
file_path <- file.path("team", "task_contributors", paste0(author_id, "/index.qmd"))
file_path <- file.path("team", "task_contributors", task_name, paste0(author_id, "/index.qmd"))

if (!dir.exists(dirname(file_path))) {
dir.create(dirname(file_path), recursive = TRUE)
}

writeLines(txt, file_path)

if (file.exists(file.path("tmp", gsub(" ", "_", author$name), "avatar.png"))) {
file.rename(file.path("tmp", gsub(" ", "_", author$name), "avatar.png"), file.path(dirname(file_path), "avatar.png"))
}

}
}

teams <- list.dirs("team", full.names = FALSE, recursive = FALSE)
teams <- teams[!teams %in% c("core_members", "scientific_advisors")]
teams <- list.dirs("team/task_contributors", full.names = FALSE, recursive = FALSE)

teams_headers <- paste0(
" - id: ", teams, "
Expand All @@ -183,7 +208,7 @@ teams_headers <- paste0(
sort: ''"
)
teams_index <- paste0(
"## ", stringr::str_to_title(gsub("_", " ", teams)), "
"### ", stringr::str_to_title(gsub("_", " ", teams)), "

:::{#", teams, "}
:::
Expand Down Expand Up @@ -220,6 +245,8 @@ css: team.css
:::{#scientific_advisors}
:::

## Task Contributors

", paste(teams_index, collapse = "\n"), "
")

Expand Down
2 changes: 1 addition & 1 deletion team/core_members/burkhardt_daniel/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ about:
- icon: bi-linkedin
text: LinkedIn
href: https://www.linkedin.com/in/daniel-burkhardt/
- icon: fa-brands fa-orcid
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0001-7744-1363
---
2 changes: 1 addition & 1 deletion team/core_members/cannoodt_robrecht/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ about:
- icon: bi-linkedin
text: LinkedIn
href: https://www.linkedin.com/in/robrecht-cannoodt/
- icon: fa-brands fa-orcid
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0003-3641-729X
---
2 changes: 1 addition & 1 deletion team/core_members/gigante_scott/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ about:
- icon: bi-linkedin
text: LinkedIn
href: https://www.linkedin.com/in/scottgigante/
- icon: fa-brands fa-orcid
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0002-4544-2764
---
2 changes: 1 addition & 1 deletion team/core_members/luecken_malte/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ about:
- icon: bi-linkedin
text: LinkedIn
href: https://www.linkedin.com/in/malte-lücken-b8b21049/
- icon: fa-brands fa-orcid
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0001-7464-7921
---
86 changes: 83 additions & 3 deletions team/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,48 @@ listing:
type: grid
template: members.ejs
sort: ''
- id: task_contributors
contents: task_contributors/*/index.qmd
- id: batch_integration
contents: batch_integration/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: cell_cell_communication
contents: cell_cell_communication/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: denoising
contents: denoising/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: dimensionality_reduction
contents: dimensionality_reduction/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: label_projection
contents: label_projection/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: perturbation_prediction
contents: perturbation_prediction/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: predict_modality
contents: predict_modality/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: spatial_decomposition
contents: spatial_decomposition/*/index.qmd
type: grid
template: members.ejs
sort: ''
- id: spatially_variable_genes
contents: spatially_variable_genes/*/index.qmd
type: grid
template: members.ejs
sort: ''
Expand All @@ -34,7 +74,47 @@ css: team.css

## Task Contributors

:::{#task_contributors}
### Batch Integration

:::{#batch_integration}
:::

### Cell Cell Communication

:::{#cell_cell_communication}
:::

### Denoising

:::{#denoising}
:::

### Dimensionality Reduction

:::{#dimensionality_reduction}
:::

### Label Projection

:::{#label_projection}
:::

### Perturbation Prediction

:::{#perturbation_prediction}
:::

### Predict Modality

:::{#predict_modality}
:::

### Spatial Decomposition

:::{#spatial_decomposition}
:::

### Spatially Variable Genes

:::{#spatially_variable_genes}
:::
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
title: Daniel Strobl
image: https://www.github.com/danielStrobl.png
role: Task Contributor
role: Author
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/danielStrobl
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0002-5516-7057
---

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Kai Waldrant
image: https://www.github.com/KaiWaldrant.png
role: Task Contributor
role: Contributor
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/KaiWaldrant
- icon: fa-brands fa-orcid
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0009-0003-8555-1361
---
Expand Down
15 changes: 15 additions & 0 deletions team/task_contributors/batch_integration/malte_luecken/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Malte Luecken
image: https://www.github.com/LuckyMD.png
role: Author
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/LuckyMD
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0001-7464-7921
---

Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
title: Michaela Mueller
image: https://www.github.com/mumichae.png
role: Task Contributor
role: Maintainer, Author
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/mumichae
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0000-0002-1401-1785
---

15 changes: 15 additions & 0 deletions team/task_contributors/batch_integration/nartin_kim/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Nartin Kim
image: https://www.github.com/martinkim0.png
role: Contributor
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/martinkim0
- icon: fa-brands--orcid
text: ORCID
href: https://orcid.org/0009-0003-8555-1361
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Daniel Dimitrov
image: https://www.github.com/dbdimitrov.png
role: Maintainer, Author
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/dbdimitrov
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Vishnuvasan Raghuraman
image: https://www.github.com/vishnu-vasan.png
role: Contributor
about:
template: jolla
links:
- icon: bi-github
text: GitHub
href: https://github.com/vishnu-vasan
---

Loading
Loading