Skip to content

Commit 091bb06

Browse files
author
jvanmalder
committed
release: v1.7.2
1 parent 93debab commit 091bb06

File tree

40 files changed

+416
-385
lines changed

40 files changed

+416
-385
lines changed

base/src/main/java/eu/openanalytics/rdepot/base/initializer/RepositoryDataInitializer.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,21 @@ public RepositoryDataInitializer(RepositoryService<E> repositoryService,
7474
* @param declaredRepository
7575
* @return
7676
*/
77-
protected abstract E declaredRepositoryToEntity(R declaredRepository);
77+
protected abstract E declaredRepositoryToEntity(R declaredRepository, boolean declarative);
7878

7979
protected void createRepositoriesFromConfig(List<R> repositories, boolean declarative) {
8080
List<E> existingRepositories = repositoryService.findAll();
8181
for(R declaredRepository : repositories) {
8282
logger.debug("Creating declared repository " + declaredRepository + "...");
83-
E newRepository = declaredRepositoryToEntity(declaredRepository);
83+
E newRepository = declaredRepositoryToEntity(declaredRepository, declarative);
8484

8585
Optional<E> possiblyExistingRepository = existingRepositories.stream()
8686
.filter(r -> r.getName().equals(newRepository.getName())).findFirst();
8787
if(possiblyExistingRepository.isPresent()) {
8888
E existingRepository = possiblyExistingRepository.get();
8989
existingRepositories.remove(existingRepository);
9090

91-
if(Boolean.valueOf(declarative)) {
92-
if(existingRepository.isDeleted() == null) {
93-
existingRepository.setDeleted(false);
94-
}
95-
if(existingRepository.isPublished() == null) {
96-
existingRepository.setPublished(true); //TODO: Isn't it safer to set default to true?
97-
}
91+
if(Boolean.valueOf(declarative)) {
9892
updateRepository(newRepository, existingRepository);
9993
} else {
10094
logger.warn("We tried to create one of the preconfigured repositories but "

base/src/main/java/eu/openanalytics/rdepot/base/mirroring/pojos/MirroredRepository.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,26 @@ public abstract class MirroredRepository<P extends MirroredPackage, M extends Mi
3030
protected String name;
3131
protected String publicationUri;
3232
protected String serverAddress;
33+
protected Boolean deleted;
34+
protected Boolean published;
3335
protected Set<M> mirrors = new HashSet<>();
3436
protected Technology technology;
3537

3638
public MirroredRepository() {}
3739

38-
public MirroredRepository(String name, String publicationUri, String serverAddress,
39-
Technology technology) {
40-
this(name, publicationUri, serverAddress, new HashSet<>(), technology);
40+
public MirroredRepository(String name, String publicationUri, String serverAddress,
41+
Boolean deleted, Boolean published, Technology technology) {
42+
this(name, publicationUri, serverAddress, deleted, published, new HashSet<>(), technology);
4143
}
4244

4345
public MirroredRepository(String name, String publicationUri, String serverAddress,
44-
Set<M> mirrors, Technology technology) {
46+
Boolean deleted, Boolean published, Set<M> mirrors, Technology technology) {
4547
super();
4648
this.name = name;
4749
this.publicationUri = publicationUri;
4850
this.serverAddress = serverAddress;
51+
this.deleted = deleted;
52+
this.published = published;
4953
this.mirrors = mirrors;
5054
this.technology = technology;
5155
}
@@ -74,6 +78,22 @@ public void setServerAddress(String serverAddress) {
7478
this.serverAddress = serverAddress;
7579
}
7680

81+
public Boolean isDeleted() {
82+
return deleted;
83+
}
84+
85+
public void setDeleted(Boolean deleted) {
86+
this.deleted = deleted;
87+
}
88+
89+
public Boolean isPublished() {
90+
return published;
91+
}
92+
93+
public void setPublished(Boolean published) {
94+
this.published = published;
95+
}
96+
7797
public Set<M> getMirrors() {
7898
return mirrors;
7999
}

base/src/main/java/eu/openanalytics/rdepot/base/technology/InternalTechnology.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public String getName() {
4646

4747
@Override
4848
public String getVersion() {
49-
return "1.7.1";
49+
return "1.7.2";
5050
}
5151

5252
@Override

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ext.buildTime = {
4141
}
4242

4343
group = 'eu.openanalytics'
44-
ext.versionNumber = '1.7.1'
44+
ext.versionNumber = '1.7.2'
4545
ext.baseVersion = versionNumber
4646
version = versionNumber
4747
description = """rdepot"""

docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
networks:
3232
- oa-rdepot
3333
app:
34-
image: openanalytics/rdepot-app:1.7.1
34+
image: openanalytics/rdepot-app:1.7.2
3535
restart: unless-stopped
3636
hostname: oa-rdepot-app
3737
container_name: oa-rdepot-app
@@ -55,7 +55,7 @@ services:
5555
timeout: 10s
5656
retries: 10
5757
repo:
58-
image: openanalytics/rdepot-repo:1.7.1
58+
image: openanalytics/rdepot-repo:1.7.2
5959
restart: unless-stopped
6060
hostname: oa-rdepot-repo
6161
container_name: oa-rdepot-repo
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM openanalytics/rdepot-app-it:1.7.1
1+
FROM openanalytics/rdepot-app-it:1.7.2
22

33
COPY rdepot-app-*application.war /opt/rdepot/rdepot.war
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM openanalytics/rdepot-repo-it:1.7.1
1+
FROM openanalytics/rdepot-repo-it:1.7.2
22

33
COPY rdepot-repo-*application.jar /opt/repo/rdepot-repo.jar

r-module/src/main/java/eu/openanalytics/rdepot/r/initializer/RRepositoryDataInitializer.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,27 @@ public void createRepositoriesFromConfig(boolean declarative) {
7878
}
7979

8080
@Override
81-
protected RRepository declaredRepositoryToEntity(MirroredRRepository declaredRepository) {
81+
protected RRepository declaredRepositoryToEntity(MirroredRRepository declaredRepository, boolean declarative) {
8282
RRepository repository = new RRepository();
8383
repository.setName(declaredRepository.getName());
8484
repository.setPublicationUri(declaredRepository.getPublicationUri());
8585
repository.setServerAddress(declaredRepository.getServerAddress());
8686

87+
if(declarative) {
88+
boolean deleted, published;
89+
if(declaredRepository.isDeleted() == null)
90+
deleted = false;
91+
else
92+
deleted = declaredRepository.isDeleted();
93+
if(declaredRepository.isPublished() == null)
94+
published = true;
95+
else
96+
published = declaredRepository.isPublished();
97+
98+
repository.setDeleted(deleted);
99+
repository.setPublished(published);
100+
}
101+
87102
return repository;
88103
}
89104

r-module/src/main/java/eu/openanalytics/rdepot/r/mirroring/pojos/MirroredRRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ public MirroredRRepository() {
3333
}
3434

3535
public MirroredRRepository(String name, String publicationUri, String serverAddress,
36-
Set<CranMirror> mirrors) {
37-
super(name, publicationUri, serverAddress, mirrors, RLanguage.instance);
36+
Boolean deleted, Boolean published, Set<CranMirror> mirrors) {
37+
super(name, publicationUri, serverAddress, deleted, published, mirrors, RLanguage.instance);
3838
}
3939

4040
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"id":2,"version":1,"publicationUri":"http://localhost/repo/A","name":"A","serverAddress":"http://oa-rdepot-repo:8080/A","deleted":false,"published":false,"packages":[],"repositoryMaintainers":[]},{"id":7,"version":4,"publicationUri":"http://localhost/repo/D","name":"D","serverAddress":"http://oa-rdepot-repo:8080/D","deleted":false,"published":false,"packages":[{"id":5,"version":"1.68.0","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":5},"name":"annotate","description":"Using R enviroments for annotation.","author":"R. Gentleman","depends":"R (>= 2.10), AnnotationDbi (>= 1.27.5), XML","imports":"Biobase, DBI, xtable, graphics, utils, stats, methods, BiocGenerics (>= 0.13.8), httr","suggests":"hgu95av2.db, genefilter, Biostrings (>= 2.25.10), IRanges, rae230a.db, rae230aprobe, tkWidgets, GO.db, org.Hs.eg.db, org.Mm.eg.db, hom.Hs.inp.db, humanCHRLOC, Rgraphviz, RUnit,","systemRequirements":null,"license":"Artistic-2.0","title":"Annotation for microarrays","url":null,"source":"/opt/rdepot/new/26971548/annotate_1.68.0.tar.gz","md5sum":"c06830f9bcfc0ae87023bfe03acb319e","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}},{"id":4,"version":"1.80.0","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":4},"name":"genefilter","description":"Some basic functions for filtering genes.","author":"Robert Gentleman, Vincent J. Carey, Wolfgang Huber, Florian Hahne","depends":null,"imports":"BiocGenerics, AnnotationDbi, annotate, Biobase, graphics, methods, stats, survival, grDevices","suggests":"class, hgu95av2.db, tkWidgets, ALL, ROC, RColorBrewer, BiocStyle, knitr","systemRequirements":null,"license":"Artistic-2.0","title":"genefilter: methods for filtering genes from high-throughput experiments","url":null,"source":"/opt/rdepot/new/47794045/genefilter_1.80.0.tar.gz","md5sum":"8586fdf3f5bd2c66a09d7324c05a200a","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}},{"id":2,"version":"3.3.2","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":2},"name":"ggplot2","description":"A system for 'declaratively' creating graphics, based on \"The Grammar of Graphics\". You provide the data, tell 'ggplot2' how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details.","author":"Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>),","depends":"R (>= 3.2)","imports":"digest, glue, grDevices, grid, gtable (>= 0.1.1), isoband, MASS, mgcv, rlang (>= 0.3.0), scales (>= 0.5.0), stats, tibble, withr (>= 2.0.0)","suggests":"covr, dplyr, ggplot2movies, hexbin, Hmisc, knitr, lattice, mapproj, maps, maptools, multcomp, munsell, nlme, profvis, quantreg, RColorBrewer, rgeos, rmarkdown, rpart, sf (>= 0.7-3), svglite (>= 1.2.0.9001), testthat (>= 2.1.0), vdiffr (>= 0.3.0)","systemRequirements":null,"license":"GPL-2 | file LICENSE","title":"Create Elegant Data Visualisations Using the Grammar of Graphics","url":"http://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2","source":"/opt/rdepot/new/17512975/ggplot2_3.3.2.tar.gz","md5sum":"02d87290852410924eb816c2d4788afa","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}},{"id":3,"version":"4.10.1","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":3},"name":"plotly","description":"Create interactive web graphics from 'ggplot2' graphs and/or a custom interface to the (MIT-licensed) JavaScript library 'plotly.js' inspired by the grammar of graphics.","author":"Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Chris Parmer [aut], Toby Hocking [aut], Scott Chamberlain [aut], Karthik Ram [aut],","depends":"R (>= 3.2.0), ggplot2 (>= 3.0.0)","imports":"tools, scales, httr (>= 1.3.0), jsonlite (>= 1.6), magrittr, digest, viridisLite, base64enc, htmltools (>= 0.3.6), htmlwidgets (>= 1.5.2.9001), tidyr (>= 1.0.0), RColorBrewer, dplyr, vctrs, tibble, lazyeval (>= 0.2.0), rlang (>= 0.4.10), crosstalk, purrr, data.table, promises","suggests":"MASS, maps, hexbin, ggthemes, GGally, ggalluvial, testthat, knitr, devtools, shiny (>= 1.1.0), shinytest (>= 1.3.0), curl, rmarkdown, Cairo, broom, webshot, listviewer, dendextend, maptools, rgeos, sf, png, IRdisplay, processx, plotlyGeoAssets, forcats, palmerpenguins, rversions, reticulate, rsvg","systemRequirements":null,"license":"MIT + file LICENSE","title":"Create Interactive Web Graphics via 'plotly.js'","url":"https://plotly-r.com, https://github.com/plotly/plotly.R,","source":"/opt/rdepot/new/41972207/plotly_4.10.1.tar.gz","md5sum":"56c437fe24025831b5367747e4a341ff","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}}],"repositoryMaintainers":[]}]
1+
[{"id":2,"version":1,"publicationUri":"http://localhost/repo/A","name":"A","serverAddress":"http://oa-rdepot-repo:8080/A","deleted":false,"published":true,"packages":[],"repositoryMaintainers":[]},{"id":7,"version":4,"publicationUri":"http://localhost/repo/D","name":"D","serverAddress":"http://oa-rdepot-repo:8080/D","deleted":false,"published":false,"packages":[{"id":5,"version":"1.68.0","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":5},"name":"annotate","description":"Using R enviroments for annotation.","author":"R. Gentleman","depends":"R (>= 2.10), AnnotationDbi (>= 1.27.5), XML","imports":"Biobase, DBI, xtable, graphics, utils, stats, methods, BiocGenerics (>= 0.13.8), httr","suggests":"hgu95av2.db, genefilter, Biostrings (>= 2.25.10), IRanges, rae230a.db, rae230aprobe, tkWidgets, GO.db, org.Hs.eg.db, org.Mm.eg.db, hom.Hs.inp.db, humanCHRLOC, Rgraphviz, RUnit,","systemRequirements":null,"license":"Artistic-2.0","title":"Annotation for microarrays","url":null,"source":"/opt/rdepot/new/26971548/annotate_1.68.0.tar.gz","md5sum":"c06830f9bcfc0ae87023bfe03acb319e","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}},{"id":4,"version":"1.80.0","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":4},"name":"genefilter","description":"Some basic functions for filtering genes.","author":"Robert Gentleman, Vincent J. Carey, Wolfgang Huber, Florian Hahne","depends":null,"imports":"BiocGenerics, AnnotationDbi, annotate, Biobase, graphics, methods, stats, survival, grDevices","suggests":"class, hgu95av2.db, tkWidgets, ALL, ROC, RColorBrewer, BiocStyle, knitr","systemRequirements":null,"license":"Artistic-2.0","title":"genefilter: methods for filtering genes from high-throughput experiments","url":null,"source":"/opt/rdepot/new/47794045/genefilter_1.80.0.tar.gz","md5sum":"8586fdf3f5bd2c66a09d7324c05a200a","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}},{"id":2,"version":"3.3.2","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":2},"name":"ggplot2","description":"A system for 'declaratively' creating graphics, based on \"The Grammar of Graphics\". You provide the data, tell 'ggplot2' how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details.","author":"Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>),","depends":"R (>= 3.2)","imports":"digest, glue, grDevices, grid, gtable (>= 0.1.1), isoband, MASS, mgcv, rlang (>= 0.3.0), scales (>= 0.5.0), stats, tibble, withr (>= 2.0.0)","suggests":"covr, dplyr, ggplot2movies, hexbin, Hmisc, knitr, lattice, mapproj, maps, maptools, multcomp, munsell, nlme, profvis, quantreg, RColorBrewer, rgeos, rmarkdown, rpart, sf (>= 0.7-3), svglite (>= 1.2.0.9001), testthat (>= 2.1.0), vdiffr (>= 0.3.0)","systemRequirements":null,"license":"GPL-2 | file LICENSE","title":"Create Elegant Data Visualisations Using the Grammar of Graphics","url":"http://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2","source":"/opt/rdepot/new/17512975/ggplot2_3.3.2.tar.gz","md5sum":"02d87290852410924eb816c2d4788afa","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}},{"id":3,"version":"4.10.1","repository":{"id":7,"name":"D","publicationUri":"http://localhost/repo/D"},"submission":{"deleted":false,"changes":null,"accepted":true,"id":3},"name":"plotly","description":"Create interactive web graphics from 'ggplot2' graphs and/or a custom interface to the (MIT-licensed) JavaScript library 'plotly.js' inspired by the grammar of graphics.","author":"Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Chris Parmer [aut], Toby Hocking [aut], Scott Chamberlain [aut], Karthik Ram [aut],","depends":"R (>= 3.2.0), ggplot2 (>= 3.0.0)","imports":"tools, scales, httr (>= 1.3.0), jsonlite (>= 1.6), magrittr, digest, viridisLite, base64enc, htmltools (>= 0.3.6), htmlwidgets (>= 1.5.2.9001), tidyr (>= 1.0.0), RColorBrewer, dplyr, vctrs, tibble, lazyeval (>= 0.2.0), rlang (>= 0.4.10), crosstalk, purrr, data.table, promises","suggests":"MASS, maps, hexbin, ggthemes, GGally, ggalluvial, testthat, knitr, devtools, shiny (>= 1.1.0), shinytest (>= 1.3.0), curl, rmarkdown, Cairo, broom, webshot, listviewer, dendextend, maptools, rgeos, sf, png, IRdisplay, processx, plotlyGeoAssets, forcats, palmerpenguins, rversions, reticulate, rsvg","systemRequirements":null,"license":"MIT + file LICENSE","title":"Create Interactive Web Graphics via 'plotly.js'","url":"https://plotly-r.com, https://github.com/plotly/plotly.R,","source":"/opt/rdepot/new/41972207/plotly_4.10.1.tar.gz","md5sum":"56c437fe24025831b5367747e4a341ff","active":false,"deleted":false,"user":{"id":4,"login":"einstein","name":"Albert Einstein","email":"einstein@ldap.forumsys.com"}}],"repositoryMaintainers":[]}]

0 commit comments

Comments
 (0)