Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371075 )

Change subject: rename "r" module to "r_lang"
......................................................................

rename "r" module to "r_lang"

As suggested by Giuseppe, let's use a slightly less confusing name.

Change-Id: Ibd3d97e827718ede28d2f353b66732d2baa1bf70
---
M modules/profile/manifests/discovery_dashboards/base.pp
R modules/r_lang/README.md
R modules/r_lang/files/update-library.R
R modules/r_lang/manifests/cran.pp
R modules/r_lang/manifests/git.pp
R modules/r_lang/manifests/github.pp
R modules/r_lang/manifests/init.pp
M modules/shiny_server/manifests/init.pp
8 files changed, 25 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/371075/1

diff --git a/modules/profile/manifests/discovery_dashboards/base.pp 
b/modules/profile/manifests/discovery_dashboards/base.pp
index e222477..105055d 100644
--- a/modules/profile/manifests/discovery_dashboards/base.pp
+++ b/modules/profile/manifests/discovery_dashboards/base.pp
@@ -15,17 +15,17 @@
         'highcharter',
         'countrycode'
     ]
-    r::cran { $cran_packages:
+    r_lang::cran { $cran_packages:
         mirror => 'https://cran.cnr.berkeley.edu',
     }
 
     # 'polloi' contains common functions & data used by all the dashboards
-    r::git { 'polloi':
+    r_lang::git { 'polloi':
         url => 'https://gerrit.wikimedia.org/r/wikimedia/discovery/polloi',
     }
 
     # 'googleCharts' is used on the Wikipedia.org portal metrics dashboard
-    r::github { 'googleCharts':
+    r_lang::github { 'googleCharts':
         repo => 'jcheng5/googleCharts',
     }
 
diff --git a/modules/r/README.md b/modules/r_lang/README.md
similarity index 92%
rename from modules/r/README.md
rename to modules/r_lang/README.md
index 5aa634d..8dc25fad8 100644
--- a/modules/r/README.md
+++ b/modules/r_lang/README.md
@@ -8,7 +8,7 @@
 algebra) library, and makes the following resources available for installing
 R packages from various sources:
 
-- **r::cran** for installing from Comprehensive R Archive Network
+- **r_lang::cran** for installing from Comprehensive R Archive Network
     - the resource ID should be name of the package to be installed
     - *timeout*: default 300 (seconds)
     - *ensure*: default 'present', but also supports 'absent'
@@ -16,14 +16,14 @@
       redirection to servers worldwide, sponsored by Rstudio. In practice, the
       module uses [UC Berkeley mirror](https://cran.cnr.berkeley.edu/). For a
       list of CRAN mirrors, see https://cran.r-project.org/mirrors.html
-- **r::git** for installing from any Git repository
+- **r_lang::git** for installing from any Git repository
     - the resource ID should be name of the package to be installed
     - *url* is forwarded to `devtools::install_git()`
       e.g. 'https://gerrit.wikimedia.org/r/wikimedia/discovery/polloi'
     - *ensure*: default 'present', but also supports 'absent'
     - **Notice**: this is only available if the `devtools` parameter is set to
       `true`. Refer to [Disclaimer](#disclaimer) section below for details.
-- **r::github** for installing from a GitHub-hosted repository
+- **r_lang::github** for installing from a GitHub-hosted repository
     - the resource ID should be name of the package to be installed
     - *repo* is forwarded to `devtools::install_github()`
       e.g. 'wikimedia/wikimedia-discovery-polloi'
@@ -37,7 +37,7 @@
 ## Disclaimer
 
 By default, the *devtools* R package (and its dependencies) are not installed,
-which means that **r::git** and **r::github** will not work without specifying
+which means that **r_lang::git** and **r_lang::github** will not work without 
specifying
 `devtools => true` when using this module. This is because we do not yet allow
 installing R packages via Puppet in Production until we have some kind of our
 own, trusted CRAN mirror to install from. The work and discussion for setting
diff --git a/modules/r/files/update-library.R 
b/modules/r_lang/files/update-library.R
similarity index 100%
rename from modules/r/files/update-library.R
rename to modules/r_lang/files/update-library.R
diff --git a/modules/r/manifests/cran.pp b/modules/r_lang/manifests/cran.pp
similarity index 96%
rename from modules/r/manifests/cran.pp
rename to modules/r_lang/manifests/cran.pp
index bdab70e..b1e8ef5 100644
--- a/modules/r/manifests/cran.pp
+++ b/modules/r_lang/manifests/cran.pp
@@ -1,4 +1,4 @@
-# = Define: r::cran
+# = Define: r_lang::cran
 #
 # Facilitates installation of R packages from Comprehensive R Archive Network.
 #
@@ -22,7 +22,7 @@
 #     for specifying the path of the library for
 #     installing the R package
 #
-define r::cran (
+define r_lang::cran (
     $timeout = 300,
     $ensure  = 'present',
     $mirror  = 'https://cloud.r-project.org',
diff --git a/modules/r/manifests/git.pp b/modules/r_lang/manifests/git.pp
similarity index 91%
rename from modules/r/manifests/git.pp
rename to modules/r_lang/manifests/git.pp
index d2e9c77..e27ed4c 100644
--- a/modules/r/manifests/git.pp
+++ b/modules/r_lang/manifests/git.pp
@@ -1,4 +1,4 @@
-# = Define: r::git
+# = Define: r_lang::git
 #
 # Facilitates installation of R packages from a remote Git repository.
 #
@@ -18,7 +18,7 @@
 #     for specifying the path of the library for
 #     installing the R package
 #
-define r::git (
+define r_lang::git (
     $url,
     $ensure = 'present',
     $library = '/usr/local/lib/R/site-library'
@@ -33,7 +33,7 @@
         }
         default: {
             exec { "package-${title}":
-                require => R::Cran['devtools'],
+                require => R_lang::Cran['devtools'],
                 command => "/usr/bin/R -e \"devtools::install_git('${url}', 
lib = '${library}')\"",
                 creates => $pkg_path,
             }
diff --git a/modules/r/manifests/github.pp b/modules/r_lang/manifests/github.pp
similarity index 90%
rename from modules/r/manifests/github.pp
rename to modules/r_lang/manifests/github.pp
index 51eb4d5..691187d 100644
--- a/modules/r/manifests/github.pp
+++ b/modules/r_lang/manifests/github.pp
@@ -1,4 +1,4 @@
-# = Define: r::github
+# = Define: r_lang::github
 #
 # Facilitates installation of R packages from GitHub.
 #
@@ -17,7 +17,7 @@
 #     for specifying the path of the library for
 #     installing the R package
 #
-define r::github (
+define r_lang::github (
     $repo,
     $ensure = 'present',
     $library = '/usr/local/lib/R/site-library'
@@ -32,7 +32,7 @@
         }
         default: {
             exec { "package-${title}":
-                require => R::Cran['devtools'],
+                require => R_lang::Cran['devtools'],
                 command => "/usr/bin/R -e 
\"devtools::install_github('${repo}', lib = '${library}')\"",
                 creates => $pkg_path,
             }
diff --git a/modules/r/manifests/init.pp b/modules/r_lang/manifests/init.pp
similarity index 81%
rename from modules/r/manifests/init.pp
rename to modules/r_lang/manifests/init.pp
index 91a355f..91b1d53 100644
--- a/modules/r/manifests/init.pp
+++ b/modules/r_lang/manifests/init.pp
@@ -1,13 +1,13 @@
 # = Class: r
 #
 # Class containing stuff for installing R and its packages from different 
sources:
-# - r::cran for installing from Comprehensive R Archive Network (CRAN)
-# - r::git for installing from any Git repository (e.g. Gerrit)
-# - r::github for installing from a GitHub-hosted repository
+# - r_lang::cran for installing from Comprehensive R Archive Network (CRAN)
+# - r_lang::git for installing from any Git repository (e.g. Gerrit)
+# - r_lang::github for installing from a GitHub-hosted repository
 #
 # Also provides a utility script for updating library of installed R packages.
 #
-# Heads-up that by default r::git and r::github are technically not available
+# Heads-up that by default r_lang::git and r_lang::github are technically not 
available
 # because those require the R package 'devtools' which is not installed by
 # default and cannot be installed because its dependencies are not installed
 # unless the `$devtools$` parameter is set to `true`.
@@ -49,7 +49,7 @@
         ]
         require_package($devtools_essentials)
 
-        r::cran { 'openssl':
+        r_lang::cran { 'openssl':
             require => Package['libssl-dev'],
         }
 
@@ -58,12 +58,12 @@
             'curl',
             'devtools',
         ]
-        r::cran { $r_packages:
+        r_lang::cran { $r_packages:
             require => [
                 Package['git-core'],
                 Package['libxml2'],
                 Package['libxml2-dev'],
-                R::Cran['openssl'],
+                R_lang::Cran['openssl'],
                 Package['libcurl4-openssl-dev']
             ],
         }
diff --git a/modules/shiny_server/manifests/init.pp 
b/modules/shiny_server/manifests/init.pp
index f6bf745..31d8daa 100644
--- a/modules/shiny_server/manifests/init.pp
+++ b/modules/shiny_server/manifests/init.pp
@@ -32,14 +32,14 @@
 
     # Install R packages from CRAN, Gerrit, and GitHub:
     $cran_mirror = 'https://cran.cnr.berkeley.edu'
-    r::cran { 'rmarkdown':
+    r_lang::cran { 'rmarkdown':
         require => Package['pandoc'],
         mirror  => $cran_mirror,
     }
     # tidyverse includes packages such as dplyr, tidyr, magrittr, readr,
     # ggplot2, broom, purrr, rvest, forcats, lubridate, and jsonlite
     # It's a lot of packages so we *really* need to extend the timeout.
-    r::cran { 'tidyverse':
+    r_lang::cran { 'tidyverse':
         timeout => 6000,
         mirror  => $cran_mirror,
     }
@@ -60,7 +60,7 @@
         'knitr', 'markdown',
         'optparse'                          # needed for /etc/update-pkg.R
     ]
-    r::cran { $cran_packages: mirror => $cran_mirror }
+    r_lang::cran { $cran_packages: mirror => $cran_mirror }
 
     # Set up files, directories, and users required for RStudio's Shiny Server:
     user { 'shiny':

-- 
To view, visit https://gerrit.wikimedia.org/r/371075
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd3d97e827718ede28d2f353b66732d2baa1bf70
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel <guillaume.leder...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to