Skip to content

feat: add __repr__ methods to key classes (fixes #3) - #5

Closed
Arjunkundapur wants to merge 44 commits into
SynapseKit:mainfrom
Arjunkundapur:feat/add-repr-methods
Closed

Arjunkundapur wants to merge 44 commits into
SynapseKit:mainfrom
Arjunkundapur:feat/add-repr-methods

Conversation

@Arjunkundapur

Copy link
Copy Markdown
Contributor

Closes #3

Adds simple and useful __repr__ methods to the core classes for better debugging visibility:

  • RAGPipeline
  • FunctionCallingAgent
  • ReActAgent
  • CompiledGraph
  • StateGraph

Note: This contribution was executed entirely via the GitHub MCP Server connection.

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 14 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 also rebase onto current main ( asthe history was rewritten).

@AmitoVrito

Copy link
Copy Markdown
Collaborator

Thanks for the PR! The repr implementations look good — clean, useful, and exactly what the issue asked for.

One issue: your branch seems to be based on an older version of main (we recently rewrote the history. That's why the diff is showing every file as changed instead of just your repr additions.

Could you rebase onto the current main?Once the diff is clean, this is good to merge. Also noting there's a duplicate PR #6 for the same issue — I'll close that one.

@AmitoVrito

Copy link
Copy Markdown
Collaborator

Thanks for the effort @Arjunkundapur! This PR has been open for a while and the codebase has moved significantly since then, making it hard to merge cleanly. Closing this one for now — feel free to rebase and reopen if you'd like to pick it back up!

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