feat: add trust graph fetcher for social trust network generation#35
Open
MuddyBootsCode wants to merge 1 commit intographgeeks-lab:mainfrom
Open
feat: add trust graph fetcher for social trust network generation#35MuddyBootsCode wants to merge 1 commit intographgeeks-lab:mainfrom
MuddyBootsCode wants to merge 1 commit intographgeeks-lab:mainfrom
Conversation
Add TrustGraphFetcher that generates directed social trust graphs with realistic topology including community structure (SBM), preferential attachment, configurable reciprocity, organic distrust edges, and adversarial bot clusters. Optimized with numpy/scipy for scalability to 100k+ nodes. - New fetcher: graphfaker/fetchers/trust.py (683 lines) - 34 unit tests covering all pipeline stages - CLI integration with full parameter exposure - Core dispatcher wired for source="trust" - numpy added as explicit dependency - Fixed cli.py logger import (was importing from venv) - Fixed error message in generate_graph() to list all sources Co-Authored-By: Claude Opus 4.6 <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
TrustGraphFetcher— a new fetcher that generates directed social trust graphs with realistic topologyWhat's Included
graphfaker/fetchers/trust.py(683 lines) — Full trust graph generation pipeline:tests/test_fetchers_trust.py(355 lines) — 34 unit tests covering all pipeline stagesIntegration — Wired into
core.pydispatcher,cli.pywith full parameter exposure,enums.pywith TRUST typeBug fixes — Fixed
cli.pylogger import (from venv import logger→from graphfaker.logger import logger), updated error message ingenerate_graph()to list all sourcesDependencies — Added
numpy>=1.24.0topyproject.toml(was transitive via networkx, now explicit)Usage
Key Topology Properties (10k nodes, seed=42)
Test plan
pytest tests/test_fetchers_trust.py)pytest tests/)graphfaker gen --fetcher trust --total-users 1000 --seed 42🤖 Generated with Claude Code