Skip to content

feat: Add __repr__ to key classes for better debugging - #6

Closed
by22Jy wants to merge 48 commits into
SynapseKit:mainfrom
by22Jy:add-repr-methods
Closed

by22Jy wants to merge 48 commits into
SynapseKit:mainfrom
by22Jy:add-repr-methods

Conversation

@by22Jy

@by22Jy by22Jy commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

This PR adds useful repr methods to core classes for better debugging.

Classes updated:

  • RAGPipeline - shows model name and splitter type
  • FunctionCallingAgent - shows LLM provider, tool count, max iterations
  • ReActAgent - shows LLM provider, tool count, max iterations
  • CompiledGraph - shows node count, edge count, entry point
  • StateGraph - shows node count and edge count

Closes #3

Build tooling:
- Replace poetry-core with hatchling build backend
- Migrate pyproject.toml to PEP 621 [project] format
- Add uv.lock, remove poetry.lock
- Dev dependencies moved to [dependency-groups]

Phase 4 — Graph Workflows:
- StateGraph fluent builder with compile-time validation + cycle detection
- CompiledGraph wave-based async executor (run/stream/run_sync)
- Node, Edge, ConditionalEdge — sync + async support
- agent_node(), rag_node() helpers
- Parallel node execution via asyncio.gather()
- Mermaid diagram export
- _MAX_STEPS=100 infinite loop guard
- 44 new tests (267 passing, 6 skipped)
Move RAG class and _make_llm() helper to synapsekit/rag/facade.py,
re-export from __init__.py to preserve all existing imports.
Add proper exports to llm/, loaders/, retrieval/, embeddings/,
memory/, and observability/ subpackages. LLM providers and optional-dep
loaders use __getattr__ lazy loading to avoid importing unavailable deps.
Move synapsekit/ package into src/synapsekit/ for proper isolation
between source and installed package. Update hatch build config.
Move 22 flat test files into subdirectories matching the source
package structure (llm/, rag/, agents/, graph/, retrieval/, etc.).
Add tests/conftest.py for shared fixtures.
Add ruff (lint + format), mypy (gradual typing), deptry (dep checking),
pytest-cov, and pre-commit to dev dependencies. Fix [all] extra to
include faiss-cpu, qdrant-client, and pinecone packages.
AmitoVrito and others added 18 commits March 12, 2026 00:02
Configure ruff (lint + format), mypy (gradual typing), deptry (dep
checking), and pytest-cov. Fix [all] extra to include faiss-cpu,
qdrant-client, and pinecone. Add dev dependencies for pre-commit.
Run ruff check --fix and ruff format across src/ and tests/.
Fix B904 (raise from None), remove unused imports, clean up
minor lint issues.
Add Makefile with install, lint, format, typecheck, test, deptry,
and check targets. Add .pre-commit-config.yaml with ruff, deptry,
and pre-commit-hooks.
Add CI with parallel jobs for lint (ruff check + format check),
typecheck (mypy), test (pytest), and deptry. All use astral-sh/setup-uv.
Add package_module_name_map for google-generativeai, beautifulsoup4,
and faiss-cpu. Ignore DEP001 for sqlalchemy and pydantic (optional).
Ignore DEP002 for optional deps listed in extras.
- Add call_with_tools() to BaseLLM as overridable method
- Fix async generator return type annotation in BaseLLM.stream()
- Add ignore_missing_imports for optional dependency modules
- Suppress override errors for providers using from __future__ annotations
- Fix ToolResult.__str__ return type, web loader return type, faiss attr
@AmitoVrito

Copy link
Copy Markdown
Collaborator

HI, could you please review it , the checks need to pass . thanks

@AmitoVrito

Copy link
Copy Markdown
Collaborator

Thanks for the contribution @by22Jy! This PR has been open for a while and targets the same issue as #5. Closing as stale — feel free to rebase and reopen against current main if you'd like to continue!

Also, if you'd like to support us, please follow and share our LinkedIn page: https://www.linkedin.com/company/112260098 — it really helps the project grow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add __repr__ to key classes for better debugging

2 participants