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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pdf binary
*.png binary
*.xlsx binary
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Summary

Describe the tutorial change and why it is needed.

## Affected content

- [ ] Package overview or setup
- [ ] Module 1: `Stat`
- [ ] Module 2: `Train_Model`
- [ ] Module 3: `Subtyping`
- [ ] Module 4: `PrognosiX`
- [ ] Data, figures, or GitHub workflow

## Validation

- [ ] `quarto inspect` succeeds
- [ ] `quarto render` succeeds, or the reason it was not run is documented
- [ ] Important figures appear below their generating chunks
- [ ] New or changed figures have captions or alternative text
- [ ] No generated HTML, caches, or temporary analysis output is committed
- [ ] Numerical or scientific changes are described below

## Scientific output changes

List any changed results, figures, dependencies, or interpretation. Write “None” when the change affects prose only.
164 changes: 164 additions & 0 deletions .github/workflows/quarto-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
name: Render and deploy the Quarto book

on:
push:
branches: [docs]
pull_request:
branches: [docs]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the book source
uses: actions/checkout@v5

- name: Check out the icare package source
uses: actions/checkout@v5
with:
repository: YuLab-SMU/icare
ref: main
path: .ci/icare

- name: Check out the archived DMwR source
uses: actions/checkout@v5
with:
repository: cran/DMwR
path: .ci/DMwR

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Install icare and its workflow dependencies
shell: Rscript {0}
env:
GITHUB_PAT: ${{ github.token }}
run: |
install.packages(c(
"remotes",
"BiocManager",

# Classification / caret backends
"caret",
"caretEnsemble",
"randomForest",
"glmnet",
"gbm",
"rpart",
"klaR",
"C50",
"ranger",

# icare Suggests available from CRAN
"Boruta",
"DALEX",
"DT",
"Hmisc",
"NMF",
"NbClust",
"RANN",
"ROSE",
"Rtsne",
"UpSetR",
"autoReg",
"bbotk",
"bslib",
"c060",
"dcurves",
"digest",
"e1071",
"factoextra",
"flextable",
"forestploter",
"ipred",
"jsonlite",
"magrittr",
"maxstat",
"mclust",
"mice",
"mlbench",
"mlr3",
"mlr3learners",
"mlr3mbo",
"mlr3pipelines",
"mlr3tuning",
"mlr3viz",
"nnls",
"nricens",
"officer",
"paradox",
"plotly",
"rBayesianOptimization",
"randomForestSRC",
"risksetROC",
"rms",
"shapviz",
"shiny",
"shinydashboard",
"survex",
"survminer",
"testthat",
"themis",
"tidyverse",
"timeROC",
"umap"
))

remotes::install_github(
c(
"mlr-org/mlr3extralearners",
"mlr-org/mlr3proba",
"mlr-org/mlr3tuningspaces"
),
upgrade = "never",
dependencies = TRUE
)

BiocManager::install(c("ComplexHeatmap","survcomp","Biobase"), ask = FALSE, update = FALSE)

remotes::install_local(
".ci/DMwR",
dependencies = TRUE,
upgrade = "never"
)
remotes::install_local(
".ci/icare",
dependencies = TRUE,
upgrade = "never"
)

- name: Render the book
run: quarto render

- name: Upload the Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: _book

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
23 changes: 19 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
.trae
PrognosiX
local-test/
StatObject/
.DS_Store
.Rhistory
.RData
.Rproj.user/
.quarto/
.ci/
_book/
_freeze/
*_cache/
*_files/
*.knit.md
*.utf8.md

# Objects and chapter output generated during execution
*.rds
Figures/
Module*_Output/
PrognosiX*_Output/
NRIDI_Manual_Results/
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Contributing to the icare tutorial

Changes to this book are reviewed through GitHub pull requests targeting the `docs` branch.

## Before opening a pull request

- Keep prose and code in English.
- Use small R chunks with a unique `#| label:` and place an explanation immediately before the chunk.
- Let important plots display directly below the chunk that creates them.
- Do not commit `_book/`, Quarto caches, frozen execution output, temporary R objects, or analysis output directories.
- Preserve a strict development/validation boundary in modeling examples.
- Do not change a package function name or claimed capability without checking the current `main` branch of `YuLab-SMU/icare`.
- Add new static manuscript figures under the matching `image/module*/` directory and prefer vector PDF output.
- Use informative alternative text or a clear figure caption for every reader-facing figure.

## Validation

Run the structural check:

```bash
quarto inspect
```

When the required R packages and data are available, run a full render:

```bash
quarto render
```

Review the GitHub Actions result before merging. A pull request should explain the affected chapter, any changed output, new dependencies, and whether numerical results or figures were regenerated.

## Scope

Tutorial-only changes belong in this branch. Changes to the R package, exported API, package documentation, or bundled R data should be proposed against the package's `main` branch instead.
13 changes: 0 additions & 13 deletions ICARE Guide.Rproj

This file was deleted.

Loading
Loading