Skip to content

Commit

Permalink
Add codespell to pre-commit & fix found spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dalito committed Jul 13, 2023
1 parent 28b827a commit fecb4ae
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 21 deletions.
39 changes: 23 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: check-yaml
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
args: ['--target-version', 'py38']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.277
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
args: ['--target-version', 'py38']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.278
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ First public release of voc4cat on github.
## Releases before 0.4.0

Before 0.4.0 the code was in alpha state and kept private.
There was no need for a high-level documentaion of changes.
There was no need for a high-level documentation of changes.
See git commit log and the issues & milestones in this repository for the early history.

Just before 0.4.0 the code was migrated from a private gitlab instance to github.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Install voc4cat into the virtual environment.

To install including all development tools use `pip install .[dev]` for just the test tools us `pip install .[tests]`. For tests we use [pytest](https://docs.pytest.org).


## Typical use

Show a help message for the voc4cat command line tool with all available options.
Expand Down Expand Up @@ -115,7 +114,7 @@ Here is an example that forwards the `-e 3` and `-m 3` options to VocExcel and m

Besides `voc4cat` this project also installs its own version of the `vocexcel` command line tool (for historic reasons). To get help on how to use it type

`voc4excel --help` (or simply `voc4execel`)
`vocexcel --help` (or simply `vocexcel`)

## Feedback and code contributions

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,9 @@ max-complexity = 10
[tool.ruff.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["classmethod", "pydantic.validator"]

[tool.codespell]
skip = "pyproject.toml,./vocabularies,./example,./tests/data,./tmp"
# Note: words have to be lowercased for the ignore-words-list
ignore-words-list = "linke"
quiet-level = 3
2 changes: 1 addition & 1 deletion src/voc4cat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def to_excel(self, wb: Workbook, row_no_features: int, row_no_concepts: int):
"""
ws = wb["Concepts"]

# determine the languages with full and patial translation
# determine the languages with full and partial translation
pref_labels = {
lang: pl for pl, lang in zip(self.pref_label, self.pl_language_code)
}
Expand Down
2 changes: 1 addition & 1 deletion src/voc4cat/validator.vocpub.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
sh:path [ sh:inversePath rdf:type ] ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:message "Requirement 2.1.2 Each vocabulary _MUST_ be presented as a single skos:ConceptScheme object & Requirment 2.1.3 Each vocabulary MUST be presented in a single file which does not contain information other than that which is directly part of the vocabulary and the file is considered the point-of-truth" ;
sh:message "Requirement 2.1.2 Each vocabulary _MUST_ be presented as a single skos:ConceptScheme object & Requirement 2.1.3 Each vocabulary MUST be presented in a single file which does not contain information other than that which is directly part of the vocabulary and the file is considered the point-of-truth" ;
] ;
.

Expand Down

0 comments on commit fecb4ae

Please sign in to comment.