Skip to content

Commit

Permalink
Merge branch 'neurogenomics:master' into hotfix_quarto
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 authored Nov 6, 2024
2 parents e2b46a4 + 1908435 commit 3843ea8
Show file tree
Hide file tree
Showing 22 changed files with 414 additions and 152 deletions.
98 changes: 49 additions & 49 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,52 +1,3 @@
jsn <- jsonlite::read_json(path)
names(jsn)
testthat::expect_true(
all(c("image","features","customizations") %in% names(jsn))
)
devtools::check_man()
file.edit("Rprofile")
file.edit(".Rprofile")
BiocManager::repositories()
devtools::check_man()
library(rworkflows)
deparse(BiocManager::repositories())
cat(deparse(BiocManager::repositories()))
cont4 <- construct_cont(default_tag = "release",
default_registry = "ghcr.io",
run_check_cont = TRUE)
cont4 <- construct_cont(default_tag = "release",
default_registry = NULL,
run_check_cont = TRUE)
is.null(c("a","b"))
library(rworkflows)
cont4 <- construct_cont(default_tag = "release",
default_registry = NULL,
run_check_cont = TRUE)
devoptera::args2vars(construct_cont)
default_registry
default_registry=NULL
default_registry <- check_registry(registry = default_registry)
#### Remove any trailing : (e.g. when default_tag=NULL) ####
cont <- lapply(cont, function(x){
if(is.null(x)) NULL else trimws(x,whitespace = ":")
})
#### Run QC ####
cont2 <- lapply(cont,function(co){
if(is.null(co)){
return(NULL)
} else if(!grepl("/",co) &&
!is.null(default_cont)){
messager("Only tag name supplied to 'cont'.",
"Assuming default=",shQuote(default_cont),v=verbose)
co <- paste(default_cont,co,sep=":")
} else if(!grepl(":",co) |
!grepl(default_cont,co)) {
return(co)
}
splt <- strsplit(co,":")[[1]]
bioc_version <- rev(splt)[1]
if(isTRUE(versions_explicit)){
if(grepl(":",co)){
info <- bioc_r_versions(bioc_version = bioc_version)
return(
paste0(splt[[1]],":RELEASE_",gsub("[.]","_",info$bioc))
Expand Down Expand Up @@ -510,3 +461,52 @@ library(rworkflows)
?testthat::skip_on_cran()
testthat::skip_if_offline()
readLines("https://hub.docker.com/v2/repositories//bioconductor/bioconductor_docker/tags?page_size=1000")
devtools::check_man()
devtools::install_dev_deps()
devtools::install_dev_deps()
gh::gh_token()
file.edit("~/.Renviron")
credentials::set_github_pat()
gh::gh_token()
devtools::install_dev_deps()
credentials::set_github_pat()
devtools::install_dev_deps()
devtools::build()
devtools::check_man()
version
version
install.packages("devtools")
install.packages("BiocManager")
install.packages("devtools")
devtools::install_dev_deps()
devtools::check_man()
install.packages("roxygen2")
devtools::check_man()
devtools::install_dev_deps()
packageVersion("roxygen2")
version
version
version()
version()
version
rworkflows::use_workflow()
rworkflows::use_workflow(force_new = T)
gh::gh_token()
credentials::set_github_pat()
a1 <- construct_authors()
library()
library(rworkflows)
a1 <- construct_authors()
testthat::expect_equal(as.character(a1), "yourGivenName yourFamilyName <[email protected]> [cre] (yourOrcidId)")
a2 <- construct_authors(authors = "Test 1, Test1")
testthat::expect_equal(as.character(a2), "Test 1, Test1")
testthat::expect_equal(as.character(a1), "yourGivenName yourFamilyName <[email protected]> [cre] (yourOrcidId)")
testthat::expect_true(as.character(a1) %in%
c("yourGivenName yourFamilyName <[email protected]> [cre] (ORCID: yourOrcidId)",
"yourGivenName yourFamilyName <[email protected]> [cre] (yourOrcidId)"))
installed.packages()
names(installed.packages())
rownames(installed.packages())
"reticulate" %in% rownames(installed.packages())
credentials::set_github_pat()
remotes::install_github("r-lib/remotes")
6 changes: 0 additions & 6 deletions .Rprofile

This file was deleted.

52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

104 changes: 104 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: 🐛 Bug Report
description: File a bug report
labels: [bug, no-bot]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this issue! :hugs:
However note the following before opening an issue:
:warning: **IF YOU DON'T FILL IN THE TEMPLATE, YOUR ISSUE IS LIABLE TO BE CLOSED.** :warning:
- type: checkboxes
id: checklist
attributes:
label: "Checklist"
options:
- label: "I am able to reproduce the bug with the latest version"
required: true
- label: "I checked, but didn't find any duplicates (open OR closed) of this issue in the repo"
required: true

- type: input
id: version
attributes:
label: Affected version
description: "What version are you currently using?"
placeholder: "x.y.z (check with the `packageVersion()` R function)"
validations:
required: true

- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce the bug
description: |
Please add **ALL** the code necessary to reproduce the bug here (step-by-step).
By 'reproduce', we mean that someone else can copy and paste the exact same code into their R console, execute it, and get the exact same output as you.
This means you need to define all variables *within* the example, including data.
You can upload a small sample of your data by dragging-and-dropping it into this Issue.
Alternatively, you can include code to create some dummy data that reproduces the error.
If that's not possible, please at least include a screenshot of your data and other relevant details.
See [here](https://www.r-bloggers.com/2020/10/how-to-make-a-reprex/) for an intro to making a reproducible example (i.e. reprex) and why they're important!
placeholder: |
# For example:
df <- data.frame(list(a=rep(2,3), b=rep(1,3)))
df["bTYPO"]
validations:
required: true

- type: textarea
id: actual-behavior
attributes:
label: Actual behavior
description: |
Copy and paste the R console output.
placeholder: |
# For example:
Error in `[.data.frame`(df, "bTYPO") : undefined columns selected
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: |
Tell us what you expect to happen.
placeholder: |
The values of the data.frame column are printed.
validations:
required: true

- type: textarea
id: session-info
validations:
required: true
attributes:
label: Session info
description: |
Copy and paste the output of the `sessionInfo() R function.
placeholder: |
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS 15.0
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
...
...
...
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ⭐ Feature Request
description: Submit a feature request
labels: [enhancement, no-bot]
body:
- type: markdown
attributes:
value: |
Thanks for submitting a feature request!
- type: textarea
id: the-feature-request
attributes:
label: The feature request
description:
Write a clear and concise description of what the feature or problem is.
placeholder: |
I think it could be improved by adding [...]
validations:
required: true

- type: textarea
id: proposed-solution
attributes:
label: Proposed solution
description: Share how this will benefit its users.
placeholder: |
- One idea would be to add an [...], similar to how this package did [LINK].
- An alternative solution might be [...]
validations:
required: true

- type: textarea
id: additional-context
attributes:
label: Additional context
description:
Please include any other context, like screenshots or mockups, if
applicable.
placeholder: |
Our lab studies [...] and thought it would be cool to try [...]
2 changes: 1 addition & 1 deletion .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- os: ubuntu-latest
r: auto
bioc: release
cont: ghcr.io/bioconductor/bioconductor_docker:RELEASE_3_18
cont: ghcr.io/bioconductor/bioconductor_docker:RELEASE_3_19
python-version: 3.11
- os: macOS-latest
r: latest
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rworkflows
Type: Package
Title: Test, Document, Containerise, and Deploy R Packages
Version: 1.0.1
Version: 1.0.3
Authors@R:
c(person(given = "Brian",
family = "Schilder",
Expand Down Expand Up @@ -64,4 +64,4 @@ VignetteBuilder: knitr
License: GPL-3
Config/testthat/edition: 3
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
24 changes: 24 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# rworkflows 1.0.3

## New features

* New arg `run_telemetry` allows users to disable workflow telemetry.

## Bug fixes

* Add `GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}` to all code check steps.

# rworkflows 1.0.2

## New features

* Update to R 4.4.1 and ensure everything still works.
* Update *rworkflows.yml* to use new Bioc release, 3.19

## Bug fixes

* Get back up on CRAN after deprecation occurred while I was away.
* Remove .*Rprofile* (didn't seem to help CRAN and was getting outdated)
* *test-construct_conda_yml.R*: Add conditional to only run certain steps
if `reticulate` is installed (for `noSuggests` tests in CRAN).

# rworkflows 1.0.1

## New features
Expand Down
5 changes: 3 additions & 2 deletions R/use_issue_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
#' @importFrom here here
#' @examples
#' path <- use_issue_template(save_dir=tempdir())
use_issue_template <- function(templates=c("bug_report.md",
"feature_request.md"),
use_issue_template <- function(templates=c("bug_report.yml",
"feature_request.yml",
"config.yml"),
save_dir=here::here(".github",
"ISSUE_TEMPLATE"),
path=file.path(save_dir,templates),
Expand Down
Loading

0 comments on commit 3843ea8

Please sign in to comment.