Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency graph #200

Closed
smanders opened this issue Jul 10, 2018 · 4 comments
Closed

dependency graph #200

smanders opened this issue Jul 10, 2018 · 4 comments
Assignees
Milestone

Comments

@smanders
Copy link
Owner

it would be helpful to have a graphviz (.dot) dependency graph for the projects in externpro

eventually maybe the .dot can be cmake-generated?

I also don't want to commit a binary image (.png) to the repo as that would bloat the repo over time - so I've been exploring options to render the .dot file into the README.md file...

to create a png file:

dot -Tpng -odeps.png deps.dot
@smanders smanders added this to the current milestone Jul 10, 2018
@smanders smanders self-assigned this Jul 10, 2018
smanders pushed a commit that referenced this issue Jul 10, 2018
@smanders
Copy link
Owner Author

I put all the code in place to update the projects/README.md with a dependency graph

if(EXISTS ${PRO_DIR}/deps.dot AND XP_GRAPH_DEPS)
set(user smanders)
set(branch dev)
set(mark customgraph01)
set(url "https://raw.githubusercontent.com/${user}/externpro/${branch}/projects/README.md")
string(REPLACE "/" "%2F" url ${url})
string(REPLACE ":" "%3A" url ${url})
file(APPEND ${g_README}
"\n\n## dependency graph\n\n"
"![deps.dot graph](https://g.gravizo.com/source/${mark}?${url})\n"
"<details>\n"
"<summary></summary>\n"
"${mark}\n"
)
file(READ ${PRO_DIR}/deps.dot depsDotDot)
file(APPEND ${g_README}
"${depsDotDot}"
"${mark}\n"
"</details>\n"
)
endif()

but also require a -DXP_GRAPH_DEPS to be defined to actually modify the README.md

if(EXISTS ${PRO_DIR}/deps.dot AND XP_GRAPH_DEPS)

the reason for making it a little tricky to modify the README.md is because I'm not satisfied with the hard-coded user and branch name required in the url

set(url "https://raw.githubusercontent.com/${user}/externpro/${branch}/projects/README.md")

smanders pushed a commit that referenced this issue Jul 10, 2018
@smanders
Copy link
Owner Author

include graphviz graphs in github README.md

info regarding attempts to not have hard-coded user and branch name in the url

github/markup requests that could help

@smanders
Copy link
Owner Author

completed with commits referenced above to dev branch

@smanders
Copy link
Owner Author

seems I should remove the XP_GRAPH_DEPS check... it's too easy to not have that defined, then it removes the dependency graph from the projects/README.md and: dirtyrepo

so I'll take it out for now, live with it there for awhile, see what I think of the dependency graph in the readme and if I end up taking it out of the readme (because of the hard-coded user and branch name) then I'll reintroduce XP_GRAPH_DEPS so it's a bit harder to inject the dependency graph into the readme

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

No branches or pull requests

1 participant