v0.7.0 release prep: 100% coverage, batch tools, typed mode, deprecation fix#27
Merged
jackparnell merged 2 commits intomainfrom Apr 12, 2026
Merged
v0.7.0 release prep: 100% coverage, batch tools, typed mode, deprecation fix#27jackparnell merged 2 commits intomainfrom
jackparnell merged 2 commits intomainfrom
Conversation
…ion fix
1. 100% test coverage across the entire package
- tests/test_coverage_gaps.py — targeted tests for error paths in
tools.py (50+ tools with sync+async error branches), small branches
in callbacks.py, async paths in events.py and retriever.py, and
lazy imports in __init__.py
- All 8 source modules now at 100% line coverage (was 91%)
- 377 tests passing, up from 270
2. Two new batch tools wrapping colony-sdk 1.7.0 helpers
- colony_get_posts_by_ids — fetch multiple posts in one call,
skipping any that 404
- colony_get_users_by_ids — same for user profiles
- Toolkit now ships 29 tools (11 read + 18 write), up from 27
3. typed=True passthrough on both ColonyToolkit and AsyncColonyToolkit
- ColonyToolkit(api_key="col_...", typed=True) constructs the
underlying ColonyClient with typed=True for SDK 1.7.0 typed
response models
4. LangGraph V1.0 deprecation warning fix
- agent.py now imports langchain.agents.create_agent first (the new
path) and falls back to langgraph.prebuilt.create_react_agent
- The fallback's deprecation warning is suppressed at the call site
so users don't see noise on import/use
CHANGELOG entry added for v0.7.0. Version bumped 0.6.0 → 0.7.0.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CI test matrix was failing on all 4 Python versions because:
1. tests/test_coverage_gaps.py imported create_colony_agent at module top
2. That triggered langchain_colony.agent's import of langgraph
3. CI didn't install langgraph (not in dev or async extras)
4. Test collection failed with ModuleNotFoundError
Two fixes:
1. Use pytest.importorskip("langgraph") inside the lazy-import test
instead of importing at module top, so the file collects cleanly even
without langgraph installed.
2. Add `langgraph>=0.2.0` to the dev extra so CI runs the agent tests
instead of skipping them via pytest.importorskip in test_agent.py.
Also add a new `agent` optional extra (`pip install langchain-colony[agent]`)
for users who want the pre-built create_colony_agent without going
through the dev install.
377 tests still pass locally with 100% coverage. CI should now report
real coverage on agent.py (was being skipped silently before).
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! |
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
Releases prep for v0.7.0 — covers all four items requested before tagging:
langchain_colonypackage (was 91%)colony-sdk1.7.0 helperstyped=Truepassthrough on both toolkitscreate_react_agentPlus CHANGELOG entry and version bump 0.6.0 → 0.7.0.
Coverage
__init__.pyagent.pycallbacks.pyevents.pymodels.pyretriever.pytoolkit.pytools.pyNew
tests/test_coverage_gaps.pyadds targeted tests for:_runand_arun(~50 tests)_format_poll/_format_webhooksnon-dict input branches_aenrich_with_commentsexception swallowing__init__.pylazy import ofcreate_colony_agent377 tests passing (up from 270).
New batch tools
colony_get_posts_by_idsColonyClient.get_posts_by_ids()colony_get_users_by_idsColonyClient.get_users_by_ids()Both silently skip 404s (the SDK helper does this). Toolkit now ships 29 tools (11 read + 18 write), up from 27.
typed=True passthrough
Also works on
AsyncColonyToolkit. Ignored whenclient=is also passed (the injected client wins).LangGraph V1.0 deprecation fix
agent.pynow triesfrom langchain.agents import create_agentfirst, falling back tofrom langgraph.prebuilt import create_react_agentfor users without thelangchainpackage. The fallback's deprecation warning is suppressed at the call site so users don't see noise on import/use.Test plan
Once this lands, the next release tag (
v0.7.0) will trigger the existing release.yml workflow.🤖 Generated with Claude Code