Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changelog #22

Closed
wants to merge 6 commits into from
Closed
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: 2 additions & 1 deletion .github/workflows/README-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ jobs:
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::devtools
any::dplyr
any::knitr
any::rmarkdown
any::dplyr
extra-packages:
local::.

Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/dataset-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ on:
paths:
- 'data-raw/generate_data.R'
- 'data-raw/corpus/*'
- 'CHANGELOG.qmd'
pull_request:
paths:
- 'data-raw/generate_data.R'
- 'data-raw/corpus/*'
- 'CHANGELOG.qmd'

name: dataset-check

Expand All @@ -32,20 +34,35 @@ jobs:
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::glue
any::scales
any::usethis
any::dplyr
any::glue
any::lubridate
any::readr
any::rmarkdown
any::roxygen2
any::scales
any::tibble
any::usethis
extra-packages:
local::.

- name: Run Rscript
- name: Generate datasets and docs
run: Rscript 'data-raw/generate_data.R'

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: 1.6.1

- name: Render CHANGELOG
uses: quarto-dev/quarto-actions/render@v2
with:
path: CHANGELOG.qmd

- name: Update pull request
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Regenerate datasets and/or dataset documentation
file_pattern: 'R/data.R data/*.rda'
file_pattern: 'R/data.R data/*.rda CHANGELOG.md'
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# {lovecraftr} Changelog


<!-- CHANGELOG.md is rendered from CHANGELOG.qmd. Do not edit CHANGELOG.md by hand. -->

| Dataset | Raw Last Updated | Dataset Last Updated |
|:---|:---|:---|
| AT THE MOUNTAINS OF MADNESS | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| AZATHOTH | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| BEYOND THE WALL OF SLEEP | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| CELEPHAIS | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| COOL AIR | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| DAGON | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| DREAMS IN THE WITCH-HOUSE | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| EX OBLIVIONE | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| FACTS CONCERNING THE LATE ARTHUR JERMYN AND HIS FAMILY | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| FROM BEYOND | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| HE | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| HERBERT WEST: REANIMATOR | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| HYPNOS | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| IMPRISONED WITH THE PHARAOHS | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| IN THE VAULT | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| MEDUSA’S COIL | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| MEMORY | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| NYARLATHOTEP | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| PICKMAN’S MODEL | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| POETRY OF THE GODS | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| POLARIS | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| THE ALCHEMIST | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| THE BEAST IN THE CAVE | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| THE BOOK | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| THE CALL OF CTHULHU | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| THE CASE OF CHARLES DEXTER WARD | 2024-07-05 18:29:14 | 2024-07-05 18:34:58 |
| THE CATS OF ULTHAR | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE COLOUR OUT OF SPACE | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE CRAWLING CHAOS | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE DESCENDANT | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE DOOM THAT CAME TO SARNATH | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE DREAM QUEST OF UNKNOWN KADATH | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE DUNWICH HORROR | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE EVIL CLERGYMAN | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE FESTIVAL | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE HAUNTER OF THE DARK | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE HORROR AT MARTIN’S BEACH | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE HORROR AT RED HOOK | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE HOUND | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE LURKING FEAR | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE MOON BOG | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE MUSIC OF ERICH ZANN | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE NAMELESS CITY | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE OTHER GODS | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE OUTSIDER | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE PICTURE IN THE HOUSE | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE QUEST OF IRANON | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE RATS IN THE WALLS | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE SHADOW OUT OF TIME | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE SHADOW OVER INNSMOUTH | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE SHUNNED HOUSE | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE SILVER KEY | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE STATEMENT OF RANDOLPH CARTER | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE STRANGE HIGH HOUSE IN THE MIST | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE STREET | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE TEMPLE | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE TERRIBLE OLD MAN | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE THING ON THE DOORSTEP | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE TOMB | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE TRANSITION OF JUAN ROMERO | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE TREE | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE UNNAMABLE | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE VERY OLD FOLK | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE WHISPERER IN DARKNESS | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THE WHITE SHIP | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| THROUGH THE GATES OF THE SILVER KEY | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
| WHAT THE MOON BRINGS | 2024-07-05 18:29:14 | 2024-07-05 18:34:59 |
34 changes: 34 additions & 0 deletions CHANGELOG.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "{lovecraftr} Changelog"
format: gfm
---
<!-- CHANGELOG.md is rendered from CHANGELOG.qmd. Do not edit CHANGELOG.md by hand. -->

```{R setup, output=FALSE, echo=FALSE, eval=TRUE}
library(dplyr)
library(tibble)
library(readr)
library(fs)
library(lubridate)

raw_files <- list.files(file.path("data-raw", "corpus"), full.names = TRUE)
titles <- read_lines(raw_files, n_max = 1)
datasets <- list.files("data", full.names = TRUE)
path_to_remove <- "data/lovecraft.rda"
datasets <- setdiff(datasets, path_to_remove)
raw_file_info <- file_info(raw_files)["modification_time"]
dataset_file_info <- file_info(datasets)["modification_time"]
raw_file_info$modification_time <- as_datetime(raw_file_info$modification_time)
dataset_file_info$modification_time <- as_datetime(dataset_file_info$modification_time)

changelog <- tibble(
Dataset = titles,
"Raw Last Updated" = raw_file_info$modification_time,
"Dataset Last Updated" = dataset_file_info$modification_time
)
```

```{R changelog, output=TRUE, echo=FALSE, eval=TRUE}
changelog %>%
knitr::kable()
```
Loading