-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add quick_init to start biocbook locally
- Loading branch information
Showing
4 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,7 +74,8 @@ NULL | |
#' `BiocBook`s are local R packages containing an extra `pages` folder to | ||
#' write up online book chapters. | ||
#' | ||
#' 1. A new `BiocBook` should be created using `init(new_package = "...")`. | ||
#' 1. A new `BiocBook` should be created using `init(new_package = "...")` (or | ||
#' alternatively, locally with `quick_init(new_package = "...", user = "...")`). | ||
#' 2. A newly created `BiocBook` can be accessed to in R using `biocbook <- BiocBook(path = "...")`. | ||
#' 3. To edit an existing `BiocBook` object, several helper functions exist: | ||
#' - `add_preamble(biocbook)` | ||
|
@@ -112,6 +113,37 @@ NULL | |
#' | ||
#' The `init(new_package = "...")` function returns a `BiocBook` object. | ||
#' | ||
#' @section Quickly create a local `BiocBook`: | ||
#' | ||
#' Alternatively, a **local** `BiocBook` can be quickly created using the | ||
#' `quick_init(new_package = "...", user = "...")` function. | ||
#' | ||
#' This function only creates a new **local** repository, using the | ||
#' `BiocBook` template from `js2264/BiocBook`. | ||
#' | ||
#' It does **NOT**: | ||
#' | ||
#' - Check that the provided package name is available; | ||
#' - Set up/push the local repository to a **remote** Github repository; | ||
#' - Set up a `gh-pages` to serve rendered books; | ||
#' | ||
#' This implies that functions committing/pushing (`publish()`) | ||
#' or checking remote status (`status()`) do not work properly with a | ||
#' `BiocBook` initiated with `quick_init()`, unless a remote is manually | ||
#' set up. | ||
#' | ||
#' To enable Github support for a local `BiocBook`, one has to manually | ||
#' initiate a `git` repository and add a remote as follows: | ||
#' | ||
#' ```{sh eval = FALSE} | ||
#' git init | ||
#' git symbolic-ref HEAD refs/heads/devel | ||
#' git add . | ||
#' git commit -m 'first commit' | ||
#' git remote add origin [email protected]:<user>/<biocbook>.git | ||
#' git push --set-upstream origin devel | ||
#' ``` | ||
#' | ||
#' @section Editing an existing `BiocBook`: | ||
#' | ||
#' `BiocBook` objects can be modified using the following helper functions: | ||
|
@@ -156,6 +188,7 @@ NULL | |
#' @param new_package Name to use when initiating a new `BiocBook`. | ||
#' This name should be compatible with package naming conventions | ||
#' from R and Bioconductor (i.e. no `_` or `-`, no name starting with a number). | ||
#' @param user Ideally, the Github ID of the main author/organization. | ||
#' @param push Optional. Logical, whether to automatically push commits to | ||
#' remote Github origin. If NA, a prompt will ask whether to push commits or | ||
#' not (default: NA). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.