diff --git a/CITATION.cff b/CITATION.cff
index fbc0478..7951bf2 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -34,6 +34,18 @@ authors:
name-particle: de
email: garidel@cerege.fr
orcid: https://orcid.org/0000-0001-8983-9571
+preferred-citation:
+ type: manual
+ title: 'forcis: An R client to access the FORCIS database'
+ authors:
+ - name: Casajus Nicolas
+ - name: Greco Mattia
+ - name: Chaabane Sonia
+ - name: Giraud Xavier
+ - name: de Garidel-Thoron Thibault
+ year: '2024'
+ notes: R package version 0.1.0.9000
+ url: https://frbcesab.github.io/forcis
repository-code: https://github.com/FRBCesab/forcis
url: https://frbcesab.github.io/forcis
contact:
@@ -42,6 +54,62 @@ contact:
email: nicolas.casajus@fondationbiodiversite.fr
orcid: https://orcid.org/0000-0002-5537-5294
references:
+- type: article
+ title: 'The FORCIS database: A global census of planktonic Foraminifera from ocean
+ waters'
+ authors:
+ - name: Chaabane Sonia
+ - name: De Garidel-Thoron Thibault
+ - name: Giraud Xavier
+ - name: Schiebel Ralf
+ - name: Beaugrand Gregory
+ - name: Brummer Geert-Jan
+ - name: Casajus Nicolas
+ - name: Greco Mattia
+ - name: Grigoratou Maria
+ - name: Howa Hélène
+ - name: Jonkers Lukas
+ - name: Kucera Michal
+ - name: Kuroyanagi Azumi
+ - name: Meilland Julie
+ - name: Monteiro Fanny
+ - name: Mortyn Graham
+ - name: Almogi-Labin Ahuva
+ - name: Asahi Hirofumi
+ - name: Avnaim-Katav Simona
+ - name: Bassinot Franck
+ - name: Davis Catherine V.
+ - name: Field David B.
+ - name: Hernández-Almeida Iván
+ - name: Herut Barak
+ - name: Hosie Graham
+ - name: Howard Will
+ - name: Jentzen Anna
+ - name: Johns David G.
+ - name: Keigwin Lloyd
+ - name: Kitchener John
+ - name: Kohfeld Karen E.
+ - name: Lessa Douglas V. O.
+ - name: Manno Clara
+ - name: Marchant Margarita
+ - name: Ofstad Siri
+ - name: Ortiz Joseph D.
+ - name: Post Alexandra
+ - name: Rigual-Hernandez Andres
+ - name: Rillo Marina C.
+ - name: Robinson Karen
+ - name: Sagawa Takuya
+ - name: Sierro Francisco
+ - name: Takahashi Kunio T.
+ - name: Torfstein Adi
+ - name: Venancio Igor
+ - name: Yamasaki Makoto
+ - name: Ziveri Patrizia
+ journal: Scientific Data
+ volume: '10'
+ doi: 10.1038/s41597-023-02264-2
+ year: '2023'
+ start: '354'
- type: software
title: 'R: A Language and Environment for Statistical Computing'
notes: Depends
@@ -293,6 +361,31 @@ references:
year: '2024'
doi: 10.32614/CRAN.package.testthat
version: '>= 3.0.0'
+- type: software
+ title: vdiffr
+ abstract: 'vdiffr: Visual Regression Testing and Graphical Diffing'
+ notes: Suggests
+ url: https://vdiffr.r-lib.org/
+ repository: https://CRAN.R-project.org/package=vdiffr
+ authors:
+ - family-names: Henry
+ given-names: Lionel
+ email: lionel@posit.co
+ - family-names: Pedersen
+ given-names: Thomas Lin
+ email: thomas.pedersen@posit.co
+ orcid: https://orcid.org/0000-0002-5147-4711
+ - family-names: Luciani
+ given-names: T Jake
+ email: jake@apache.org
+ - family-names: Decorde
+ given-names: Matthieu
+ email: matthieu.decorde@ens-lyon.fr
+ - family-names: Lise
+ given-names: Vaudor
+ email: lise.vaudor@ens-lyon.fr
+ year: '2024'
+ doi: 10.32614/CRAN.package.vdiffr
- type: software
title: withr
abstract: 'withr: Run Code ''With'' Temporarily Modified Global State'
diff --git a/DESCRIPTION b/DESCRIPTION
index 040d3cb..25522e6 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -62,5 +62,6 @@ Suggests:
knitr,
rmarkdown,
testthat (>= 3.0.0),
+ vdiffr,
withr
Config/testthat/edition: 3
diff --git a/codemeta.json b/codemeta.json
index 8661653..9b559ca 100644
--- a/codemeta.json
+++ b/codemeta.json
@@ -133,6 +133,18 @@
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
+ {
+ "@type": "SoftwareApplication",
+ "identifier": "vdiffr",
+ "name": "vdiffr",
+ "provider": {
+ "@id": "https://cran.r-project.org",
+ "@type": "Organization",
+ "name": "Comprehensive R Archive Network (CRAN)",
+ "url": "https://cran.r-project.org"
+ },
+ "sameAs": "https://CRAN.R-project.org/package=vdiffr"
+ },
{
"@type": "SoftwareApplication",
"identifier": "withr",
@@ -244,7 +256,7 @@
},
"SystemRequirements": null
},
- "fileSize": "2716.372KB",
+ "fileSize": "3718.985KB",
"citation": [
{
"@type": "SoftwareSourceCode",
diff --git a/tests/testthat/_snaps/geom_basemap/plot-with-basemap.svg b/tests/testthat/_snaps/geom_basemap/plot-with-basemap.svg
new file mode 100644
index 0000000..f399300
--- /dev/null
+++ b/tests/testthat/_snaps/geom_basemap/plot-with-basemap.svg
@@ -0,0 +1,350 @@
+
+
diff --git a/tests/testthat/_snaps/ggmap_data/map-data.svg b/tests/testthat/_snaps/ggmap_data/map-data.svg
new file mode 100644
index 0000000..e31fb4b
--- /dev/null
+++ b/tests/testthat/_snaps/ggmap_data/map-data.svg
@@ -0,0 +1,351 @@
+
+
diff --git a/tests/testthat/_snaps/plot_record_by_depth/plot-record-by-depth.svg b/tests/testthat/_snaps/plot_record_by_depth/plot-record-by-depth.svg
new file mode 100644
index 0000000..b463496
--- /dev/null
+++ b/tests/testthat/_snaps/plot_record_by_depth/plot-record-by-depth.svg
@@ -0,0 +1,54 @@
+
+
diff --git a/tests/testthat/_snaps/plot_record_by_month/plot-record-by-month.svg b/tests/testthat/_snaps/plot_record_by_month/plot-record-by-month.svg
new file mode 100644
index 0000000..82a3799
--- /dev/null
+++ b/tests/testthat/_snaps/plot_record_by_month/plot-record-by-month.svg
@@ -0,0 +1,87 @@
+
+
diff --git a/tests/testthat/_snaps/plot_record_by_season/plot-record-by-season.svg b/tests/testthat/_snaps/plot_record_by_season/plot-record-by-season.svg
new file mode 100644
index 0000000..e62ed9b
--- /dev/null
+++ b/tests/testthat/_snaps/plot_record_by_season/plot-record-by-season.svg
@@ -0,0 +1,61 @@
+
+
diff --git a/tests/testthat/_snaps/plot_record_by_year/plot-net-record-by-year.svg b/tests/testthat/_snaps/plot_record_by_year/plot-net-record-by-year.svg
new file mode 100644
index 0000000..0ca0162
--- /dev/null
+++ b/tests/testthat/_snaps/plot_record_by_year/plot-net-record-by-year.svg
@@ -0,0 +1,65 @@
+
+
diff --git a/tests/testthat/_snaps/plot_record_by_year/plot-record-by-year.svg b/tests/testthat/_snaps/plot_record_by_year/plot-record-by-year.svg
new file mode 100644
index 0000000..680dac7
--- /dev/null
+++ b/tests/testthat/_snaps/plot_record_by_year/plot-record-by-year.svg
@@ -0,0 +1,65 @@
+
+
diff --git a/tests/testthat/_snaps/plot_record_by_year/plot-trap-record-by-year.svg b/tests/testthat/_snaps/plot_record_by_year/plot-trap-record-by-year.svg
new file mode 100644
index 0000000..c30541d
--- /dev/null
+++ b/tests/testthat/_snaps/plot_record_by_year/plot-trap-record-by-year.svg
@@ -0,0 +1,65 @@
+
+
diff --git a/tests/testthat/test-geom_basemap.R b/tests/testthat/test-geom_basemap.R
index 048795d..935522c 100644
--- a/tests/testthat/test-geom_basemap.R
+++ b/tests/testthat/test-geom_basemap.R
@@ -16,4 +16,8 @@ test_that("Test geom_basemap() for success", {
}
expect_true("element_blank" %in% class(geom[[5]][[1]]))
+
+ expect_silent({ gg <- ggplot2::ggplot() + geom_basemap() })
+
+ vdiffr::expect_doppelganger("Plot with basemap", gg)
})
diff --git a/tests/testthat/test-ggmap_data.R b/tests/testthat/test-ggmap_data.R
index f84c169..4aec442 100644
--- a/tests/testthat/test-ggmap_data.R
+++ b/tests/testthat/test-ggmap_data.R
@@ -12,4 +12,6 @@ test_that("Test ggmap_data() for success", {
expect_true("gg" %in% class(gg))
expect_true("ggplot" %in% class(gg))
+
+ vdiffr::expect_doppelganger("Map data", gg)
})
diff --git a/tests/testthat/test-plot_record_by_depth.R b/tests/testthat/test-plot_record_by_depth.R
index 783964e..f6aac47 100644
--- a/tests/testthat/test-plot_record_by_depth.R
+++ b/tests/testthat/test-plot_record_by_depth.R
@@ -27,4 +27,6 @@ test_that("Test plot_record_by_depth() for success", {
expect_true("gg" %in% class(gg))
expect_true("ggplot" %in% class(gg))
+
+ vdiffr::expect_doppelganger("Plot record by depth", gg)
})
diff --git a/tests/testthat/test-plot_record_by_month.R b/tests/testthat/test-plot_record_by_month.R
index eec7eb0..e27bc5a 100644
--- a/tests/testthat/test-plot_record_by_month.R
+++ b/tests/testthat/test-plot_record_by_month.R
@@ -26,5 +26,7 @@ test_that("Test plot_record_by_month() for success", {
expect_true("gg" %in% class(gg))
expect_true("ggplot" %in% class(gg))
+
+ vdiffr::expect_doppelganger("Plot record by month", gg)
})
diff --git a/tests/testthat/test-plot_record_by_season.R b/tests/testthat/test-plot_record_by_season.R
index be4017b..9416ac7 100644
--- a/tests/testthat/test-plot_record_by_season.R
+++ b/tests/testthat/test-plot_record_by_season.R
@@ -28,4 +28,6 @@ test_that("Test plot_record_by_season() for success", {
expect_true("gg" %in% class(gg))
expect_true("ggplot" %in% class(gg))
+
+ vdiffr::expect_doppelganger("Plot record by season", gg)
})
diff --git a/tests/testthat/test-plot_record_by_year.R b/tests/testthat/test-plot_record_by_year.R
index 8732520..5595bad 100644
--- a/tests/testthat/test-plot_record_by_year.R
+++ b/tests/testthat/test-plot_record_by_year.R
@@ -1,16 +1,16 @@
## Data for tests ----
-df_net <- data.frame("data_type" = rep("Net", 6),
+df_net <- data.frame("data_type" = rep("Net", 5),
"profile_date_time" = c("01/02/1999", "01/03/2020",
"01/03/2022", "01/04/2023",
- "01/07/2024", NA),
- "sample_id" = c(1, 1, 2, 3, 3, 3))
+ "01/07/2024"),
+ "sample_id" = c(1, 1, 2, 3, 3))
-df_trap <- data.frame("data_type" = rep("Sediment trap", 6),
+df_trap <- data.frame("data_type" = rep("Sediment trap", 5),
"sample_date_time_start" = c("01/02/1999", "01/03/2020",
"01/03/2022", "01/04/2023",
- "01/07/2024", NA),
- "sample_id" = c(1, 1, 2, 3, 3, 3))
+ "01/07/2024"),
+ "sample_id" = c(1, 1, 2, 3, 3))
## plot_record_by_year() ----
@@ -22,8 +22,12 @@ test_that("Test plot_record_by_year() for success", {
expect_true("gg" %in% class(gg))
expect_true("ggplot" %in% class(gg))
+ vdiffr::expect_doppelganger("Plot net record by year", gg)
+
expect_silent({ gg <- plot_record_by_year(df_trap) })
expect_true("gg" %in% class(gg))
expect_true("ggplot" %in% class(gg))
+
+ vdiffr::expect_doppelganger("Plot trap record by year", gg)
})