Add batch read tools and bump colony-sdk to 1.7.1#19
Merged
jackparnell merged 4 commits intomainfrom Apr 12, 2026
Merged
Conversation
Adds the two batch read tools that landed in colony-sdk 1.7.0 (`get_posts_by_ids` / `get_users_by_ids`) so crews can fan out known-ID lookups in one call instead of N sequential `get_post`s. - ColonyGetPostsByIds → colony_get_posts_by_ids - ColonyGetUsersByIds → colony_get_users_by_ids Both wired into READ_TOOLS so they ship automatically with ColonyToolkit / AsyncColonyToolkit. Tool count is now 33 (15 read + 18 write), up from 31. Bumps the colony-sdk floor to >=1.7.1 (skipping the brief 1.7.0 `dict | Model` return-type union that broke downstream mypy runs). Adds a `[dev]` optional-deps extra so `pip install -e ".[dev]"` resolves the full dev/test toolchain in one command, matching the pattern used by langchain-colony and smolagents-colony. 214 tests (was 204), 100% line coverage held. mypy clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Brings the CI workflow in line with langchain-colony and smolagents-colony: - Named jobs for clearer GitHub UI (lint / typecheck / Test (Python X.Y)). - Explicit `permissions: contents: read` at the top level. - Install steps switched from listing dependencies inline (`pip install mypy colony-sdk crewai`, `pip install colony-sdk crewai pytest pytest-asyncio pytest-cov`) to `pip install -e ".[dev]"`, which now resolves the full toolchain in one step thanks to the [dev] extra added in the previous commit. No behaviour change — the same jobs run with the same Python matrix on the same triggers. Pure tidy-up. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CI workflow standardisation landed in the previous commit after all, so put the changelog entry back. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Branch protection on main requires status contexts named
`test (3.10)` / `test (3.11)` / `test (3.12)` / `test (3.13)` —
the lowercase, auto-generated form GitHub produces from a matrix
when no explicit `name:` is set.
The previous commit added `name: Test (Python ${{ matrix.python-version }})`
which produced contexts like `Test (Python 3.10)` instead, and those
weren't matching the required-status-checks list. PR #19 was sitting
green-but-blocked because the required contexts were never reported.
Fix: drop the `name:` line and let the matrix generate the expected
contexts. Added a comment so the next person who tries to "tidy up"
the job name doesn't repeat the same mistake.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ColonyGetPostsByIdsandColonyGetUsersByIds— wraps the batch endpoints that landed incolony-sdk1.7.0 (get_posts_by_ids/get_users_by_ids). Crews can now fan out known-ID lookups in one call instead of N sequentialcolony_get_posts. Both wired intoREAD_TOOLSso they ship automatically withColonyToolkit/AsyncColonyToolkit. Tool count is now 33 (15 read + 18 write), up from 31.colony-sdkfloor to>=1.7.1(skipping the brief 1.7.0dict | Modelreturn-type union that broke downstreammypyruns — seecolony-sdk-python1.7.1 release notes).[dev]optional-deps extra sopip install -e ".[dev]"resolves the full dev/test toolchain in one command, matching the pattern inlangchain-colonyandsmolagents-colony.permissions: contents: read, install steps now usepip install -e ".[dev]". Same matrix, same triggers, no behaviour change.Compatibility
Fully backward compatible. The two new tools are additive; the SDK bump from 1.5.0 → 1.7.1 is safe (1.7.1 explicitly reverted the only breaking change from 1.7.0).
Test plan
pytest -q— 214 tests pass (was 204; 10 new tests covering the two batch tools: happy path, empty result, defensive non-list response, typed-error formatting, native-async dispatch)pytest --cov=crewai_colony— 100% line coverage held across all 6 source filesmypy src/— cleanruff check src/ tests/— cleanruff format --check src/ tests/— cleanpip install -e ".[dev]"resolves cleanly in a brand-new venv🤖 Generated with Claude Code