Skip to content

Commit fafaf71

Browse files
d4l3kfacebook-github-bot
authored andcommitted
spellcheck: add a spellcheck script + apply spelling fixes (#58)
Summary: This adds a `script/spellcheck.sh` which runs through all the files and validates that there are no spelling mistakes. The wordlist is rather specific so not setting up any CI for this since it's a pretty high burden per commit to keep the wordlist up to date. Pull Request resolved: #58 Test Plan: ``` scripts/spellcheck.sh scripts/lint.sh pyre pytest ``` Reviewed By: kiukchung Differential Revision: D29143908 Pulled By: d4l3k fbshipit-source-id: 707a07fb2d77b90557ba819c9859f5d6e5c9a8a0
1 parent 9fe85e1 commit fafaf71

File tree

21 files changed

+600
-39
lines changed

21 files changed

+600
-39
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,5 @@ dmypy.json
136136

137137
# Cython debug symbols
138138
cython_debug/
139+
140+
wordlist.dic

examples/apps/lightning_classy_vision/component.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def interpret(
6363
output_path: str,
6464
resource: Optional[str] = None,
6565
) -> torchx.AppDef:
66-
"""Runs the model intepretability app on the model outputted by the training
66+
"""Runs the model interpretability app on the model outputted by the training
6767
component.
6868
6969
Args:
@@ -74,7 +74,7 @@ def interpret(
7474
resource: the resources to use
7575
"""
7676
return binary_component(
77-
name="examples-lightning_classy_vision-intepret",
77+
name="examples-lightning_classy_vision-interpret",
7878
entrypoint="lightning_classy_vision/interpret.py",
7979
args=[
8080
"--load_path",

examples/apps/lightning_classy_vision/interpret.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
=============================================
1111
1212
This is an example TorchX app that uses captum to analyze inputs to for model
13-
intepretability purposes. It consumes the trained model from the trainer app
13+
interpretability purposes. It consumes the trained model from the trainer app
1414
example and the preprocessed examples from the datapreproc app example. The
1515
output is a series of images with integrated gradient attributions overlayed on
1616
them.

examples/pipelines/kfp/kfp_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
)
5050

5151
# %%
52-
# Most TorchX compnents use
52+
# Most TorchX components use
5353
# `fsspec <https://filesystem-spec.readthedocs.io/en/latest/>`_ to abstract
5454
# away dealing with remote filesystems. This allows the components to take
5555
# paths like `s3://` to make it easy to use cloud storage providers.

scripts/spellcheck.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Copyright (c) Facebook, Inc. and its affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
set -ex
9+
10+
pyspelling -c scripts/spellcheck_conf/spellcheck.yaml
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
matrix:
2+
- name: JavaScript
3+
sources:
4+
- 'docs/source/**/*.js'
5+
expect_match: false
6+
aspell:
7+
lang: en
8+
dictionary:
9+
wordlists:
10+
- scripts/spellcheck_conf/wordlist.txt
11+
output: scripts/spellcheck_conf/wordlist.dic
12+
encoding: utf-8
13+
pipeline:
14+
- pyspelling.filters.javascript:
15+
jsdocs: true
16+
line_comments: true
17+
block_comments: true
18+
group_comments: false
19+
decode_escapes: true
20+
strings: false
21+
- name: HTML
22+
sources:
23+
- 'docs/source/**/*.html'
24+
expect_match: false
25+
apsell:
26+
mode: en
27+
dictionary:
28+
wordlists:
29+
- scripts/spellcheck_conf/wordlist.txt
30+
output: scripts/spellcheck_conf/wordlist.dic
31+
encoding: utf-8
32+
pipeline:
33+
- pyspelling.filters.html:
34+
comments: true
35+
attributes:
36+
- title
37+
- alt
38+
ignores:
39+
- ':matches(code, pre)'
40+
- 'code'
41+
- 'pre'
42+
- name: Markdown
43+
expect_match: false
44+
apsell:
45+
mode: en
46+
dictionary:
47+
wordlists:
48+
- scripts/spellcheck_conf/wordlist.txt
49+
output: scripts/spellcheck_conf/wordlist.dic
50+
encoding: utf-8
51+
pipeline:
52+
- pyspelling.filters.markdown:
53+
markdown_extensions:
54+
- markdown.extensions.extra:
55+
- pyspelling.filters.html:
56+
comments: true
57+
attributes:
58+
- title
59+
- alt
60+
ignores:
61+
- ':matches(code, pre)'
62+
- 'code'
63+
- 'pre'
64+
sources:
65+
- '**/*.md'
66+
- name: RST
67+
expect_match: false
68+
apsell:
69+
mode: en
70+
dictionary:
71+
wordlists:
72+
- scripts/spellcheck_conf/wordlist.txt
73+
output: scripts/spellcheck_conf/wordlist.dic
74+
encoding: utf-8
75+
pipeline:
76+
- pyspelling.filters.markdown:
77+
markdown_extensions:
78+
- markdown.extensions.extra:
79+
- pyspelling.filters.html:
80+
comments: true
81+
attributes:
82+
- title
83+
- alt
84+
ignores:
85+
- ':matches(code, pre)'
86+
- 'code'
87+
- 'pre'
88+
sources:
89+
- 'docs/source/**/*.rst'
90+
- name: python
91+
pipeline:
92+
- pyspelling.filters.python:
93+
strings: true
94+
sources:
95+
- "{examples,scripts,torchx}/**/*.py"
96+
apsell:
97+
mode: en
98+
dictionary:
99+
wordlists:
100+
- scripts/spellcheck_conf/wordlist.txt
101+
output: scripts/spellcheck_conf/wordlist.dic
102+
encoding: utf-8

0 commit comments

Comments
 (0)