Skip to content

Commit

Permalink
Merge pull request #1 from yannfeat/main
Browse files Browse the repository at this point in the history
Quarto presentation - 1
  • Loading branch information
yannfeat authored Jun 1, 2024
2 parents b3a9815 + c503af4 commit 69cdd4c
Show file tree
Hide file tree
Showing 9 changed files with 3,021 additions and 2,603 deletions.
16 changes: 9 additions & 7 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
project:
title: "R Validation Hub: Regulatory Repository"

format: rvalhub-revealjs



project:
title: "R Validation Hub: Regulatory Repository"

format:
rvalhub-revealjs:
df-print: kable



13 changes: 13 additions & 0 deletions events-useR2024.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
5,452 changes: 2,874 additions & 2,578 deletions index.html

Large diffs are not rendered by default.

143 changes: 125 additions & 18 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -1,18 +1,125 @@
---
title: "Regulatory Repositories"
---

## Introduction

- R has a meticulously maintained ecosystem, which is immensely valuable in a regulatory space
- In a regulatory setting, the trust of any software needs to be thoroughly documented (NOTE: replace with more precise wording based on HA documents)

## Goals

- Provide a community-maintained catalog of package quality indicators ("risk metrics")
- Serve quality indicators in a standard format
- Thoroughly document the system used to perform quality assessment
- Demonstrate how regulatory-ready risk assessments can be provided using public quality indicators
- Serve subsets of packages that conform to a specified risk tolerance
- Improve transparency of industry R package adoption, endorsement and regulator interaction

---
title: "Regulatory Repositories"
---

## Introduction

- R has a meticulously maintained ecosystem, which is immensely valuable in a regulatory space
- In a regulatory setting, the trust of any software needs to be thoroughly documented (NOTE: replace with more precise wording based on HA documents)

::: {.notes}
Coline
:::

## Goals

- Provide a community-maintained catalog of package quality indicators ("risk metrics")
- Serve quality indicators in a standard format
- Thoroughly document the system used to perform quality assessment
- Demonstrate how regulatory-ready risk assessments can be provided using public quality indicators
- Serve subsets of packages that conform to a specified risk tolerance
- Improve transparency of industry R package adoption, endorsement and regulator interaction

::: {.notes}
Coline
:::

# Interacting with the repo

## Packages risk filters

::: columns
::: {.column width="50%"}
- Helper package for system administrators
- Restricts packages available for installation to those fitting in a policy
- Uses packages metadata in the repo
- May be use together with manual checks (e.g. read a statistical review)
:::
::: {.column width="50%"}
- Example of automated filter for safety-critical activities:
- Acceptance Criteria 1: “Code Coverage > 95% ”
- Acceptance Criteria 2: “Package documentation available”
:::
:::

::: {.notes}
Yann
:::

## Usage

::: columns
::: {.column width="40%"}
### Unfiltered
```{r}
#| echo: true
#| eval: false
available.packages()
```
```{r}
#| echo: false
pkgs_nofltr <- readRDS(file = file.path(
here::here(), "resources", "pkgs_nofltr.rds"))
pkgs_nofltr <- cbind(pkgs_nofltr, data.frame("..." = "..."))
pkgs_nofltr <- pkgs_nofltr[1:3, c("Package", "...")]
pkgs_nofltr <- rbind(pkgs_nofltr, data.frame("Package" = "...", "..." = "..."))
rownames(pkgs_nofltr) <- c("1", "2", "3", "...")
pkgs_nofltr
```
:::

::: {.column width="60%"}
### Filtered
```{r}
#| echo: true
#| eval: false
fltr <- risk_filter(
ReverseDependencies >= 0.99)
options(available_packages_filters = fltr)
available.packages()
```
```{r}
#| echo: false
pkgs_fltr <- readRDS(file = file.path(
here::here(), "resources", "pkgs_fltr.rds"))
pkgs_fltr <- cbind(pkgs_fltr, data.frame("..." = "..."))
pkgs_fltr <- pkgs_fltr[1:3, c("Package", "...")]
pkgs_fltr <- rbind(pkgs_fltr, data.frame("Package" = "...", "..." = "..."))
rownames(pkgs_fltr) <- c("1", "2", "3", "...")
pkgs_fltr
```
:::
:::

::: {.notes}
Yann
:::

# Repository ‘back-end’

## Repository forked from `r-hub/repos`

![](resources/repos_pkgs.png)

::: {.notes}
Yann
:::

## Packages cohort validation

* Risk metrics calculated on packages with new versions and on their reverse dependencies
* Uses the GitHub API to fetch new release assets

```{r}
#| echo: false
df_pkg_metrics <- readRDS(file = file.path(
here::here(), "resources", "df_pkg_metrics.rds"))
df_pkg_metrics$pkg_score <- round(df_pkg_metrics$pkg_score, 4)
df_pkg_metrics[1:3,
c("package", "version", "ver_old", "pkg_score", "has_news")]
```

::: {.notes}
Yann
:::

Binary file added resources/df_pkg_metrics.rds
Binary file not shown.
Binary file added resources/pkgs_fltr.rds
Binary file not shown.
Binary file added resources/pkgs_nofltr.rds
Binary file not shown.
Binary file added resources/repos_pkgs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/repos_pkgs.pptx
Binary file not shown.

0 comments on commit 69cdd4c

Please sign in to comment.