Skip to content

Commit 8f8483f

Browse files
lukaspiemkuehbachLukas Pielstickergithub-actions[bot]
authored
enable spellchecking for sourcecode (#722)
Co-authored-by: Markus Kühbach <mkuehbach@users.noreply.github.com> Co-authored-by: Lukas Pielsticker <you@example.com> Co-authored-by: GitHub <github-actions[bot]@users.noreply.github.com>
1 parent 581f6ce commit 8f8483f

File tree

25 files changed

+466
-278
lines changed

25 files changed

+466
-278
lines changed

.cspell/custom-dictionary.txt

Lines changed: 115 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,207 @@
1-
# Custom Dictionary Words
21
ARPES
2+
ATTRIBUTENAME
33
AXISNAME
44
Aeschlimann
55
BASECLASS
6-
Bluesky
6+
BASESECTIONS
77
Brockhauser
8-
Brückner
9-
CSET
108
Carola
119
DECTRIS
10+
Dataconverter
1211
Dobener
12+
Downsample
13+
Downsampled
1314
Draxl
1415
ELECTRONANALYZER
1516
Emminger
16-
FAIRMAT
17-
Fekete
1817
Florian
1918
Forschungsgemeinschaft
2019
GROUPNAME
2120
Ginzburg
21+
Globar
22+
González
2223
Grundmann
23-
Haraszti
2424
Heiko
2525
Hetaba
26+
Hildebrandt
2627
José
2728
Kühbach
2829
Laurenz
2930
Lukas
31+
MONOCHROMATOR
3032
MPES
3133
MSYS
32-
Maier
3334
Markus
3435
Metainfo
3536
Mozumder
3637
Márquez
3738
NFDI
3839
NIAC
39-
NULLTERM
40+
NINF
4041
NXDL
42+
Namefits
43+
Namefitting
44+
OPCPA
45+
ORCID
4146
PATHCONV
47+
PDBX
48+
PYNXTOOLS
4249
Pielsticker
4350
Pincelli
51+
Plottable
4452
Prieto
53+
Pynxtools
4554
Raman
4655
Rettig
47-
STRPAD
48-
STRSIZE
56+
SILX
4957
Sandor
5058
Scheidgen
5159
Shabih
5260
Sherjeel
61+
Tommaso
62+
UNALLOWED
63+
Uniquified
64+
Uniquifies
5365
Walid
66+
Xclass
5467
Zenodo
68+
allclose
5569
alphabetagamma
5670
analyser
71+
anamethat
72+
anamethatichangetothis
73+
anamethatrenames
5774
appdef
5875
appdefdir
5976
appdefs
6077
arpes
78+
atleast
79+
atomutils
80+
attribs
81+
backgroundcolor
82+
baseclass
83+
basesections
84+
bulletpoint
85+
callspec
6186
caplog
6287
cnxvalidate
88+
complexfloating
89+
dataarrays
6390
dataconverter
91+
datamodel
92+
defaultdicts
93+
docstrings
94+
edgeitems
95+
ekey
6496
electronanalyzer
97+
elems
6598
ellips
99+
elist
66100
ellipsometry
67101
emittance
68-
filemanager
102+
execinfo
103+
fairmat
104+
fillvalue
69105
flatfield
70106
fluence
71107
fxcef
72-
hildebrandt
108+
getlink
109+
getroottree
110+
groupgroup
111+
groupnames
112+
hashkey
113+
hashvalue
114+
hdfdict
115+
hdfgroup
116+
hdfobject
73117
hixu
74118
hypothes
119+
idname
120+
idobj
75121
infile
76-
infty
122+
instancename
123+
isdt
124+
isscalar
125+
issubdtype
126+
itemsizing
127+
iufc
128+
iupac
129+
keystring
130+
keyval
77131
kfra
78-
libhdf
79-
libiconv
132+
lauetof
133+
ldic
134+
levelname
135+
levelno
136+
libversion
137+
lineterm
138+
listified
139+
listify
80140
loadgroup
81141
lukaspie
82142
mainfile
83143
mbar
144+
metainfo
84145
mkuehbach
85146
monochromator
86147
monoclinic
87-
mydata
148+
mpes
88149
mydatareader
89150
mynxdl
151+
namefit
90152
namefitting
153+
ndarray
154+
ndataconverter
91155
nexpy
156+
nexusapp
92157
nexusformat
93-
nexusvalidate
94-
nexusvalidation
158+
nodemixin
159+
nonvariadic
160+
nsmap
161+
nxcollection
162+
nxdata
163+
nxdl
95164
nxdls
165+
nxentry
166+
optionalities
96167
orcid
97168
otherfile
98169
oxidising
99170
pathtovalidate
100-
physik
101171
plottable
102172
posint
173+
printoptions
103174
punx
104175
pynxtools
176+
raman
177+
redef
178+
reqs
179+
requiredness
180+
rtol
105181
setpoint
106182
sherjeelshabih
183+
showgrid
184+
showlegend
185+
straße
186+
submoduled
187+
tnxdl
188+
tofile
107189
tommaso
190+
tracebacklimit
108191
underload
192+
uniquify
193+
unitless
194+
unlazy
195+
unlazying
196+
unsignedinteger
197+
ureg
198+
usefixtures
199+
visititems
109200
xarrays
201+
xaxis
110202
xdist
111203
xfbaa
112204
xraylens
205+
yaxis
206+
zaxis
207+
zenodo

.github/workflows/spellcheck.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Spell Check
22

33
on:
44
pull_request:
5-
branches:
6-
- master # Triggers deployment on push to the master branch
5+
branches: [master]
76

87
jobs:
98
spellcheck:
@@ -19,11 +18,15 @@ jobs:
1918
2019
- name: Run cspell
2120
run: |
22-
cspell --config cspell.json "docs/**/*.md" "CITATION.cff" "README.md"
21+
cspell --config cspell.json \
22+
"README.md" "CITATION.cff" \
23+
"docs/**/*" \
24+
"src/pynxtools/**/*.py" \
25+
"tests/**/*.py"
2326
2427
- name: Fail on errors
2528
run: |
2629
if [[ $? -ne 0 ]]; then
2730
echo "There are spelling errors in your code. Please fix them and try again."
2831
exit 1
29-
fi
32+
fi

.pre-commit-config.yaml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
# Ruff version.
43
rev: v0.14.0
54
hooks:
6-
# Run the linter.
7-
- id: ruff
8-
# Run the formatter.
9-
- id: ruff-format
5+
- id: ruff-check
6+
files: ^(src/pynxtools|tests)/.*\.py$
7+
- id: ruff-format
8+
files: ^(src/pynxtools|tests)/.*\.py$
9+
10+
- repo: https://github.com/pre-commit/mirrors-mypy
11+
rev: v1.18.1
12+
hooks:
13+
- id: mypy # static type checking
14+
15+
- repo: https://github.com/asottile/pyupgrade
16+
rev: v3.21.1
17+
hooks:
18+
- id: pyupgrade
19+
args: [--py36-plus] # modernizes syntax for Python 3.6+
20+
21+
- repo: https://github.com/kynan/nbstripout
22+
rev: 0.6.0
23+
hooks:
24+
- id: nbstripout # removes notebook outputs before committing
25+
26+
- repo: https://github.com/streetsidesoftware/cspell-cli
27+
rev: v9.3.0
28+
hooks:
29+
- id: cspell # spellchecking
30+
pass_filenames: false
31+
args:
32+
- --config
33+
- cspell.json
34+
- README.md
35+
- CITATION.cff
36+
- docs/**/*
37+
- src/pynxtools/**/*.py
38+
- tests/**/*.py

cspell.json

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
{
22
"version": "0.2",
33
"ignorePaths": [
4-
"./tests/data/*",
4+
"tests/data/*",
55
"*.toml",
66
"Makefile",
77
"*.bat",
8-
"*.egg-info"
8+
"*.egg-info",
9+
"venv",
10+
"__pycache__",
11+
"dist",
12+
"build",
13+
"src/pynxtools/definitions"
914
],
10-
"dictionaryDefinitions": [
11-
{
12-
"name": "custom-dictionary",
13-
"path": "./.cspell/custom-dictionary.txt",
14-
"addWords": true
15-
}
16-
],
17-
"import": ["@cspell/dict-scientific-terms-us/cspell-ext.json"],
18-
"dictionaries": [
19-
"custom-dictionary",
20-
"scientific_terms_US",
21-
"python"
22-
],
23-
"words": [],
24-
"ignoreWords": [],
25-
"ignoreRegExpList": ["\\bNX\\w*\\b", "https?://[\\S]+"],
26-
"import": [],
27-
"language": "en-US"
15+
"dictionaryDefinitions": [
16+
{
17+
"name": "custom-dictionary",
18+
"path": "./.cspell/custom-dictionary.txt",
19+
"addWords": true
20+
}
21+
],
22+
"dictionaries": [
23+
"custom-dictionary",
24+
"scientific_terms_US",
25+
"en_US",
26+
"python"
27+
],
28+
"words": [],
29+
"ignoreWords": [],
30+
"ignoreRegExpList": ["\\bNX\\w*\\b", "https?://[\\S]+"],
31+
"language": "en-US"
2832
}

0 commit comments

Comments
 (0)