From bc8afe1204f75e2290bee2378f4ede655768027d Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:28:09 +0000 Subject: [PATCH 1/4] 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 --- .github/workflows/ci.yml | 12 ++++++++++++ flake.nix | 3 +++ justfile | 4 ++++ typos.toml | 15 +++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 typos.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 963ec73..9f8d1da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 typos . + ci: runs-on: ubuntu-latest strategy: 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 02ec5dd..ae1ce00 100644 --- a/justfile +++ b/justfile @@ -25,3 +25,7 @@ test-examples: # Run type checking mypy: uv run mypy stackone_ai + +# Run typos spell checker +typos: + typos . 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", +] From 03c6541197b8474926025ee2356d046b7475ae83 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:28:31 +0000 Subject: [PATCH 2/4] chore: fix typos (UK to US English spelling) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - optimised → optimized - Initialise → Initialize - behavioural → behavioral - behaviour → behavior - Analyse → Analyze --- README.md | 10 +++++----- justfile | 4 ++++ stackone_ai/constants.py | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) 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/justfile b/justfile index ae1ce00..52d0bbd 100644 --- a/justfile +++ b/justfile @@ -29,3 +29,7 @@ mypy: # Run typos spell checker typos: typos . + +# Fix typos +typos-fix: + typos --write-changes . 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 From 647f6041ae7670eac32e6ca1df376da6781203ba Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:30:04 +0000 Subject: [PATCH 3/4] chore: use just typos command in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f8d1da..21eb30f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: uses: ./.github/actions/setup-nix - name: Run Typo Check - run: nix develop --command typos . + run: nix develop --command just typos ci: runs-on: ubuntu-latest From 16a073d8304d130f2945854c2baceca4932a5990 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:30:21 +0000 Subject: [PATCH 4/4] chore: add --config typos.toml to just commands --- justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 52d0bbd..f5f54a9 100644 --- a/justfile +++ b/justfile @@ -28,8 +28,8 @@ mypy: # Run typos spell checker typos: - typos . + typos --config typos.toml . # Fix typos typos-fix: - typos --write-changes . + typos --config typos.toml --write-changes .