Skip to content

Commit fd1e014

Browse files
authored
Spell checking automation + fix typos (microsoft#977)
Spell checking automation: * Add typos checker to PR flow using https://github.com/marketplace/actions/typos-action * Fix existing typos * Add config file, with exclusions and exceptions: `.github/_typos.toml` The checker can be run locally, e.g. * Install: `brew install typos-cli` * Install: `conda install typos` Run: `typos -c .github/_typos.toml`
1 parent 9a90e45 commit fd1e014

19 files changed

Lines changed: 77 additions & 27 deletions

File tree

.github/_typos.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Typos configuration file
2+
#
3+
# Info: https://github.com/marketplace/actions/typos-action
4+
# Install: brew install typos-cli
5+
# Install: conda install typos
6+
# Run: typos -c .github/_typos.toml
7+
8+
[files]
9+
extend-exclude = [
10+
"_typos.toml",
11+
"package-lock.json",
12+
"*.bicep",
13+
"encoder.json",
14+
"vocab.bpe",
15+
"GPT3TokenizerTests.cs",
16+
"CodeTokenizerTests.cs",
17+
"test_code_tokenizer.py",
18+
]
19+
20+
[default.extend-words]
21+
ACI = "ACI" # Azure Container Instance

.github/workflows/typos.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Check pull requests for typos.
2+
#
3+
# Configuration: .github/_typos.toml
4+
#
5+
# Info: https://github.com/marketplace/actions/typos-action
6+
# Local install: brew install typos-cli
7+
# Local install: conda install typos
8+
# Local run: typos -c .github/_typos.toml
9+
10+
name: Spell Check
11+
12+
on:
13+
workflow_dispatch:
14+
pull_request:
15+
branches: [ "main", "feature*" ]
16+
17+
jobs:
18+
run:
19+
name: Spell Check with Typos
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check out code
23+
uses: actions/checkout@v3
24+
25+
- name: Use custom config file
26+
uses: crate-ci/typos@master
27+
with:
28+
config: .github/_typos.toml
29+
write_changes: false

dotnet/src/Connectors/Connectors.AI.OpenAI/Tokenizers/GPT3Tokenizer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static List<int> Encode(string text)
9292
}
9393
}
9494

95-
// Ensure we have a sufficient Span<char> buffer to accomodate maxUtf8Length chars.
95+
// Ensure we have a sufficient Span<char> buffer to accommodate maxUtf8Length chars.
9696
// The byte-to-char mapping scheme employed is 1:1, so we'll end up needing 1 char
9797
// for every 1 UTF8 byte. If we can reasonably stack-allocate the space, we do, otherwise
9898
// we temporarily rent a pooled array.

dotnet/src/IntegrationTests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
and deploy an instance of Azure OpenAI, deploy a model like "text-davinci-003" find your Endpoint and API key.
77
2. **OpenAI**: go to [OpenAI](https://openai.com/api/) to register and procure your API key.
88
3. **HuggingFace API key**: see https://huggingface.co/docs/huggingface_hub/guides/inference for details.
9-
4. **Azure Bing Web Search API**: go to [Bing Web Seach API](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)
9+
4. **Azure Bing Web Search API**: go to [Bing Web Search API](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)
1010
and select `Try Now` to get started.
1111

1212
## Setup

dotnet/src/SemanticKernel.Abstractions/SemanticKernel.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<!--Setting version overrides to miniumum supported version, to maximize compatability.-->
19+
<!--Setting version overrides to minimum supported version, to maximize compatibility.-->
2020
<PackageReference Include="Microsoft.Bcl.HashCode" VersionOverride="[1.1.0, )" />
2121
<PackageReference Include="Microsoft.Extensions.Logging" VersionOverride="[6.0.0, )" />
2222
<PackageReference Include="System.Linq.Async" VersionOverride="[6.0.1, )" />

python/semantic_kernel/text/text_chunker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _split_list(
224224
text: List[str], max_tokens: int, separators: List[str], trim: bool
225225
) -> List[str]:
226226
"""
227-
Split list of sring into lines.
227+
Split list of string into lines.
228228
"""
229229
if not text:
230230
return []

python/tests/unit/text/test_text_chunker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ def test_split_paragraph_spaces():
319319
assert expected == split
320320

321321

322-
def test_split_paragraph_hypens():
322+
def test_split_paragraph_hyphens():
323323
"""
324-
a plaintext example that splits on hypens
324+
a plaintext example that splits on hyphens
325325
"""
326326
text = [
327327
"This is a test of the emergency broadcast system-This is only a test",

samples/apps/book-creator-webapp-react/src/components/TaskButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const TaskButton: FC<IData> = ({
3434
uri,
3535
skills,
3636
}) => {
37-
const maxSteps = 10; //this is the maximum number of iterations planner will take while attemping to solve
37+
const maxSteps = 10; //this is the maximum number of iterations planner will take while attempting to solve
3838
const sk = useSemanticKernel(uri);
3939
const taskRunner = useTaskRunner(sk, keyConfig, maxSteps);
4040
const [isBusy, setIsBusy] = useState<boolean>(false);

samples/apps/copilot-chat-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ The WebApp can display this error when the application is configured for an acti
114114
115115
## 2. Issues using text completion models, such as `text-davinci-003`
116116
CopilotChat supports chat completion models, such as `gpt-3.5-*` and `gpt-4-*`.
117-
See [OpenAI's model compatiblity](https://platform.openai.com/docs/models/model-endpoint-compatibility) for
117+
See [OpenAI's model compatibility](https://platform.openai.com/docs/models/model-endpoint-compatibility) for
118118
the complete list of current models supporting chat completions.
119119

120120
## 3. Localhost SSL certificate errors

samples/apps/copilot-chat-app/webapi/Skills/OpenApiSkills/JiraSkill/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@
391391
},
392392
"name": {
393393
"type": "string",
394-
"x-ms-summary": "Name fo the issue resolution"
394+
"x-ms-summary": "Name of the issue resolution"
395395
}
396396
},
397397
"x-ms-summary": "Resolution",

0 commit comments

Comments
 (0)