Skip to content

Añade script check_spell.py #1669

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

Merged
merged 4 commits into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Cambia GitHub workflows, Makefile y pre-commit hooks para usar check_…
…spell.py

En el caseo del workflow de GitHub y del Makefile, el cambio es simple:
basta con sustituir la invocación a los dos scripts anteriores por el
nuevo y ya todo funciona.

En el caso de pre-commit, podemos sacar el hook que corre pospell
directamente, y en cambio declrar el paquete pospell como una
dependencia aditional del nuestro hook local que ahora corre
check_spell.py directamente.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Nov 30, 2021
commit b4bd50eafd93b058bdd38182535fa61c5de71c47
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
run: powrap --check --quiet **/*.po
- name: Pospell
run: |
python scripts/create_dict.py
pospell -p dict.txt -l es_ES **/*.po
python scripts/check_spell.py
- name: Construir documentación
run: PYTHONWARNINGS=ignore::FutureWarning sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html
14 changes: 5 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ repos:
- id: powrap
- repo: local
hooks:
- id: merge-dicts
name: merge-dicts
entry: python ./scripts/create_dict.py
- id: check-spell
name: Check spelling
entry: python ./scripts/check_spell.py
language: python
# This one requires package ``hunspell-es_es`` in Archlinux
- repo: https://github.com/AFPy/pospell
rev: v1.1
hooks:
- id: pospell
args: ['--personal-dict', 'dict.txt', '--language', 'es_ES', '--language', 'es_AR']
additional_dependencies: ['pospell>=1.1']
files: \.po$
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ progress: venv

.PHONY: spell
spell: venv
$(VENV)/bin/python scripts/create_dict.py
$(VENV)/bin/pospell -p dict.txt -l es_ES **/*.po
$(VENV)/bin/python scripts/check_spell.py


.PHONY: wrap
Expand Down