Skip to content

Commit 8428e9c

Browse files
authored
Add codespell config and workflow and fix a few typos (#129)
* Add github action to codespell main on push and PRs * Add rudimentary codespell config * ignore all resources and sie variable and OGER name * [DATALAD RUNCMD] run codespell throughout but ignore fail === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * [DATALAD RUNCMD] Do interactive fixing of typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent 6186a49 commit 8428e9c

File tree

7 files changed

+36
-6
lines changed

7 files changed

+36
-6
lines changed

.github/workflows/codespell.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Codespell configuration is within pyproject.toml
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Codespell
23+
uses: codespell-project/actions-codespell@v2

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ that you can use as a starting point.
7878

7979
## How to Request an Enhancement
8080

81-
We welcome request for enhancements and you can make these requestes via the issue tracker. Please be sure to provide
81+
We welcome request for enhancements and you can make these requests via the issue tracker. Please be sure to provide
8282
sufficient context to what the enhancement is trying to address, its utility, and how it's likely to be useful to you
8383
and the broader community.
8484

pyproject.toml

+7
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@ extract-schema = "schema_automator.utils.schema_extractor:cli"
5757
[tool.poetry.extras]
5858
docs = ["Sphinx", "sphinx-pdj-theme", "sphinxcontrib-mermaid"]
5959
mariadb = ["mariadb"]
60+
61+
[tool.codespell]
62+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
63+
skip = '.git,*.lock,resources'
64+
check-hidden = true
65+
ignore-regex = '\bOGER\b'
66+
ignore-words-list = 'sie'

schema_automator/annotators/enum_annotator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def get_ols_term_annotations(iri_param, ontology_param, session_param, ols_terms
214214
default=2, show_default=True)
215215
@click.option('--max_cosine',
216216
help="""how much of a cosine distance will you tolerate
217-
when comparing an enum name to a term lable or synonym?""",
217+
when comparing an enum name to a term label or synonym?""",
218218
default=0.05, show_default=True)
219219
@click.option('--query_field_string',
220220
help="""do you want to define a custom list of fields to search in?

schema_automator/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def import_owl(owlfile, output, **args):
447447
@click.option('--identifier', '-I', help="Slot to use as identifier")
448448
@click.option('--model-uri', help="Model URI prefix")
449449
@click.option('--metamodel-mappings',
450-
help="Path to metamodel mappings YAML dicitonary")
450+
help="Path to metamodel mappings YAML dictionary")
451451
@click.option('--output', '-o', help="Path to saved yaml schema")
452452
def import_rdfs(rdfsfile, output, metamodel_mappings, **args):
453453
"""

schema_automator/generalizers/csv_data_generalizer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class CsvDataGeneralizer(Generalizer):
8686
"""If number if distinct values divided by total number of values is greater than this, then the column is considered an enum"""
8787

8888
enum_strlen_threshold: int = 30
89-
"""Maximimum length of a string to be considered a permissible enum value"""
89+
"""Maximum length of a string to be considered a permissible enum value"""
9090

9191
max_enum_size: int = 50
9292
"""Max number of permissible values for a column to be considered an enum"""

schema_automator/metamodels/dosdp/dosdp_linkml.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ classes:
117117
inlined: true
118118
range: VarDeclaration
119119
list_vars:
120-
description: A dictionary of variables refering to lists of owl classes. Key
120+
description: A dictionary of variables referring to lists of owl classes. Key
121121
= variable name, value = variable range of items in list specified as a
122122
valid OWL data-type.
123123
data_vars:
@@ -522,7 +522,7 @@ slots:
522522
description: 'A dictionary of OWL annotation properties key : label; value : short
523523
form id'
524524
list_vars:
525-
description: A dictionary of variables refering to lists of owl classes. Key =
525+
description: A dictionary of variables referring to lists of owl classes. Key =
526526
variable name, value = variable range of items in list specified as a valid
527527
OWL data-type.
528528
data_vars:

0 commit comments

Comments
 (0)