{"id":20513335,"url":"https://github.com/xserban/graphrepo","last_synced_at":"2026-03-17T22:31:30.224Z","repository":{"id":47483725,"uuid":"170983427","full_name":"xserban/GraphRepo","owner":"xserban","description":"Github repo to Neo4j (and back)","archived":false,"fork":false,"pushed_at":"2021-08-30T03:59:45.000Z","size":371,"stargazers_count":19,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-03-27T13:51:33.648Z","etag":null,"topics":["git","graph","neo4j","pydriller","repository-mining","software-engineering"],"latest_commit_sha":null,"homepage":"https://graphrepo.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xserban.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-16T09:02:08.000Z","updated_at":"2024-08-27T09:06:45.000Z","dependencies_parsed_at":"2022-08-19T21:40:36.695Z","dependency_job_id":null,"html_url":"https://github.com/xserban/GraphRepo","commit_stats":null,"previous_names":["nullconvergence/graphrepo"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xserban%2FGraphRepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xserban%2FGraphRepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xserban%2FGraphRepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xserban%2FGraphRepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xserban","download_url":"https://codeload.github.com/xserban/GraphRepo/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799713,"owners_count":21163398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","graph","neo4j","pydriller","repository-mining","software-engineering"],"created_at":"2024-11-15T21:10:13.618Z","updated_at":"2026-03-17T22:31:30.212Z","avatar_url":"https://github.com/xserban.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphRepo ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square) [![BCH compliance](https://bettercodehub.com/edge/badge/NullConvergence/GraphRepo?branch=develop)](https://bettercodehub.com/)\n\nGraphRepo is a tool for mining software repositories in real time. It indexes Git repositories in Neo4j and implements multiple queries to select and process the repository data.\n\nFor a complete description, see the [online documentation](https://graphrepo.readthedocs.io/en/latest/).\n\u003c!-- For a [demo](https://github.com/NullConvergence/GraphRepo-Demo) using Jupyter notebooks follow this [link](https://github.com/NullConvergence/GraphRepo-Demo) or see the [video demo](https://www.youtube.com/watch?v=x1ha0fRltGI). --\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/NullConvergence/GraphRepo/develop/docs/source/GraphRepoSchema.svg\"\u003e\n\u003c/p\u003ex\n\n###  1. Installation \u0026 First run\n\n#### 1.1 Prereq\nThe only requirement is to have Python \u003e=3.5 and Docker installed on your system.\n\n#### 1.2 Install using pip\n\nThe production release can be installed using pip:\n\n```\n$ pip install graphrepo\n```\n\n\u003c!--\n#### Alternative: Install the development version\n\nNote that the development version may have new, but unreliable or poorly documented features.\n\n```\n$ git clone --recurse-submodules https://github.com/NullConvergence/GraphRepo\n$ cd graphrepo/\n$ pip install -r requirements.txt\n```\n--\u003e\n\n\n#### 1.3 Run and configure Neo4j\n\nThe following instructions assume the Docker daemon is running on your machine:\n\n```\n$ docker run -p 7474:7474 -p 7687:7687 -v $HOME/neo4j/data:/data -v $HOME/neo4j/plugins:/plugins  -e NEO4JLABS_PLUGINS=\\[\\\"apoc\\\"\\]   -e NEO4J_AUTH=neo4j/neo4jj neo4j:3.5.11\n```\n\nOpen a browser window and go to [http://localhost:7474](http://localhost:7474). Here you can configure the neo4j password.\nThe default one is *neo4jj*.\n\n##### Optionally, configure Neo4j to allow larger heap size using the following attributes with the command above:\n\n```\n--env NEO4J_dbms_memory_pagecache_size=4g\n--env NEO4J_dbms_memory_heap_max__size=4g\n```\n\n#### 1.4. Index and vizualize a repo\n\nIn order to index a repository, you must clone it on localhost, and point GraphRepo to it. For example:\n```\n$ mkdir repos\n$ cd repos\n$ git clone https://github.com/ishepard/pydriller\n```\n\nNow enter the [examples](/examples) folder from this repository, and edit the configuration file for PyDriller to reflect the database URL and desired batch size:\n```\n$ cd ../examples/\n$ nano configs/pydriller.yml\n```\n\nAfterwards, we can run the script from the examples folder which indexes the repository in Neo4j:\n\n```\n$ python -m examples.index_all --config=examples/configs/pydriller.yml\n```\n\nGo to [http://localhost:7474](http://localhost:7474) and use the query from 3.1\n\n\n#### 1.5. Retrieve all data from Neo4j using GraphRepo\n\nAssuming you succeded in step 1.4, use the follwing command to retrieve all indexed data:\n\n```\n$ python -m examples.mine_all --config=examples/configs/pydriller.yml\n```\n\n\n### 2. Examples\n\nFor a comprehensive introduction and more examples, see the [documentation](https://graphrepo.readthedocs.io/en/latest/examples.html).\n\n\n\n### 3. Useful Neo4j queries for the web interface\n\n#### 3.1 Match all nodes in a graph\n```\nMATCH (n) RETURN n\n```\n\n\n#### 3.2 Delete all nodes and relationships in a graph\n\n```\nMATCH (n) DETACH DELETE n;\n```\n\n#### 3.2 Delete a limited number commits and relationship\n\n```\nMATCH (n:Commit)\n// Take the first 100 commits nodes and their rels\nWITH n LIMIT 100\nDETACH DELETE n\nRETURN count(*);\n```\n\n\n\nThis project is enabled by [Pydriller](https://github.com/ishepard/pydriller).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxserban%2Fgraphrepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxserban%2Fgraphrepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxserban%2Fgraphrepo/lists"}