Skip to content

Commit 14f7eed

Browse files
authored
chore: add typos spell checker (#58)
* chore: add typos spell checker configuration - Add typos.toml configuration file - Add typos CI job to workflow - Add typos and typos-lsp to flake.nix devShell - Enable typos in treefmt - Add just typos command * chore: fix typos (UK to US English spelling) - optimised → optimized - Initialise → Initialize - behavioural → behavioral - behaviour → behavior - Analyse → Analyze * chore: use just typos command in CI * chore: add --config typos.toml to just commands
1 parent 38a9dd6 commit 14f7eed

File tree

6 files changed

+44
-6
lines changed

6 files changed

+44
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ permissions:
1414
contents: read
1515

1616
jobs:
17+
typos:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
22+
23+
- name: Setup Nix
24+
uses: ./.github/actions/setup-nix
25+
26+
- name: Run Typo Check
27+
run: nix develop --command just typos
28+
1729
ci:
1830
runs-on: ubuntu-latest
1931
strategy:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ uv add 'stackone-ai[mcp,examples]'
7373
```python
7474
from stackone_ai import StackOneToolSet
7575

76-
# Initialise with API key
76+
# Initialize with API key
7777
toolset = StackOneToolSet() # Uses STACKONE_API_KEY env var
7878
# Or explicitly: toolset = StackOneToolSet(api_key="your-api-key")
7979

@@ -133,11 +133,11 @@ tools = toolset.fetch_tools(providers=["hibob"])
133133

134134
## Implicit Feedback (Beta)
135135

136-
The Python SDK can emit implicit behavioural feedback to LangSmith so you can triage low-quality tool results without manually tagging runs.
136+
The Python SDK can emit implicit behavioral feedback to LangSmith so you can triage low-quality tool results without manually tagging runs.
137137

138138
### Automatic configuration
139139

140-
Set `LANGSMITH_API_KEY` in your environment and the SDK will initialise the implicit feedback manager on first tool execution. You can optionally fine-tune behaviour with:
140+
Set `LANGSMITH_API_KEY` in your environment and the SDK will initialize the implicit feedback manager on first tool execution. You can optionally fine-tune behavior with:
141141

142142
- `STACKONE_IMPLICIT_FEEDBACK_ENABLED` (`true`/`false`, defaults to `true` when an API key is present)
143143
- `STACKONE_IMPLICIT_FEEDBACK_PROJECT` to pin a LangSmith project name
@@ -187,7 +187,7 @@ StackOne tools work seamlessly with LangChain, enabling powerful AI agent workfl
187187
from langchain_openai import ChatOpenAI
188188
from stackone_ai import StackOneToolSet
189189

190-
# Initialise StackOne tools
190+
# Initialize StackOne tools
191191
toolset = StackOneToolSet()
192192
tools = toolset.fetch_tools(actions=["hris_*"], account_ids=["your-account-id"])
193193

@@ -282,7 +282,7 @@ langchain_tools = tools.to_langchain()
282282
# Create CrewAI agent with StackOne tools
283283
agent = Agent(
284284
role="HR Manager",
285-
goal="Analyse employee data and generate insights",
285+
goal="Analyze employee data and generate insights",
286286
backstory="Expert in HR analytics and employee management",
287287
tools=langchain_tools,
288288
llm="gpt-4o-mini"

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"CHANGELOG.md"
5555
];
5656
};
57+
typos.enable = true;
5758
};
5859
};
5960

@@ -81,6 +82,8 @@
8182
uv
8283
just
8384
nixfmt-rfc-style
85+
typos
86+
typos-lsp
8487
];
8588

8689
shellHook = ''

justfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ test-examples:
2626
mypy:
2727
uv run mypy stackone_ai
2828

29+
# Run typos spell checker
30+
typos:
31+
typos --config typos.toml .
32+
33+
# Fix typos
34+
typos-fix:
35+
typos --config typos.toml --write-changes .
36+
2937
# Update version in __init__.py
3038
update-version:
3139
uv run scripts/update_version.py

stackone_ai/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Hybrid search default weight for BM25 vs TF-IDF
22
# alpha=0.2 means: 20% BM25 + 80% TF-IDF
3-
# This value was optimised through validation testing and provides
3+
# This value was optimized through validation testing and provides
44
# 10.8% improvement in tool discovery accuracy
55
DEFAULT_HYBRID_ALPHA: float = 0.2

typos.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[default]
2+
locale = 'en-us'
3+
extend-ignore-re = [
4+
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
5+
"(?s)<!--\\s*spellchecker:off.*?\\n\\s*spellchecker:on\\s*-->",
6+
"(?Rm)^.*#\\s*spellchecker:disable-line$",
7+
"(?m)^.*<!--\\s*spellchecker:disable-line\\s*-->\\n.*$"
8+
]
9+
10+
[files]
11+
extend-exclude = [
12+
".venv",
13+
"uv.lock",
14+
"CHANGELOG.md",
15+
]

0 commit comments

Comments
 (0)