Title: | R utilities related to Bioconductor release tasks |
---|---|
Description: | The package faciliates a Bioconductor release. It currently updates existing Bioconductor repositories on GitHub after a release. The script creates the RELEASE_XX_YY branch and pushes it to the Bioconductor organization. |
Authors: | Marcel Ramos [aut, cre] , Lori Shepherd [aut], Hervé Pagès [aut], Nitesh Turaga [ctb] |
Maintainer: | Marcel Ramos <[email protected]> |
License: | Artistic-2.0 |
Version: | 0.99.28 |
Built: | 2024-11-01 17:13:51 UTC |
Source: | https://github.com/Bioconductor/ReleaseLaunch |
The function add_bioc_remote
adds an 'upstream' remote that
points to [email protected]
. If an upstream
remote already
exists, it will be validated against the SSH URL. By design, the
Bioconductor remote location is called the 'upstream' remote. The 'origin'
is set to the GitHub location.
add_bioc_remote(repo = ".") set_bioc_remotes(repo = ".", org = "Bioconductor")
add_bioc_remote(repo = ".") set_bioc_remotes(repo = ".", org = "Bioconductor")
repo |
|
org |
|
The set_bioc_remotes
function will update a repository's remotes
by setting origin
to the GitHub location and upstream
to the Bioconductor
git server. If the origin
remote is not set to the GitHub location, the
function will overwrite the URL. If the upstream
remote is not set, the
function will add it. If the upstream
remote is set, the function will
overwrite the URL with the Bioconductor SSH URL.
Note that the remotes will follow this template:
origin [email protected]:{org}/{package} upstream [email protected]:packages/{package}
add_bioc_remote
: adds an 'upstream' remote with the Bioconductor git
address for a given package.
set_bioc_remotes
: updates the remotes for a given package, setting the
'origin' remote to the GitHub location and the 'upstream' remote to the
Bioconductor git server.
This function assumes that you have admin push access to the
GitHub organization indicated by org
.
add_gh_release_branch( package_name, release = bioc_release_yaml(), gh_branch = .BIOC_DEFAULT_BRANCH, bioc_branch = .BIOC_DEFAULT_BRANCH, org = "Bioconductor" ) add_gh_release_branches( packages = character(0L), release = bioc_release_yaml(), bioc_branch = .BIOC_DEFAULT_BRANCH, org = "Bioconductor" ) bioc_version_yaml(config = .BIOC_CONFIG_FILE) bioc_release_yaml(config = .BIOC_CONFIG_FILE)
add_gh_release_branch( package_name, release = bioc_release_yaml(), gh_branch = .BIOC_DEFAULT_BRANCH, bioc_branch = .BIOC_DEFAULT_BRANCH, org = "Bioconductor" ) add_gh_release_branches( packages = character(0L), release = bioc_release_yaml(), bioc_branch = .BIOC_DEFAULT_BRANCH, org = "Bioconductor" ) bioc_version_yaml(config = .BIOC_CONFIG_FILE) bioc_release_yaml(config = .BIOC_CONFIG_FILE)
package_name |
|
release |
|
gh_branch |
|
bioc_branch |
|
org |
|
packages |
|
config |
|
packages_without_release_branch
if (interactive()) { bioc_release_yaml() add_gh_release_branch( package_name = "BiocParallel", release = "RELEASE_3_19" ) add_gh_release_branches( release = bioc_release_yaml(), org = "Bioconductor" ) }
if (interactive()) { bioc_release_yaml() add_gh_release_branch( package_name = "BiocParallel", release = "RELEASE_3_19" ) add_gh_release_branches( release = bioc_release_yaml(), org = "Bioconductor" ) }
Extracts NEWS files from source tarballs of packages.
extractNEWS( reposRoot, srcContrib, destDir = file.path(reposRoot, "news"), unpackDir = tempdir() )
extractNEWS( reposRoot, srcContrib, destDir = file.path(reposRoot, "news"), unpackDir = tempdir() )
reposRoot |
Top level path for CRAN-style repos |
srcContrib |
Location of source packages |
destDir |
|
unpackDir |
|
To ensure that a GitHub repository is a software package, its name is
checked against a list of Bioconductor packages. This list is called
the manifest. This function obtains the manifest using git
.
get_bioc_software_manifest()
get_bioc_software_manifest()
get_user_github_repos
and get_org_github_repos
use the
GitHub API, to obtain the repositories hosted on GitHub via the 'username' or
the organization ('org') names, respectively.
get_org_github_repos( per_page = 100, pages = 10, org = "Bioconductor", archived = FALSE ) get_user_github_repos(per_page = 100, pages = 10, username, archived = FALSE)
get_org_github_repos( per_page = 100, pages = 10, org = "Bioconductor", archived = FALSE ) get_user_github_repos(per_page = 100, pages = 10, username, archived = FALSE)
per_page |
Number of items to return per page. If omitted,
will be substituted by |
pages |
|
org |
|
archived |
|
username |
|
A vector of default branches whose names correspond to the organization or user GitHub repositories
if (interactive()) { get_user_github_repos(username = "github-username") }
if (interactive()) { get_user_github_repos(username = "github-username") }
The function uses previous and current versions of Bioconductor to generate
a single package's NEWS
file.
getPackagesNEWS( prevRepos = "3.15", currRepos = "3.16", repo = c("bioc", "data/experiment", "workflows"), srcdir = NULL ) printNEWS( dbs, destfile, overwrite = FALSE, width = 68, output = c("md", "text"), relativeLink = FALSE, ... )
getPackagesNEWS( prevRepos = "3.15", currRepos = "3.16", repo = c("bioc", "data/experiment", "workflows"), srcdir = NULL ) printNEWS( dbs, destfile, overwrite = FALSE, width = 68, output = c("md", "text"), relativeLink = FALSE, ... )
prevRepos |
|
currRepos |
|
repo |
|
srcdir |
(Optional) |
dbs |
|
destfile |
|
overwrite |
|
width |
|
output |
|
relativeLink |
|
... |
additional arguments, unused. |
A list of NEWS
These functions obtain all the repositories from the designated organization
and filters them to only valid R packages and repositories that do not have a
RELEASE_X_Y
branch or that do, depending on the function called.
packages_without_release_branch( version = bioc_version_yaml(), release = bioc_release_yaml(), org = "Bioconductor", type = c("BioCsoft", "BioCexp") ) packages_with_release_branch( version = bioc_version_yaml(), release = bioc_release_yaml(), org = "Bioconductor", type = c("BioCsoft", "BioCexp") )
packages_without_release_branch( version = bioc_version_yaml(), release = bioc_release_yaml(), org = "Bioconductor", type = c("BioCsoft", "BioCexp") ) packages_with_release_branch( version = bioc_version_yaml(), release = bioc_release_yaml(), org = "Bioconductor", type = c("BioCsoft", "BioCexp") )
version |
|
release |
|
org |
|
type |
|
A named scalar string of the default branch whose name corresponds to a Bioconductor GitHub repository
if (interactive()) { packages_without_release_branch(version = "3.19") }
if (interactive()) { packages_without_release_branch(version = "3.19") }
These functions should be used after a Bioconductor Release. They ensure that
the local repositories are in sync with Bioconductor. For convenience, the
singular update_local_repo
function will update a single local repository
on the user's system. The function checks repositories against the
available.packages()
in the Bioconductor owned
BiocManager::repositories()
.
update_local_repos( repos_dir, release = bioc_release_yaml(), username, org = username, set_upstream = "origin/devel", restart_from = character(0L), BPPARAM = NULL ) update_local_repo( repo_dir, release, set_upstream = "origin/devel", org = "Bioconductor" )
update_local_repos( repos_dir, release = bioc_release_yaml(), username, org = username, set_upstream = "origin/devel", restart_from = character(0L), BPPARAM = NULL ) update_local_repo( repo_dir, release, set_upstream = "origin/devel", org = "Bioconductor" )
repos_dir |
|
release |
|
username |
|
org |
|
set_upstream |
|
restart_from |
|
BPPARAM |
|
repo_dir |
|
packages |
|
The update_local_repos
function will update all local repositories
in the repos_dir
directory that are found in either the users or
organization's GitHub repository. The function syncs the devel
and
current release branches from both the origin
(GH) and upstream
(Bioconductor) remotes. If a upstream
remote is not set, the function
will set it to the Bioconductor git server. Finally, the function sets
origin/devel
as the remote branch to track with the set_upstream
argument.
if (interactive()) { ## add PAT credentials gitcreds::gitcreds_set() ## update multiple packages at a time update_local_repos( repos_dir = "~/bioc/", org = "Bioconductor", release = "RELEASE_3_20" ) ## update a single package update_local_repo( "~/bioc/AnnotationHub", release = bioc_release_yaml(), org = "Bioconductor" ) setwd("~/bioc/AnnotationHub") update_local_repo( ".", release = bioc_release_yaml(), org = "Bioconductor" ) }
if (interactive()) { ## add PAT credentials gitcreds::gitcreds_set() ## update multiple packages at a time update_local_repos( repos_dir = "~/bioc/", org = "Bioconductor", release = "RELEASE_3_20" ) ## update a single package update_local_repo( "~/bioc/AnnotationHub", release = bioc_release_yaml(), org = "Bioconductor" ) setwd("~/bioc/AnnotationHub") update_local_repo( ".", release = bioc_release_yaml(), org = "Bioconductor" ) }