-
Notifications
You must be signed in to change notification settings - Fork 6
Documentation: Implement automatic spelling check #77
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
Open
activus-d
wants to merge
4
commits into
Stormbase:main
Choose a base branch
from
activus-d:spellcheck
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
642fb6a
Implement automatic spelling check on HTML build using pyspelling
activus-d eb430f1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c3e4008
add config file for spelling check workflow in CI; update built docs …
activus-d 6b16a90
trim trailing whitespace
activus-d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Check Documentation Spelling | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build Documentation"] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ["**"] | ||
|
||
jobs: | ||
spelling: | ||
runs-on: ubuntu-latest | ||
# Only run if the build-docs workflow succeeded or on PR/manual trigger | ||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download documentation artifacts | ||
if: github.event_name == 'workflow_run' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: django-otp-webauthn-docs | ||
path: docs/_build/html/ | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
cache: "pip" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install pyspelling | ||
|
||
- name: Install Aspell | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y aspell aspell-en | ||
|
||
- name: Build Documentation (if not from workflow_run) | ||
if: github.event_name != 'workflow_run' | ||
run: | | ||
pip install -e '.[docs]' | ||
cd docs && make html | ||
|
||
- name: Spell check | ||
working-directory: ./docs | ||
run: | | ||
python -m pyspelling -c spellingcheck.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
_build/ | ||
wordlist.dic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
matrix: | ||
- name: HTML files | ||
aspell: | ||
lang: en | ||
d: en_US | ||
encoding: utf-8 | ||
dictionary: | ||
wordlists: | ||
- wordlist.txt | ||
output: wordlist.dic | ||
sources: | ||
- _build/html/**/*.html|!_build/html/index.html|!_build/html/contributing/style_guide.html|!_build/html/glossary.html|!_build/html/genindex.html|!_build/html/search.html | ||
pipeline: | ||
- pyspelling.filters.html: | ||
comments: false | ||
attributes: | ||
- title | ||
- alt | ||
ignores: | ||
- code | ||
- pre | ||
- spellexception | ||
- link | ||
- title | ||
- div.relatedlinks | ||
- strong.command | ||
- div.visually-hidden | ||
- img | ||
- a.p-navigation__link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
AbstractWebAuthnAttestation | ||
AbstractWebAuthnCredential | ||
auth | ||
authenticator | ||
authenticator's | ||
authenticators | ||
authenticatorSelection | ||
backend | ||
backends | ||
backticks | ||
BeginCredentialAuthenticationView | ||
BeginCredentialRegistrationView | ||
biometric | ||
biometrics | ||
Caddy | ||
ccTLD | ||
CompleteCredentialAuthenticationView | ||
CompleteCredentialRegistrationView | ||
cryptographic | ||
django | ||
Frontend | ||
frontend | ||
Furo | ||
gettext | ||
github | ||
http | ||
htmlcov | ||
HTTPS | ||
js | ||
JSON | ||
localhost | ||
OneToOneField | ||
OTP | ||
OTPMiddleware | ||
otp | ||
passwordless | ||
pradyunsg | ||
pre | ||
PyPI | ||
py | ||
Quickstart | ||
rpID | ||
rpIDs | ||
reStructuredText | ||
residentKey | ||
Stormbase | ||
subclasses | ||
subclassing | ||
untrusted | ||
WebAuthn | ||
webauthn | ||
WebAuthn's | ||
WebAuthnCredential | ||
WebAuthnUserHandle | ||
WellKnownWebAuthnView | ||
YubiKey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@activus-d where did you source this list from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What list are you referring to here, Storm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'list' -> the list of checks for operating system and package installation commands
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the Pyspelling dependencies, it uses either Aspell or Hunspell. I used Aspell for this project. See the Pyspelling Setup & Overview page for more information.
Regarding the OS commands, I found the information online, but I can’t retrieve the sources because I cleared my browser history. Unfortunately, I’ve only been able to test them on my Mac M2 (Darwin) so far.