From 6db93b26b4a4e406cdddb05a909b569a4a6ddfc6 Mon Sep 17 00:00:00 2001 From: Daniel Kalioudjoglou <daniel.kalioudjoglou@developpement-durable.gouv.fr> Date: Wed, 11 Dec 2024 13:03:02 +0100 Subject: [PATCH] correction du package --- DESCRIPTION | 7 +++++-- NAMESPACE | 16 ++++++++++++++++ R/creer_graphique_series_temporelles.R | 1 - R/creer_graphique_series_temporelles_prix.R | 1 - R/globals.R | 2 +- tests/testthat/test-creer_carte.R | 12 ++++++++++++ 6 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 tests/testthat/test-creer_carte.R diff --git a/DESCRIPTION b/DESCRIPTION index 00d9bbd..e467e45 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,7 +36,10 @@ Imports: scales, sf, stringr, - tidyr + tidyr, + utils +Suggests: + testthat Remotes: gitlab::dreal-datalab/drealdown, gitlab::dreal-datalab/mapfactory, @@ -44,4 +47,4 @@ Remotes: Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 diff --git a/NAMESPACE b/NAMESPACE index b0068a4..94fc2cc 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,21 @@ # Generated by roxygen2: do not edit by hand +export("%>%") +export(FormatCaractere) +export(FormatDate) +export(creer_carte_evolution) +export(creer_carte_volume) +export(creer_carte_volume2) +export(creer_chiffres_clefs_ecln) +export(creer_graphique_evolution_annuelle) +export(creer_graphique_evolution_trim) +export(creer_graphique_investissement_locatif) +export(creer_graphique_series_temporelles) +export(creer_graphique_series_temporelles_prix) +export(creer_tableau_synthese_annuel) +export(creer_tableau_synthese_trimestrielle) +export(data_prep) +export(set_theme) importFrom(COGiter,filtrer_cog) importFrom(COGiter,filtrer_cog_geo) importFrom(COGiter,list_epci_in_reg) diff --git a/R/creer_graphique_series_temporelles.R b/R/creer_graphique_series_temporelles.R index ba80ea9..406000d 100644 --- a/R/creer_graphique_series_temporelles.R +++ b/R/creer_graphique_series_temporelles.R @@ -15,7 +15,6 @@ #' @importFrom gouvdown scale_color_gouv_discrete #' @importFrom scales format_format #' @importFrom geofacet facet_geo -#' @examples creer_graphique_series_temporelles <- function(data = indic_ecln, type_logement = "Appartements", indicateurs = c("Encours", "Mises en vente", "Ventes"), diff --git a/R/creer_graphique_series_temporelles_prix.R b/R/creer_graphique_series_temporelles_prix.R index 26c4d4a..0723312 100644 --- a/R/creer_graphique_series_temporelles_prix.R +++ b/R/creer_graphique_series_temporelles_prix.R @@ -17,7 +17,6 @@ #' @importFrom scales dollar_format #' @importFrom stringr str_split_fixed #' @importFrom gouvdown scale_color_gouv_discrete -#' @examples creer_graphique_series_temporelles_prix <- function(data = indic_ecln, type_logement = "Logements", type_zone = c("R\u00e9gions", "D\u00e9partements"), diff --git a/R/globals.R b/R/globals.R index fc3c027..c626cf3 100644 --- a/R/globals.R +++ b/R/globals.R @@ -1,3 +1,3 @@ utils::globalVariables( - c("liste_zone", "indic_ecln", "%m-%","mygrid","params","Valeur",".") + c("liste_zone","indic_ecln","%m-%","mygrid","params","Valeur",".") ) diff --git a/tests/testthat/test-creer_carte.R b/tests/testthat/test-creer_carte.R new file mode 100644 index 0000000..0575e87 --- /dev/null +++ b/tests/testthat/test-creer_carte.R @@ -0,0 +1,12 @@ +test_that("creer_carte_volume fonctionne", { + + carte <- creer_carte_volume(data=indic_ecln, + code_region = "52", + indicateurs = c("Encours","Mises en vente","Ventes"), + type_logement="Appartements", + type_indicateur="Cumul annuel", + titre="", + titre_legende="", + bas_de_page="") + testthat::expect_length(carte, 11) +}) -- GitLab