Skip to content
Draft
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
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^LICENSE-CONTENT\.md$
^LICENSES\.md$
^pkgdown$
^\.github$
^ROADMAP\.md$
^docs$
Expand All @@ -14,3 +17,7 @@
^codemeta\.json$
^paper$
^SECURITY.md$
^.*\.Rcheck$
^\.\.Rcheck$
^tutorizeR_[0-9.]+\.tar\.gz$
^CRAN-SUBMISSION$
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Questions and discussion
url: https://github.com/AurelienNicosiaULaval/tutorizeR/discussions
about: Use discussions for open-ended teaching workflow questions.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/jose_readiness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: JOSE readiness item
about: Track a task related to JOSE preparation or review
title: "[JOSE] "
labels: jose, documentation
assignees: ''
---

## Review item

Describe the JOSE readiness issue.

## Evidence

Link to repository files, examples, tests, or documentation that support the item.

## Acceptance criteria

- [ ] Repository evidence is added or updated.
- [ ] The claim is verifiable from repository contents.
- [ ] Tests or documentation are updated if needed.
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

- What this PR changes
- Why it is needed for teacher workflow reliability
- Whether this changes generated tutorial output

## Validation

- [ ] `R CMD check --as-cran --no-manual`
- [ ] Tests pass (`testthat`)
- [ ] Lint clean (`lintr::lint_package()`)
- [ ] Coverage thresholds met (if touching core conversion path)
- [ ] Example conversion checked with at least one `.Rmd` or `.qmd` fixture
- [ ] Documentation or vignette updated when user-facing behavior changes

## Educational impact

- What instructor workflow is improved?
- What student interaction changes, if any?
- Is any classroom adoption claim supported by repository evidence?

## Additional notes

Expand Down
65 changes: 59 additions & 6 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: [main, release/v0.4.4]

permissions:
contents: read
Expand All @@ -27,6 +27,7 @@ jobs:
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
extra-repositories: https://rstudio.r-universe.dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand All @@ -37,6 +38,27 @@ jobs:
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning")
shell: Rscript {0}

testthat:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
extra-repositories: https://rstudio.r-universe.dev

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

- name: Run tests
run: testthat::test_local(reporter = "summary")
shell: Rscript {0}

lintr:
runs-on: ubuntu-latest

Expand All @@ -47,6 +69,7 @@ jobs:
with:
r-version: 'release'
use-public-rspm: true
extra-repositories: https://rstudio.r-universe.dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand All @@ -69,6 +92,7 @@ jobs:
with:
r-version: 'release'
use-public-rspm: true
extra-repositories: https://rstudio.r-universe.dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand All @@ -78,21 +102,50 @@ jobs:
run: |
cov <- covr::package_coverage()
print(cov)
by <- as.data.frame(covr::coverage_to_list(cov))
by$file <- rownames(by)
cov_list <- covr::coverage_to_list(cov)
file_coverage <- cov_list$filecoverage

core_files <- c("R/parser.R", "R/transform.R", "R/validation.R", "R/report.R")
missing <- setdiff(core_files, by$file)
missing <- setdiff(core_files, names(file_coverage))
if (length(missing) > 0L) {
stop(sprintf("Missing core files in coverage table: %s", paste(missing, collapse = ", ")))
}

core_pct <- mean(by$filecoverage[match(core_files, by$file)])
total_pct <- covr::percent_coverage(cov)
core_pct <- mean(unname(file_coverage[core_files]))
total_pct <- as.numeric(cov_list$totalcoverage)
cat(sprintf("Coverage total: %.2f%%\n", total_pct))
cat(sprintf("Coverage core: %.2f%%\n", core_pct))

if (core_pct < 80) {
stop(sprintf("Core coverage threshold not met: %.2f%% < 80%%", core_pct))
}
shell: Rscript {0}

installed-example:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true
extra-repositories: https://rstudio.r-universe.dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
needs: check

- name: Install package
run: R CMD INSTALL .

