diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d2f74fe..a5fa0b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,18 @@ permissions: contents: read jobs: + typos: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + + - name: Setup Nix + uses: ./.github/actions/setup-nix + + - name: Run Typo Check + run: nix develop --command just typos + ci: runs-on: ubuntu-latest strategy: diff --git a/README.md b/README.md index a822426..e4af614 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ uv add 'stackone-ai[mcp,examples]' ```python from stackone_ai import StackOneToolSet -# Initialise with API key +# Initialize with API key toolset = StackOneToolSet() # Uses STACKONE_API_KEY env var # Or explicitly: toolset = StackOneToolSet(api_key="your-api-key") @@ -133,11 +133,11 @@ tools = toolset.fetch_tools(providers=["hibob"]) ## Implicit Feedback (Beta) -The Python SDK can emit implicit behavioural feedback to LangSmith so you can triage low-quality tool results without manually tagging runs. +The Python SDK can emit implicit behavioral feedback to LangSmith so you can triage low-quality tool results without manually tagging runs. ### Automatic configuration -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: +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: - `STACKONE_IMPLICIT_FEEDBACK_ENABLED` (`true`/`false`, defaults to `true` when an API key is present) - `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 from langchain_openai import ChatOpenAI from stackone_ai import StackOneToolSet -# Initialise StackOne tools +# Initialize StackOne tools toolset = StackOneToolSet() tools = toolset.fetch_tools(actions=["hris_*"], account_ids=["your-account-id"]) @@ -282,7 +282,7 @@ langchain_tools = tools.to_langchain() # Create CrewAI agent with StackOne tools agent = Agent( role="HR Manager", - goal="Analyse employee data and generate insights", + goal="Analyze employee data and generate insights", backstory="Expert in HR analytics and employee management", tools=langchain_tools, llm="gpt-4o-mini" diff --git a/flake.nix b/flake.nix index 7f50eb8..b9e3670 100644 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,7 @@ "CHANGELOG.md" ]; }; + typos.enable = true; }; }; @@ -81,6 +82,8 @@ uv just nixfmt-rfc-style + typos + typos-lsp ]; shellHook = '' diff --git a/justfile b/justfile index 1a9d7e7..7021bda 100644 --- a/justfile +++ b/justfile @@ -26,6 +26,14 @@ test-examples: mypy: uv run mypy stackone_ai +# Run typos spell checker +typos: + typos --config typos.toml . + +# Fix typos +typos-fix: + typos --config typos.toml --write-changes . + # Update version in __init__.py update-version: uv run scripts/update_version.py diff --git a/stackone_ai/constants.py b/stackone_ai/constants.py index 2673762..a33428d 100644 --- a/stackone_ai/constants.py +++ b/stackone_ai/constants.py @@ -1,5 +1,5 @@ # Hybrid search default weight for BM25 vs TF-IDF # alpha=0.2 means: 20% BM25 + 80% TF-IDF -# This value was optimised through validation testing and provides +# This value was optimized through validation testing and provides # 10.8% improvement in tool discovery accuracy DEFAULT_HYBRID_ALPHA: float = 0.2 diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000..56ddf65 --- /dev/null +++ b/typos.toml @@ -0,0 +1,15 @@ +[default] +locale = 'en-us' +extend-ignore-re = [ + "(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on", + "(?s)", + "(?Rm)^.*#\\s*spellchecker:disable-line$", + "(?m)^.*\\n.*$" +] + +[files] +extend-exclude = [ + ".venv", + "uv.lock", + "CHANGELOG.md", +]