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

try out new spellcheck #209

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
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
31 changes: 7 additions & 24 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,13 @@ name: Spellcheck
on:
pull_request: {branches: ['main']}
jobs:
Spelling:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: {image: "rocker/tidyverse:4.3.1"}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install packages
run: |
if (!require("roxygen2")) install.packages("roxygen2")
if (!require("spelling")) install.packages("spelling")
if (!require("testthat")) install.packages("testthat")
shell: Rscript {0}

- name: Check spelling
run: |
testthat::test_that(desc = "Check spelling",
code = {
typos <- spelling::spell_check_files(list.files(pattern = ".*.qmd$", recursive = TRUE), ignore = readr::read_lines("inst/WORDLIST.txt"))
print(typos)
testthat::expect_equal(
object = typos,
expected = spelling::spell_check_files(path = "inst/WORDLIST.txt", ignore = readr::read_lines("inst/WORDLIST.txt"))
)
}
)
shell: Rscript {0}
- name: GitHub Spellcheck
uses: igsekor/pyspelling-any@v1.0.4
18 changes: 18 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
matrix:
- name: Markdown
sources:
- '**/*.qmd'
default_encoding: utf-8
aspell:
lang: en
dictionary:
wordlists:
- inst/WORDLIST.txt
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
33 changes: 33 additions & 0 deletions inst/WORDLIST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -848,3 +848,36 @@ curation
requestor
pageId
viewpage
dataset
datasets
txt
Ży
pdf
webpage
hoc
POSIX
covariate
Covariates
covariates
Covariates
PHUSE’s
NAs
dataframe
subsetted
subsetting
rbind
pdf
backend
APIs
pdf
sqrt
url
rbind
Taşl
çukur
Ży
Ży
unix
PHUSE’s
Żyła
Taşlıçukur