Skip to content

Commit

Permalink
Merge pull request #84 from alexzwanenburg/dev1.4.8
Browse files Browse the repository at this point in the history
Address nosuggests
  • Loading branch information
alexzwanenburg authored May 24, 2024
2 parents 4d3a8b7 + f025bee commit 3feebd8
Show file tree
Hide file tree
Showing 147 changed files with 23,273 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/cran-release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ assignees: ''
- [ ] update NEWS.md
- [ ] code check: run `devtools::check(args=c("--no-examples", "--no-tests"), vignettes=FALSE)`, alternatively `rcmdcheck::rcmdcheck(args=c("--no-examples", "--no-tests"))`
- [ ] test check: run `devtools::test()`: set `options("testthat.progress.max_fails"=Inf)` and `options("Ncpus"=10)`
- [ ] create archives for testing backward compatibility against future versions: run tests/old_experiments/archiveExperiments.R
- [ ] create archives for testing backward compatibility against future versions: run `tests/old_experiments/archiveExperiments.R`
- [ ] test backward compatibility against archived experiments: manually run `tests/testthat/test-update_object.R`
- [ ] pre-compile vignettes: run `vignettes/compile.R`
- [ ] code and vignette check: `rcmdcheck::rcmdcheck(args=c("--no-examples", "--as-cran"))`
- [ ] check reverse dependencies
- [ ] create pull request
- [ ] check continuous integration tests
- [ ] Build source tarball using `devtools::build()`.
- [ ] Run `devtools::check_built(path=pkg, env_vars = list("_R_CHECK_DEPENDS_ONLY_" = TRUE))`, with pkg the path to the tarball.
- [ ] update cran_comments.md
- [ ] merge dev branch into master

Expand All @@ -28,14 +30,14 @@ assignees: ''
- [ ] Run a post-merge code check: `rcmdcheck::rcmdcheck(args=c("--no-examples", "--as-cran"))`
- [ ] Run post-merge test suite, if required.
- [ ] Pre-compile vignettes, if required.
- [ ] Rebuild source tarball using `devtools::build()`, if required.

**CRAN**
- [ ] Build source tarball using `devtools::build()`.
- [ ] Check CRAN-policies on https://cran.r-project.org/web/packages/policies.html
- [ ] Upload source tarball to https://cran.r-project.org/submit.html
- [ ] Check CRAN checks

**Github release**
- [ ] prepare a GithHub release
- [ ] create source tarball using devtools::build and add as binary.
- [ ] copy news from NEWS.md
- [ ] add source tarball as data
15 changes: 13 additions & 2 deletions .github/workflows/auto-test-no-suggests-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
r-version: ["release"]
os: [ ubuntu-latest ]
os: [ windows-latest ]

steps:
- uses: actions/checkout@v4
Expand All @@ -38,8 +38,19 @@ jobs:
any::testthat
needs: check

- name: Identify and remove all non-critical packages
run: |
installed_packages <- data.table::data.table(utils::installed.packages())
required_packages <- c("familiar", "rcmdcheck", "testthat")
required_packages <- union(required_packages, unlist(tools::package_dependencies(required_packages, recursive = TRUE), use.names=FALSE))
required_packages <- union(required_packages, installed_packages[Priority == "base"]$Package)
non_critical_packages <- setdiff(installed_packages$Package, required_packages)
for (package in non_critical_packages) {utils::remove.packages(installed_packages[Package == package]$Package, installed_packages[Package == package]$LibPath)}
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
args: 'c("--no-manual", "--as-cran")'
args: 'c("--no-manual", "--as-cran", "--no-vignettes", "--no-build-vignettes")'
build_args: 'c("--no-build-vignettes", "--no-manual")'
error-on: '"error"'
3 changes: 2 additions & 1 deletion .github/workflows/auto-test-package_pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
args: 'c("--no-manual", "--as-cran")'
args: 'c("--no-manual", "--as-cran", "--no-vignettes", "--no-build-vignettes")'
build_args: 'c("--no-build-vignettes", "--no-manual")'
error-on: '"error"'
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
doc
Meta
tests/testthat/Rplots.pdf
inst/doc
/doc/
/Meta/
/man/
*.Rd
tests/old_experiments/_experiment
Rplots.pdf
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- Adapted tests to work when packages are missing.

- Fixed an issue that prevented hyperparameter optimisation of `xgboost` models for survival tasks.

# Version 1.4.7 (Uncertain Unicorn)

## Bug fixes
Expand Down
4 changes: 1 addition & 3 deletions R/LearnerS4XGBoost.R
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,7 @@ setMethod("get_prediction_type", signature(object="familiarXGBoost"),

# The prediction type is a bit more complicated for xgboost methods.
if(type == "default"){
if(as.character(object@hyperparameters$learn_objective %in% c("cox"))){
return("hazard_ratio")
}
return("hazard_ratio")

} else if(type == "survival_probability"){
return("survival_probability")
Expand Down
2 changes: 1 addition & 1 deletion R/TestDataCreators.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ test_data_package_installed <- function(outcome_type) {
"count" = "MASS"
)

if (!is_package_installed(data_packages[[outcome_type]])) run_test <- FALSE
if (!rlang::is_installed(data_packages[[outcome_type]])) run_test <- FALSE

if (!run_test) {
rlang::inform(
Expand Down
43 changes: 43 additions & 0 deletions man/aggregate_vimp_table-methods.Rd

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

217 changes: 217 additions & 0 deletions man/as_data_object-methods.Rd

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

Loading

0 comments on commit 3feebd8

Please sign in to comment.