Skip to content

Commit

Permalink
Github -> GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
b-rodrigues committed Jan 8, 2025
1 parent da50a42 commit c3df6a9
Show file tree
Hide file tree
Showing 23 changed files with 78 additions and 78 deletions.
10 changes: 5 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# rix 0.14.0 (2024-12-31)

- This is a major release of `{rix}`:
* We have forked the Nixpkgs Github repository to include more R packages in
* We have forked the Nixpkgs GitHub repository to include more R packages in
Nix, and have backported many fixes, which should improve the user experience
on Apple Silicon devices.
* We also set up a binary cache on Cachix (many thanks to Cachix for
Expand Down Expand Up @@ -52,7 +52,7 @@
# rix 0.13.2 (2024-11-20)

- `renv2nix()`: switch from RemoteType to RemoteHost in `renv.lock` files to
detect packages to be added from Github or Gitlab
detect packages to be added from GitHub or Gitlab

# rix 0.13.1 (2024-11-19)

Expand Down Expand Up @@ -196,7 +196,7 @@

## Chores

- Github Actions: we now use rhub2 for checking the package
- GitHub Actions: we now use rhub2 for checking the package
- `rix::rix()` docs: explain `options(rix.sri_hash)`.
- Source code now follows tidyverse style guide thanks to `{styler}`
- Readme: added section explain comparing {rix} and Nix to other package
Expand Down Expand Up @@ -262,7 +262,7 @@
- update with `glibcLocales` patch
-`with_nix()` needs patch for R <= 4.2.0; `glibcLocalesUtf8` -> `gibcLocales`
- Implement `with_nix()` to valuate function in R or shell command via `nix-shell` environment
- Added `tar_nix_ga()`, a function to run targets pipelines on Github Actions using a Nix expression
- Added `tar_nix_ga()`, a function to run targets pipelines on GitHub Actions using a Nix expression


# rix 0.6.0 (2024-02-02)
Expand Down Expand Up @@ -373,7 +373,7 @@
a specific nix-R session. This feature is useful to test dependencies and
specific setups of software in controlled environments.

- Added `tar_nix_ga()`, a function to run targets pipelines on Github Actions
- Added `tar_nix_ga()`, a function to run targets pipelines on GitHub Actions
using a Nix expression.


Expand Down
6 changes: 3 additions & 3 deletions R/fetchers.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' package, "repo_url", the repository's url, "commit", the commit hash of
#' interest.
#' @return A character. The Nix definition to download and build the R package
#' from Github.
#' from GitHub.
#' @noRd
fetchgit <- function(git_pkg) {
package_name <- git_pkg$package_name
Expand Down Expand Up @@ -341,7 +341,7 @@ fetchlocals <- function(local_r_pkgs) {
#' package, "repo_url", the repository's url and "commit", the commit hash of
#' interest. This argument can also be a list of lists of these three elements.
#' @return A character. The Nix definition to download and build the R package
#' from Github.
#' from GitHub.
#' @noRd
fetchgits <- function(git_pkgs) {
if (!all(vapply(git_pkgs, is.list, logical(1)))) {
Expand Down Expand Up @@ -385,7 +385,7 @@ fetchzips <- function(archive_pkgs) {
}
}

#' fetchpkgs Downloads and installs packages from CRAN archives or Github
#' fetchpkgs Downloads and installs packages from CRAN archives or GitHub
#' @param git_pkgs List of Git packages with name, url and commit
#' @param archive_pkgs Vector of CRAN archive package names
#' @return Nix definition string for building the packages
Expand Down
6 changes: 3 additions & 3 deletions R/ga_cachix.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' ga_cachix Build an environment on Github Actions and cache it on Cachix
#' ga_cachix Build an environment on GitHub Actions and cache it on Cachix
#' @details This function puts a `.yaml` file inside the `.github/workflows/`
#' folders on the root of your project. This workflow file will use the
#' projects `default.nix` file to generate the development environment on
#' Github Actions and will then cache the created binaries in Cachix. Create a
#' GitHub Actions and will then cache the created binaries in Cachix. Create a
#' free account on Cachix to use this action. Refer to
#' `vignette("z-binary_cache")` for detailed instructions. Make sure to give
#' read and write permissions to the Github Actions bot.
#' read and write permissions to the GitHub Actions bot.
#' @param cache_name String, name of your cache.
#' @param path_default String, relative path (from the root directory of your project)
#' to the `default.nix` to build.
Expand Down
24 changes: 12 additions & 12 deletions R/nix_hash.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @param repo_url URL to Git repository
#' @param commit Commit hash (SHA-1)
#' @return list with following elements:
#' - `sri_hash`: string with SRI hash of the NAR serialization of a Github repo
#' - `sri_hash`: string with SRI hash of the NAR serialization of a GitHub repo
#' at a given deterministic git commit ID (SHA-1)
#' - `deps`: list with three elements: 'package', its 'imports' and its 'remotes'
#' @noRd
Expand All @@ -14,8 +14,8 @@ nix_hash <- function(repo_url, commit) {
hash_cran(repo_url = repo_url)
} else {
stop(
"repo_url argument is wrong. Please provide an url to a Github repo",
"to install a package from Github, or to the CRAN Archive to install a",
"repo_url argument is wrong. Please provide an url to a GitHub repo",
"to install a package from GitHub, or to the CRAN Archive to install a",
"package from the CRAN archive."
)
}
Expand All @@ -25,7 +25,7 @@ nix_hash <- function(repo_url, commit) {
#' Return the SRI hash of an URL with .tar.gz
#' @param url String with URL ending with `.tar.gz`
#' @return list with following elements:
#' - `sri_hash`: string with SRI hash of the NAR serialization of a Github repo
#' - `sri_hash`: string with SRI hash of the NAR serialization of a GitHub repo
#' at a given deterministic git commit ID (SHA-1)
#' - `deps`: list with three elements: 'package', its 'imports' and its 'remotes'
#' @noRd
Expand Down Expand Up @@ -66,7 +66,7 @@ hash_url <- function(url) {
# extra diagnostics
extra_diagnostics <-
c(
"\nIf it's a Github repo, check the url and commit.\n",
"\nIf it's a GitHub repo, check the url and commit.\n",
"Are these correct? If it's an archived CRAN package, check the name\n",
"of the package and the version number."
)
Expand Down Expand Up @@ -193,7 +193,7 @@ hash_cran <- function(repo_url) {
#' @param repo_url URL to GitHub repository
#' @param commit Commit hash
#' @return list with following elements:
#' - `sri_hash`: string with SRI hash of the NAR serialization of a Github repo
#' - `sri_hash`: string with SRI hash of the NAR serialization of a GitHub repo
#' at a given deterministic git commit ID (SHA-1)
#' - `deps`: list with three elements: 'package', its 'imports' and its 'remotes'
#' @noRd
Expand All @@ -218,14 +218,14 @@ hash_git <- function(repo_url, commit) {
}


#' Get the SRI hash of the NAR serialization of a Github repo, if nix is not
#' Get the SRI hash of the NAR serialization of a GitHub repo, if nix is not
#' available locally
#' @param repo_url A character. The URL to the package's Github repository or to
#' @param repo_url A character. The URL to the package's GitHub repository or to
#' the `.tar.gz` package hosted on CRAN.
#' @param commit A character. The commit hash of interest, for reproducibility's
#' sake, NULL for archived CRAN packages.
#' @return list with following elements:
#' - `sri_hash`: string with SRI hash of the NAR serialization of a Github repo
#' - `sri_hash`: string with SRI hash of the NAR serialization of a GitHub repo
#' - `deps`: list with three elements: 'package', its 'imports' and its 'remotes'
#' @noRd
nix_hash_online <- function(repo_url, commit) {
Expand All @@ -240,7 +240,7 @@ nix_hash_online <- function(repo_url, commit) {
# extra diagnostics
extra_diagnostics <-
c(
"\nIf it's a Github repo, check the url and commit.\n",
"\nIf it's a GitHub repo, check the url and commit.\n",
"Are these correct? If it's an archived CRAN package, check the name\n",
"of the package and the version number."
)
Expand All @@ -262,12 +262,12 @@ nix_hash_online <- function(repo_url, commit) {
#' Return the sri hash of a path using `nix-hash --type sha256 --sri <path>`
#' with local Nix, or using an online API service (equivalent
#' `nix hash path --sri <path>`) if Nix is not available
#' @param repo_url A character. The URL to the package's Github repository or to
#' @param repo_url A character. The URL to the package's GitHub repository or to
#' the `.tar.gz` package hosted on CRAN.
#' @param commit A character. The commit hash of interest, for reproducibility's
#' sake, NULL for archived CRAN packages.
#' @return list with following elements:
#' - `sri_hash`: string with SRI hash of the NAR serialization of a Github repo
#' - `sri_hash`: string with SRI hash of the NAR serialization of a GitHub repo
#' at a given deterministic git commit ID (SHA-1)
#' - `deps`: list with three elements: 'package', its 'imports' and its 'remotes'
#' @noRd
Expand Down
4 changes: 2 additions & 2 deletions R/renv_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ renv_remote_pkgs <- function(
#' version and a list of all the packages in an renv.lock file and adds them
#' to the `r_pkgs` argument of `rix()`. This will use a snapshot of `nixpkgs`
#' that should contain package versions that are not too different from the
#' ones defined in the `renv.lock` file. For packages installed from Github or
#' ones defined in the `renv.lock` file. For packages installed from GitHub or
#' similar, an attempt is made to handle them and pass them to the `git_pkgs`
#' argument of `rix()`. Currently defaults to "fast", "accurate" is not yet
#' implemented.
Expand All @@ -140,7 +140,7 @@ renv_remote_pkgs <- function(
#' Nix project, and copy the `renv.lock` file only (not any of the other files
#' and folders generated by `{renv}`) and then call `renv2nix()` there. If
#' your project includes package with remote dependencies (for example, a
#' BioConductur package with a dependency on Github), `renv2nix()` will not
#' BioConductur package with a dependency on GitHub), `renv2nix()` will not
#' generate a valid `default.nix` file. The description of the issue and a
#' solution is given in the
#' `vignette("z-advanced-topic-handling-packages-with-remote-dependencies")`.
Expand Down
6 changes: 3 additions & 3 deletions R/rix.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#' argument to `"other"`. We recommend reading the
#' `vignette("e-interactive-use")` for more details.
#'
#' Packages to install from Github or Gitlab must be provided in a list of 3
#' Packages to install from GitHub or Gitlab must be provided in a list of 3
#' elements: "package_name", "repo_url" and "commit". To install several
#' packages, provide a list of lists of these 3 elements, one per package to
#' install. It is also possible to install old versions of packages by
Expand All @@ -96,7 +96,7 @@
#' the Nix revision closest to that date, by setting `r_ver = "3.1.0"`, which
#' was the version of R current at the time. This ensures that Nix builds a
#' completely coherent environment. For security purposes, users that wish to
#' install packages from Github/Gitlab or from the CRAN archives must provide
#' install packages from GitHub/Gitlab or from the CRAN archives must provide
#' a security hash for each package. `{rix}` automatically precomputes this
#' hash for the source directory of R packages from GitHub/Gitlab or from the
#' CRAN archives, to make sure the expected trusted sources that match the
Expand All @@ -112,7 +112,7 @@
#' Note that installing packages from Git or old versions using the `"@"`
#' notation or local packages, does not leverage Nix's capabilities for
#' dependency solving. As such, you might have trouble installing these
#' packages. If that is the case, open an issue on `{rix}`'s Github
#' packages. If that is the case, open an issue on `{rix}`'s GitHub
#' repository.
#'
#' By default, the Nix shell will be configured with `"en_US.UTF-8"` for the
Expand Down
8 changes: 4 additions & 4 deletions R/rix_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ generate_system_pkgs <- function(system_pkgs, r_pkgs) {

#' generate_git_archived_pkgs Internal function that generates the string
#' containing the correct Nix expression to get system packages.
#' @param git_pkgs Character, list of R packages to install from Github.
#' @param git_pkgs Character, list of R packages to install from GitHub.
#' @param archive_pkgs Character, list of R packages to install from the CRAN
#' archives.
#' @param flag_git_archive Character, are there R packages from Github at all?
#' @param flag_git_archive Character, are there R packages from GitHub at all?
#' @noRd
generate_git_archived_pkgs <- function(git_pkgs,
archive_pkgs,
Expand Down Expand Up @@ -294,7 +294,7 @@ generate_locale_variables <- function() {
#' other editors, use "other". This has been tested with RStudio, VS Code and
#' Emacs. If other editors don't work, please open an issue.
#' @param attrib Character, set the correct wrapper for the Nix expression.
#' @param flag_git_archive Character, are there R packages from Github at all?
#' @param flag_git_archive Character, are there R packages from GitHub at all?
#' @param flag_rpkgs Character, are there any R packages at all?
#' @param flag_local_r_pkgs Character, are there any local R packages at all?
#' @noRd
Expand Down Expand Up @@ -325,7 +325,7 @@ generate_wrapped_pkgs <- function(ide,

#' generate_wrapped_pkgs Internal function that generates the string containing
#' the correct Nix expression to get wrapped packages.
#' @param flag_git_archive Character, are there R packages from Github at all?
#' @param flag_git_archive Character, are there R packages from GitHub at all?
#' @param flag_rpkgs Character, are there any R packages at all?
#' @param flag_tex_pkgs Character, are there any LaTex packages at all?
#' @param flag_local_r_pkgs Character, are there any wrapped packages at all?
Expand Down
6 changes: 3 additions & 3 deletions R/tar_nix_ga.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' tar_nix_ga Run a \{targets\} pipeline on Github Actions.
#' tar_nix_ga Run a \{targets\} pipeline on GitHub Actions.
#' @details This function puts a `.yaml` file inside the `.github/workflows/`
#' folders on the root of your project. This workflow file will use the
#' projects `default.nix` file to generate the development environment on
#' Github Actions and will then run the projects \{targets\} pipeline. Make
#' sure to give read and write permissions to the Github Actions bot.
#' GitHub Actions and will then run the projects \{targets\} pipeline. Make
#' sure to give read and write permissions to the GitHub Actions bot.
#' @return Nothing, copies file to a directory.
#' @export
#' @examples
Expand Down
8 changes: 4 additions & 4 deletions man/ga_cachix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/renv2nix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/rix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/tar_nix_ga.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-rix.R
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ testthat::test_that("rix(), frozen-edge", {
})


testthat::test_that("rix(), only one Github package", {
testthat::test_that("rix(), only one GitHub package", {
os_type <- Sys.info()["sysname"]
skip_if(os_type == "Windows")

Expand Down
2 changes: 1 addition & 1 deletion vignettes/a-getting-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ error if you try to use it.
- the R version you need for your project or a snapshot date;
- a list of R packages that your project needs;
- an optional list of additional software (for example a Python interpreter, or Quarto);
- an optional list with packages to install from Github;
- an optional list with packages to install from GitHub;
- an optional list of local packages in `.tar.gz` format to install;
- an optional list of LaTeX packages;
- whether you want to use RStudio as an IDE for your project (or VS Code, or another environment);
Expand Down
Loading

0 comments on commit c3df6a9

Please sign in to comment.