Skip to content

Commit b66d48a

Browse files
authored
🔨 Configure optional typos checking and add supporting tooling (#8691)
1 parent f8a7d09 commit b66d48a

File tree

97 files changed

+192
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+192
-128
lines changed

.github/ISSUE_TEMPLATE/5_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ body:
3232
attributes:
3333
label: "Previous pre-release"
3434
description: |
35-
Link to pre-release to staging that preceeds this release
35+
Link to pre-release to staging that precedes this release
3636
value: https://github.com/ITISFoundation/osparc-simcore/releases/tag/staging_<sprint_name><version>
3737
validations:
3838
required: true
@@ -55,7 +55,7 @@ body:
5555
attributes:
5656
label: Motivation
5757
description: |
58-
What is the motivation to release to production? Our current release policy recommends **at least one releast to production for every sprint**.
58+
What is the motivation to release to production? Our current release policy recommends **at least one release to production for every sprint**.
5959
For the moment releases to production require maintenance and therefore interrupting users
6060
- Explain what motivates this release?
6161
- Which important changes we might pay attention to?
@@ -114,7 +114,7 @@ body:
114114
label: "Test assessment: user-testing 🧐"
115115
description: |
116116
Assessment performed together with a final user. The session is recorded and ``filesrv/osparc/DEVELOPERS/test-sessions``.
117-
Create an issue for every bug/enhancement including the video timestap to follow up.
117+
Create an issue for every bug/enhancement including the video timestamp to follow up.
118118
List issues here!
119119
placeholder: |
120120
Follow up issues:

.github/mergify.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
queue_rules:
22
- name: default
3-
queue_conditions: # condtions to be met to add the PR to the queue (manually or automatically)
4-
# general prerequisits fo accept the PR in the queue
3+
queue_conditions: # conditions to be met to add the PR to the queue (manually or automatically)
4+
# general prerequisites for accept the PR in the queue
55
- label=🤖-automerge # let Mergify know that the PR can be merged (added manually)
66
- label!=🤖-do-not-merge # block Mergify from merging the PR (added manually)
77
- base=master

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ repos:
6565
hooks:
6666
- id: typos
6767
name: spellchecker
68+
continue_on_error: true

.ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ lint.select = [
1818
"ICN", # [https://github.com/joaopalmeiro/flake8-import-conventions]
1919
"ISC", # [https://pypi.org/project/flake8-implicit-str-concat/]
2020
"N", # [https://pypi.org/project/pep8-naming/]
21-
"NPY", # NumPy-speficic rules
21+
"NPY", # NumPy-specific rules
2222
"PERF", # [https://pypi.org/project/perflint/]
2323
"PIE", # [https://pypi.org/project/flake8-pie/]
2424
"PL", # [https://pypi.org/project/pylint/]
@@ -59,7 +59,7 @@ target-version = "py313"
5959
"PLR0913", # too many arguments
6060
"N806", # Uppercase variables in functions
6161
"PT001", # use pytest.fixture over pytest.fixture() whatsoever
62-
"PT004", # does not return anythin, add leading underscore
62+
"PT004", # does not return anything, add leading underscore
6363
"ERA001", # found commented out code
6464
"FBT001", # Boolean positional arg in function definition
6565
]

.typos.toml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# typos spell-checker
2+
#
3+
# config .typos.toml
4+
# SEE https://github.com/crate-ci/typos/blob/master/docs/reference.md
5+
#
6+
# usage:
7+
#. uvx typos --help
8+
#
9+
# inline marks:
10+
#. # spellchecker:disable-line
11+
#. # spellchecker:<on|off>
12+
#. # spellchecker:ignore-next-line
13+
#
14+
15+
[files]
16+
extend-exclude = [
17+
".gitignore",
18+
"**/migration/**",
19+
"**/*.svg",
20+
"**/*.css",
21+
]
22+
ignore-hidden = true
23+
ignore-files = true
24+
ignore-dot = true
25+
ignore-vcs = true
26+
ignore-global = true
27+
ignore-parent = true
28+
29+
[default]
30+
binary = false
31+
check-filename = true
32+
check-file = true
33+
unicode=true
34+
locale = "en"
35+
extend-ignore-re = [
36+
# e.g. "# spellchecker:disable-line"
37+
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$",
38+
# e.g. "# spellchecker:<on|off>"
39+
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
40+
# e.g. # spellchecker:ignore-next-line
41+
"(#|//)\\s*spellchecker:ignore-next-line\\n.*",
42+
43+
# UUIDs
44+
'"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}"',
45+
'"[0-9a-fA-F]{8}_[0-9a-fA-F]{4}_[1-5][0-9a-fA-F]{3}_[89abAB][0-9a-fA-F]{3}_[0-9a-fA-F]{12}"',
46+
'[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}_',
47+
48+
# Secrets
49+
"[A-Za-z]+://\\S{3,50}:(\\S{8,50})@[\\dA-Za-z#%&+./:=?_~-]+", # URLs
50+
]
51+
extend-ignore-identifiers-re = []
52+
53+
[default.extend-words]
54+
# <typo> = "<correction>"
55+
56+
[default.extend-identifiers]
57+
# <typo> = "<correction>"
58+
instance_datas = "instance_datas"
59+
cMIS = "cMIS"

.vscode/launch.template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
]
256256
},
257257
{
258-
"name": "Python: Remote Attach dynamic-schduler (SCALE 1 replica first)",
258+
"name": "Python: Remote Attach dynamic-scheduler (SCALE 1 replica first)",
259259
"type": "debugpy",
260260
"request": "attach",
261261
"connect": {

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ _check_venv_active:
166166

167167
## DOCKER BUILD -------------------------------
168168
#
169-
# - all builds are immediatly tagged as 'local/{service}:${BUILD_TARGET}' where BUILD_TARGET='development', 'production', 'cache'
169+
# - all builds are immediately tagged as 'local/{service}:${BUILD_TARGET}' where BUILD_TARGET='development', 'production', 'cache'
170170
# - only production and cache images are released (i.e. tagged pushed into registry)
171171
#
172172
SWARM_HOSTS = $(shell docker node ls --format="{{.Hostname}}" 2>$(if $(IS_WIN),NUL,/dev/null))
@@ -714,7 +714,7 @@ SERVICES.md: ## Auto generates service.md
714714

715715

716716
.PHONY: postgres-upgrade
717-
postgres-upgrade: ## initalize or upgrade postgres db to latest state
717+
postgres-upgrade: ## initialize or upgrade postgres db to latest state
718718
@$(MAKE_C) packages/postgres-database/docker build
719719
@$(MAKE_C) packages/postgres-database/docker upgrade
720720

api/specs/web-server/_nih_sparc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def list_latest_services():
3434
response_model=Envelope[list[Viewer]],
3535
)
3636
async def list_viewers(file_type: str | None = None):
37-
"""Lists all publically available viewers
37+
"""Lists all publicly available viewers
3838
3939
Notice that this might contain multiple services for the same filetype
4040
@@ -51,7 +51,7 @@ async def list_default_viewers(file_type: str | None = None):
5151
5252
This was interfaced as a subcollection of viewers because it is a very common use-case
5353
54-
Only publicaly available viewers
54+
Only publicly available viewers
5555
5656
If file_type is provided, then it filters viewer for that filetype
5757
"""

api/specs/web-server/_nih_sparc_redirections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async def get_redirection_to_viewer(
4141
@router.get(
4242
"/study/{id}",
4343
response_class=RedirectResponse,
44-
response_description="Opens osparc and opens a copy of publised study",
44+
response_description="Opens osparc and opens a copy of published study",
4545
status_code=status.HTTP_302_FOUND,
4646
)
4747
async def get_redirection_to_study_page(id: ProjectID):

api/specs/web-server/_projects_access_rights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
status_code=status.HTTP_202_ACCEPTED,
3333
responses={
3434
status.HTTP_202_ACCEPTED: {
35-
"description": "The request to share the project has been accepted, but the actual sharing process has to be confirmd."
35+
"description": "The request to share the project has been accepted, but the actual sharing process has to be confirmed."
3636
}
3737
},
3838
)

0 commit comments

Comments
 (0)