Skip to content

Commit 4a33c8a

Browse files
authored
Fix Typos Via Typos Hook (#898)
* fix typos; add typos config and hook; remove comments * update name * capitalize * update typos to ignore selected folders
1 parent a426c2a commit 4a33c8a

File tree

5 files changed

+51
-29
lines changed

5 files changed

+51
-29
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
###############################################################################
2-
# OVERVIEW
3-
###############################################################################
4-
# This file contains the pre-commit hooks for this repository. Note that we
5-
# only want to check files in the directory ./src
6-
#
7-
# Links:
8-
#
9-
# Pre-commit: https://pre-commit.com/
10-
# Supported hooks: https://github.com/pre-commit/pre-commit-hooks
11-
###############################################################################
12-
# CONTINUOUS INTEGRATION
13-
###############################################################################
141
ci:
152
autofix_commit_msg: |
163
[pre-commit.ci] auto fixes from pre-commit.com hooks
@@ -21,9 +8,6 @@ ci:
218
autoupdate_schedule: weekly
229
skip: []
2310
submodules: false
24-
###############################################################################
25-
# GENERAL
26-
###############################################################################
2711
repos:
2812
- repo: https://github.com/pre-commit/pre-commit-hooks
2913
rev: v6.0.0
@@ -42,26 +26,17 @@ repos:
4226
files: ^src/
4327
- id: trailing-whitespace
4428
files: ^src/
45-
###############################################################################
46-
# R
47-
###############################################################################
4829
- repo: https://github.com/lorenzwalthert/precommit
4930
rev: v0.4.3.9012
5031
hooks:
5132
- id: lintr
5233
files: \.R$|\.Rmd$
5334
- id: parsable-R
5435
files: \.R$|\.Rmd$
55-
###############################################################################
56-
# BASH SHELL
57-
###############################################################################
5836
- repo: https://github.com/scop/pre-commit-shfmt
5937
rev: v3.12.0-2
6038
hooks:
6139
- id: shfmt
62-
###############################################################################
63-
# PYTHON
64-
###############################################################################
6540
- repo: https://github.com/astral-sh/ruff-pre-commit
6641
rev: v0.12.8
6742
hooks:
@@ -73,4 +48,8 @@ repos:
7348
- id: ruff-format
7449
args: ["--line-length", "79"]
7550
files: '\.py$'
76-
###############################################################################
51+
- repo: https://github.com/crate-ci/typos
52+
rev: v1
53+
hooks:
54+
- id: typos
55+
args: ["--force-exclude"]

_typos.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[default]
2+
extend-ignore-identifiers-re = [
3+
"AttributeID.*Supress.*",
4+
]
5+
6+
[default.extend-identifiers]
7+
AttributeIDSupressMenu = "AttributeIDSupressMenu"
8+
9+
[default.extend-words]
10+
# words that should not be corrected
11+
Damon = "Damon"
12+
dot_acn = ".acn"
13+
ba = "ba"
14+
ned = "Ned"
15+
ND = "ND"
16+
arange = "arange"
17+
Aer = "Aer"
18+
O957 = "O957"
19+
gam = "gam"
20+
boun = "boun"
21+
thq = "thq"
22+
clien = "clien"
23+
AKS = "AKS"
24+
HSA = "HSA"
25+
RTO = "RTO"
26+
Winn = "Winn"
27+
OT = "OT"
28+
29+
[files]
30+
extend-exclude = [
31+
".gitignore",
32+
".pre-commit-config.yaml",
33+
".github/ISSUE_TEMPLATE/",
34+
"*.bib",
35+
"*.html",
36+
"*.js",
37+
"*.csl",
38+
"*.css",
39+
"*.ipynb",
40+
"*.csv",
41+
"model-metadata",
42+
"model-output"
43+
]

hub-config/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Hub configuation files
1+
# Hub configuration files
22

33
This folder should contain configuration files for the Hub, following the recommended [Hub configuration files in our documentation](https://hubdocs.readthedocs.io/en/latest/user-guide/hub-config.html).

model-metadata/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ A boolean value (`true` or `false`) that indicates whether a model is an ensembl
8888

8989
### `ensemble_of_hub_models`
9090

91-
A boolean value (`true` or `false`) that indicates whether a model is an ensemble specifically of other models submited to the FluSight forecasting hub.
91+
A boolean value (`true` or `false`) that indicates whether a model is an ensemble specifically of other models submitted to the COVID-19 Forecast Hub.
9292

9393
## Optional fields
9494
The following metadata fields are optional, but encouraged.

model-output/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The combination of `team` and `model` should be unique from any other model in t
7373

7474
### Metadata
7575

76-
The metadata file will be saved within the model-metdata directory in the Hub's GitHub repository. It should be a YAML file with base name `{team}-{model}`, and extension `.yml` or `.yaml`, e.g.
76+
The metadata file will be saved within the model-metadata directory in the Hub's GitHub repository. It should be a YAML file with base name `{team}-{model}`, and extension `.yml` or `.yaml`, e.g.
7777

7878
exampleteam-examplemodel.yml
7979
otherteam-othermodel.yaml

0 commit comments

Comments
 (0)