From 8a7b9daf9ade1f41c4156dd52f185b3060d18cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Mon, 28 Aug 2023 14:34:22 +0200 Subject: [PATCH] Update repo_resolve() etc. docs from pkgcache --- R/repo.R | 51 +++++++++++++-------------- man/repo_add.Rd | 88 +++++++++++++++++++--------------------------- man/repo_status.Rd | 2 +- 3 files changed, 62 insertions(+), 79 deletions(-) diff --git a/R/repo.R b/R/repo.R index c91a1ebf5..59334a844 100644 --- a/R/repo.R +++ b/R/repo.R @@ -18,7 +18,7 @@ #' queried platform and R version. It has these columns: #' * `name`: the name of the repository. This comes from the names #' of the configured repositories in `options("repos")`, or -#' added by pkgcache. It is typically `CRAN` for CRAN, and the +#' added by pak. It is typically `CRAN` for CRAN, and the #' current Bioconductor repositories are `BioCsoft`, `BioCann`, #' `BioCexp`, `BioCworkflows`. #' * `url`: base URL of the repository. @@ -182,12 +182,17 @@ repo_get_internal <- function(r_version = getRversion(), bioc = TRUE, #' ``` #' https://cloud.r-project.org #' ``` -#' - `RSPM@`, RSPM (RStudio Package Manager) snapshot, at the -#' specified date. -#' - `RSPM@-` RSPM snapshot, for the day after the +#' - `PPM@latest`, PPM (Posit Package Manager, formerly RStudio Package +#' Manager), the latest snapshot. +#' - `PPM@`, PPM (Posit Package Manager, formerly RStudio Package +#' Manager) snapshot, at the specified date. +#' - `PPM@-` PPM snapshot, for the day after the #' release of `` of ``. -#' - `RSPM@R-` RSPM snapshot, for the day after R `` +#' - `PPM@R-` PPM snapshot, for the day after R `` #' was released. +#' +#' Still works for dates starting from 2017-10-10, but now deprecated, +#' because MRAN is discontinued: #' - `MRAN@`, MRAN (Microsoft R Application Network) snapshot, at #' the specified date. #' - `MRAN@-` MRAN snapshot, for the @@ -195,45 +200,39 @@ repo_get_internal <- function(r_version = getRversion(), bioc = TRUE, #' - `MRAN@R-` MRAN snapshot, for the day #' after R `` was released. #' -#' #' Notes: -#' * See more about RSPM at `https://packagemanager.rstudio.com/client/#/`. -#' * See more about MRAN snapshots at -#' . +#' * See more about PPM at . +#' * The `RSPM@` prefix is still supported and treated the same way as +#' `PPM@`. +#' * The MRAN service is now retired, see +#' +#' for details. +#' * `MRAN@...` repository specifications now resolve to PPM, but note that +#' PPM snapshots are only available from 2017-10-10. See more about this +#' at . #' * All dates (or times) can be specified in the ISO 8601 format. -#' * If RSPM does not have a snapshot available for a date, the next +#' * If PPM does not have a snapshot available for a date, the next #' available date is used. -#' * Dates that are before the first, or after the last RSPM snapshot +#' * Dates that are before the first, or after the last PPM snapshot #' will trigger an error. -#' * Dates before the first, or after the last MRAN snapshot will trigger -#' an error. #' * Unknown R or package versions will trigger an error. #' #' @family repository functions #' @export #' @section Exaples: #' ```{asciicast repo-add} -#' repo_add(RSPMdplyr100 = "RSPM@dplyr-1.0.0") +#' repo_add(PPMdplyr100 = "PPM@dplyr-1.0.0") #' repo_get() #' ``` #' -#' ```{asciicast repo-add-2} -#' repo_resolve("MRAN@2020-01-21") -#' ``` #' ```{asciicast repo-add-3} -#' repo_resolve("RSPM@2020-01-21") -#' ``` -#' ```{asciicast repo-add-4} -#' repo_resolve("MRAN@dplyr-1.0.0") +#' repo_resolve("PPM@2020-01-21") #' ``` #' ```{asciicast repo-add-5} -#' repo_resolve("RSPM@dplyr-1.0.0") -#' ``` -#' ```{asciicast repo-add-6} -#' repo_resolve("MRAN@R-4.0.0") +#' repo_resolve("PPM@dplyr-1.0.0") #' ``` #' ```{asciicast repo-add-7} -#' repo_resolve("RSPM@R-4.0.0") +#' repo_resolve("PPM@R-4.0.0") #' ``` repo_add <- function(..., .list = NULL) { diff --git a/man/repo_add.Rd b/man/repo_add.Rd index b71efd8f0..f6620c4dd 100644 --- a/man/repo_add.Rd +++ b/man/repo_add.Rd @@ -50,12 +50,19 @@ Currently supported repository specifications: \if{html}{\out{
}}\preformatted{https://cloud.r-project.org }\if{html}{\out{
}} -\item \verb{RSPM@}, RSPM (RStudio Package Manager) snapshot, at the -specified date. -\item \verb{RSPM@-} RSPM snapshot, for the day after the +\item \code{PPM@latest}, PPM (Posit Package Manager, formerly RStudio Package +Manager), the latest snapshot. +\item \verb{PPM@}, PPM (Posit Package Manager, formerly RStudio Package +Manager) snapshot, at the specified date. +\item \verb{PPM@-} PPM snapshot, for the day after the release of \verb{} of \verb{}. -\item \verb{RSPM@R-} RSPM snapshot, for the day after R \verb{} +\item \verb{PPM@R-} PPM snapshot, for the day after R \verb{} was released. +} + +Still works for dates starting from 2017-10-10, but now deprecated, +because MRAN is discontinued: +\itemize{ \item \verb{MRAN@}, MRAN (Microsoft R Application Network) snapshot, at the specified date. \item \verb{MRAN@-} MRAN snapshot, for the @@ -66,16 +73,20 @@ after R \verb{} was released. Notes: \itemize{ -\item See more about RSPM at \verb{https://packagemanager.rstudio.com/client/#/}. -\item See more about MRAN snapshots at -\url{https://mran.microsoft.com/timemachine}. +\item See more about PPM at \url{https://packagemanager.posit.co/client/#/}. +\item The \verb{RSPM@} prefix is still supported and treated the same way as +\verb{PPM@}. +\item The MRAN service is now retired, see +\url{https://techcommunity.microsoft.com/t5/azure-sql-blog/microsoft-r-application-network-retirement/ba-p/3707161} +for details. +\item \code{MRAN@...} repository specifications now resolve to PPM, but note that +PPM snapshots are only available from 2017-10-10. See more about this +at \url{https://posit.co/blog/migrating-from-mran-to-posit-package-manager/}. \item All dates (or times) can be specified in the ISO 8601 format. -\item If RSPM does not have a snapshot available for a date, the next +\item If PPM does not have a snapshot available for a date, the next available date is used. -\item Dates that are before the first, or after the last RSPM snapshot +\item Dates that are before the first, or after the last PPM snapshot will trigger an error. -\item Dates before the first, or after the last MRAN snapshot will trigger -an error. \item Unknown R or package versions will trigger an error. } } @@ -83,34 +94,25 @@ an error. \section{Exaples}{ -\if{html}{\out{
}}\preformatted{repo_add(RSPMdplyr100 = "RSPM@dplyr-1.0.0") +\if{html}{\out{
}}\preformatted{repo_add(PPMdplyr100 = "PPM@dplyr-1.0.0") repo_get() }\if{html}{\out{
}}\if{html}{\out{
-#> # A data frame: 6 × 5                                                   
-#>   name          url                                type  r_ver…¹ bioc_…²
-#> * <chr>         <chr>                              <chr> <chr>   <chr>  
-#> 1 CRAN          https://cloud.r-project.org        cran  *       NA     
-#> 2 RSPMdplyr100  https://packagemanager.posit.co/c… cran… *       NA     
-#> 3 BioCsoft      https://bioconductor.org/packages… bioc  4.2.2   3.16   
-#> 4 BioCann       https://bioconductor.org/packages… bioc  4.2.2   3.16   
-#> 5 BioCexp       https://bioconductor.org/packages… bioc  4.2.2   3.16   
-#> 6 BioCworkflows https://bioconductor.org/packages… bioc  4.2.2   3.16   
-#> # … with abbreviated variable names ¹​r_version, ²​bioc_version         
+#> # A data frame: 7 × 5                                                   
+#>   name          url                         type  r_version bioc_version
+#> * <chr>         <chr>                       <chr> <chr>     <chr>       
+#> 1 CRAN          https://cloud.r-project.org cran  *         NA          
+#> 2 PPMdplyr100   https://packagemanager.pos… cran… *         NA          
+#> 3 BioCsoft      https://bioconductor.org/p… bioc  4.3.1     3.17        
+#> 4 BioCann       https://bioconductor.org/p… bioc  4.3.1     3.17        
+#> 5 BioCexp       https://bioconductor.org/p… bioc  4.3.1     3.17        
+#> 6 BioCworkflows https://bioconductor.org/p… bioc  4.3.1     3.17        
+#> 7 BioCbooks     https://bioconductor.org/p… bioc  4.3.1     3.17        
 
}} -\if{html}{\out{
}}\preformatted{repo_resolve("MRAN@2020-01-21") -}\if{html}{\out{
}}\if{html}{\out{ -
-#>                                             CRAN                        
-#> "https://cran.microsoft.com/snapshot/2020-01-21"                        
-
-}} - - -\if{html}{\out{
}}\preformatted{repo_resolve("RSPM@2020-01-21") +\if{html}{\out{
}}\preformatted{repo_resolve("PPM@2020-01-21") }\if{html}{\out{
}}\if{html}{\out{
 #>                                       CRAN                              
@@ -119,16 +121,7 @@ repo_get()
 }}
 
 
-\if{html}{\out{
}}\preformatted{repo_resolve("MRAN@dplyr-1.0.0") -}\if{html}{\out{
}}\if{html}{\out{ -
-#>                                             CRAN                        
-#> "https://cran.microsoft.com/snapshot/2020-05-30"                        
-
-}} - - -\if{html}{\out{
}}\preformatted{repo_resolve("RSPM@dplyr-1.0.0") +\if{html}{\out{
}}\preformatted{repo_resolve("PPM@dplyr-1.0.0") }\if{html}{\out{
}}\if{html}{\out{
 #>                                       CRAN                              
@@ -137,16 +130,7 @@ repo_get()
 }}
 
 
-\if{html}{\out{
}}\preformatted{repo_resolve("MRAN@R-4.0.0") -}\if{html}{\out{
}}\if{html}{\out{ -
-#>                                             CRAN                        
-#> "https://cran.microsoft.com/snapshot/2020-04-25"                        
-
-}} - - -\if{html}{\out{
}}\preformatted{repo_resolve("RSPM@R-4.0.0") +\if{html}{\out{
}}\preformatted{repo_resolve("PPM@R-4.0.0") }\if{html}{\out{
}}\if{html}{\out{
 #>                                       CRAN                              
diff --git a/man/repo_status.Rd b/man/repo_status.Rd
index 4a48f62c7..8c512d3eb 100644
--- a/man/repo_status.Rd
+++ b/man/repo_status.Rd
@@ -38,7 +38,7 @@ queried platform and R version. It has these columns:
 \itemize{
 \item \code{name}: the name of the repository. This comes from the names
 of the configured repositories in \code{options("repos")}, or
-added by pkgcache. It is typically \code{CRAN} for CRAN, and the
+added by pak. It is typically \code{CRAN} for CRAN, and the
 current Bioconductor repositories are \code{BioCsoft}, \code{BioCann},
 \code{BioCexp}, \code{BioCworkflows}.
 \item \code{url}: base URL of the repository.