Git graph to networkx
Project description
Git-NetworkX
Port of https://github.com/hoduche/git-graph to NetworkX
Install
PyPi
pip install git-networkx
Git
pip install git+https://github.com/CircArgs/git-networkx.git
Demo
from networkx.drawing.nx_pydot import write_dot
import git_networkx.git_networkx as gnx
#everything
All = gnx.GitNX('my/repo/path/that/has/a/.git')
write_dot(All, "myrepo.dot")
#Commits
Commits = gnx.GitNX('my/repo/path/that/has/a/.git', "c")
write_dot(Commits, "mycommits.dot")
Node Types
Node Type | Letter | Node Type | Letter |
---|---|---|---|
blob | b | remote branch | r |
tree | t | remote head | d |
commit | c | remote server | s |
local branch | l | annotated tag | a |
local head | h | tag | g |
upstream link | u |
By default all nodes are added to the DiGraph.
# you can get your commits, branches and the head of your local repo simply with lch
G=gnx.GitNX('../git_networkx_test/', "lch")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
git-networkx-2.0.1.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for git_networkx-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 784bef9e42d47ca5264f18dac2f5be5931a7ea4c6e839050ccabb1d951db9708 |
|
MD5 | 173a9d6cdef289de09b31059f0128ec9 |
|
BLAKE2b-256 | d04ecdc4c2a8074aadf8d742c2986a97d1622f5bedc079cd7c4f59483c594b45 |