- name: Run installed example module
run: |
source(system.file(
"examples",
"example_course_module",
"run-example.R",
package = "tutorizeR"
))
shell: Rscript {0}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
..Rcheck
tutorizeR.Rcheck
tutorizeR_*.tar.gz
pkgdown/
3 changes: 1 addition & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version: 0.4.4
license: MIT
repository-code: https://github.com/AurelienNicosiaULaval/tutorizeR
url: https://github.com/AurelienNicosiaULaval/tutorizeR
date-released: '2026-02-13'
date-released: '2026-02-14'
keywords:
- learnr
- quarto
Expand All @@ -26,5 +26,4 @@ authors:
email: aurelien.nicosia@mat.ulaval.ca
affiliation: >-
Université Laval
orcid: null
role: author
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.4.4
Date: 2026-05-31 17:07:44 UTC
SHA: 839f3487567ac6950161c56ebeda225fb8e07373
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Description: Helps teachers convert existing '.Rmd' and '.qmd' teaching
conversion reports.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Depends:
R (>= 4.0)
Imports:
Expand All @@ -31,10 +31,13 @@ Imports:
Suggests:
commonmark,
covr,
dplyr,
ggplot2,
knitr,
learnr,
lintr,
miniUI,
readr,
shiny,
testthat (>= 3.0.0)
VignetteBuilder: knitr
Expand Down
14 changes: 14 additions & 0 deletions LICENSE-CONTENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Creative Commons Attribution 4.0 International

Educational example materials in `inst/examples/` and graphical documentation assets in `man/figures/` are licensed under the Creative Commons Attribution 4.0 International License unless otherwise specified.

You are free to:

- share, copy, and redistribute the material in any medium or format;
- adapt, remix, transform, and build upon the material for any purpose, including teaching and research.

You must give appropriate credit, provide a link to the license, and indicate if changes were made.

License text:

https://creativecommons.org/licenses/by/4.0/legalcode
14 changes: 14 additions & 0 deletions LICENSES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# License clarification

This file clarifies licensing for reviewers and downstream instructors.

| Repository content | License | Notes |
|---|---|---|
| R package code in `R/`, `inst/scripts/`, tests, and package infrastructure | MIT | The CRAN-style license fields are in `DESCRIPTION` and `LICENSE`; the full MIT text is in `LICENSE.md`. |
| Technical package documentation, including README examples, function documentation, and vignettes | MIT | These files document use of the package and are treated as package documentation. |
| Educational content in `inst/examples/` | CC-BY 4.0 | This includes the example course module, lesson source, question bank, dataset, and generated expected outputs. |
| Generated expected outputs in `inst/examples/example_course_module/expected/` | CC-BY 4.0 | These files are educational artifacts derived from the example course module. |
| Graphical documentation assets in `man/figures/` | CC-BY 4.0 | Includes the logo and workflow figure unless a file-level notice states otherwise. |
| Reviewer documentation in `docs/` | MIT | These files support package review and release preparation. |

The Creative Commons Attribution 4.0 International license text is available at <https://creativecommons.org/licenses/by/4.0/legalcode>.
10 changes: 9 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

## Release finalization

- Finalized JOSS-ready release artifacts and metadata alignment.
- Finalized JOSE-oriented reviewer artifacts and metadata alignment.
- Refreshed reproducibility and reviewer guidance docs.
- Synchronized version fields for release publication.
- Added JOSE preparation artifacts, educational use-case documentation,
expanded vignettes, an example course module, publication-readiness tests,
and pkgdown navigation for educational examples.
- Recentered the review branch on JOSE software-submission requirements,
clarified educational evidence boundaries, added CC-BY content licensing,
and replaced internal smoke-test paths with installable example workflows.
- Reworked the README as a package-facing overview and added pkgdown-oriented
documentation articles for educational use cases and website maintenance.

# tutorizeR 0.4.3

Expand Down
17 changes: 13 additions & 4 deletions R/transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ transform_setup_chunk <- function(block, format, language, seed, registry) {
}

body <- block$body_lines
required <- c("library(learnr)", "library(gradethis)", "gradethis_setup()")
required <- learnr_setup_lines()

for (line in required) {
if (!any(trimws(body) == line)) {
Expand Down Expand Up @@ -738,14 +738,23 @@ build_default_setup_chunk <- function(language, seed = NULL) {
c(
"```{r setup, include=FALSE}",
tr("labels.setup_added", language = language),
"library(learnr)",
"library(gradethis)",
"gradethis_setup()",
learnr_setup_lines(),
seed_line,
"```"
)
}

# Build setup lines required for generated learnr tutorials.
learnr_setup_lines <- function() {
c(
"library(learnr)",
"if (requireNamespace(\"gradethis\", quietly = TRUE)) {",
" library(gradethis)",
" gradethis_setup()",
"}"
)
}

#' Build knitr R chunk header
#' @keywords internal
build_r_chunk_header <- function(label = NULL, options = character()) {
Expand Down
Loading
Loading