Skip to content

Commit b69ffa2

Browse files
authored
Merge pull request #48 from dave3d/RenameScript
Renamed codespell.py to commentspellcheck.py
2 parents fe08737 + de16d6f commit b69ffa2

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It is intended to be run on the SimpleITK and ITK code bases.
88

99
Here is how it is typically run:
1010

11-
python codespell.py --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code
11+
python comment_spell_check.py --exclude Ancillary $SIMPLEITK_SOURCE_DIR/Code
1212

1313
This command will recursively find all the '.h' files in a directory,
1414
extract the C/C++ comments from the code, and run a spell checker on them.

additional_dictionary.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,6 @@ clientdata
923923
closedness
924924
codebook
925925
codebooks
926-
codespell
927926
codeword
928927
codewords
929928
codimension

codespell.py renamed to comment_spell_check.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def parse_args():
317317
action="append",
318318
help="Comma-separated list of files to skip. It "
319319
"accepts globs as well. E.g.: if you want "
320-
"codespell to skip .eps and .txt files, "
320+
"coment_spell_check.py to skip .eps and .txt files, "
321321
'you\'d give "*.eps,*.txt" to this option.'
322322
" Argument can be passed multiple times.",
323323
)
@@ -358,9 +358,9 @@ def parse_args():
358358
help="Set file mime type. File name suffix will be ignored.",
359359
)
360360

361-
parser.add_argument(
362-
"--version", action="version", version=f"%(prog)s {__version__}"
363-
)
361+
# parser.add_argument(
362+
# "--version", action="version", version=f"%(prog)s {__version__}"
363+
# )
364364

365365
args = parser.parse_args()
366366
return args

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.0", "setuptools_scm[toml]>=7.1"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "SimpleITKSpellChecking"
6+
name = "comment_spell_check"
77
authors = [
88
{ name="David Chen", email="[email protected]" },
99
]
@@ -25,7 +25,7 @@ dynamic = ["dependencies", "version"]
2525
dependencies = {file = ["requirements.txt"]}
2626

2727
[project.scripts]
28-
codespell = "codespell:main"
28+
comment_spell_check = "comment_spell_check:main"
2929

3030
[tool.setuptools_scm]
3131
local_scheme = "dirty-tag"

tests/test_codespell.py renamed to tests/test_comment_spell_check.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
import os
44

55

6-
class TestCodespell(unittest.TestCase):
6+
class TestCommentSpellCheck(unittest.TestCase):
77
@classmethod
88
def setUpClass(self):
9-
print("\nSetting up codespell tests")
9+
print("\nSetting up comment_spell_check tests")
1010

1111
@classmethod
1212
def tearDownClass(cls):
13-
print("\nTearing down dicom2stl tests")
13+
print("\nTearing down comment_spell_check tests")
1414

15-
def test_codespell(self):
16-
print("\nCodespell simple test")
15+
def test_comment_spell_check(self):
16+
print("\nCommand_spell_check simple test")
1717
cwd = os.getcwd()
1818
print(cwd)
1919
runresult = subprocess.run(
2020
[
2121
"python",
22-
"codespell.py",
22+
"comment_spell_check.py",
2323
"--verbose",
2424
"--dict",
2525
"tests/dict.txt",
@@ -30,15 +30,15 @@ def test_codespell(self):
3030
)
3131
print("Return code:", runresult.returncode)
3232
if runresult.returncode:
33-
self.fail("Simple test: codespell process returned bad code")
33+
self.fail("Simple test: comment_spell_check.py process returned bad code")
3434

35-
print("\nCodespell test on itself")
35+
print("\nComment_spell_check test on itself")
3636
cwd = os.getcwd()
3737
print(cwd)
3838
runresult = subprocess.run(
3939
[
4040
"python",
41-
"codespell.py",
41+
"comment_spell_check.py",
4242
"--verbose",
4343
"--prefix",
4444
"myprefix",
@@ -51,4 +51,6 @@ def test_codespell(self):
5151
)
5252
print("Return code:", runresult.returncode)
5353
if runresult.returncode:
54-
self.fail("Self code test: codespell process returned bad code")
54+
self.fail(
55+
"Self code test: comment_spell_check.py process returned bad code"
56+
)

0 commit comments

Comments
 (0)