Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/R-CMD-check-all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check-all.yaml

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
COMPILE_VIG: ${{ secrets.COMPILE_VIG }}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
8 changes: 0 additions & 8 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
- cron: "15 15 * * *"

Expand All @@ -23,10 +19,6 @@ jobs:
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion R/cansim.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ normalize_cansim_values <- function(data, replacement_value="val_norm", normaliz
# divide numbers that are percentages by 100 and convert the unit field to "rate"
data <- data %>%
mutate(!!as.name(replacement_value_string):=ifelse(grepl(percentage_string,!!as.name(uom_string)),!!as.name(replacement_value_string)/100,!!as.name(replacement_value_string))) %>%
mutate(!!as.name(uom_string):=ifelse(!!as.name(uom_string)==percentage_string,"Rate",!!as.name(uom_string)))
mutate(!!as.name(uom_string):=ifelse(grepl(percentage_string,!!as.name(uom_string)),"Rate",!!as.name(uom_string)))
}


Expand Down
5 changes: 4 additions & 1 deletion R/cansim_parquet.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,12 @@ get_cansim_connection <- function(cansimTableNumber,
# legacy support for old column files
if (length(column_files)>0) {
meta2 <- readRDS(file.path(meta_dir_name,meta_files[grepl("\\.Rda2$",meta_files)]))
# Use column names instead of hardcoded indices
dimension_id_col <- names(meta2)[1] # "Dimension ID" or French equivalent
dimension_name_col <- names(meta2)[2] # "Dimension name" or French equivalent
for (f in column_files) {
nn <- gsub(".+_column_","",f)
id <- meta2[meta2[,2]==nn,1] %>% as.character()
id <- meta2[meta2[[dimension_name_col]]==nn, dimension_id_col] %>% as.character()
if (length(id)==1) {
new_name <- f %>% gsub("_column_.+$",paste0("_column_",id),x=.)
file.rename(file.path(meta_dir_name,f),file.path(meta_dir_name,new_name))
Expand Down
Loading