Skip to content

Enhanced scripts to generate numpy dependency graph for various pkg #218

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

Merged
merged 3 commits into from
May 11, 2020

Conversation

shaloo
Copy link
Contributor

@shaloo shaloo commented Apr 23, 2020

Brief description of what is fixed or changed

Earlier, we had a script that worked for ehtim pkg dependency graph for NumPy. The same script is now enhanced into generic one that works for any package which is dependent on NumPy. Here is how the new script works:

Use case 1: You already have the package deployed locally - in that case simply run gen-numpy-dep-graph.sh. Note: Pre-requisite - you should have pipdeptree and graphviz installed on your system.

Use case 2: You do not have the package for which you need to generate NumPy dep graph. You can use fetch-numpydeppkg.sh to download pkg sources and deploy locally along with graphviz and pipdeptree. Next, you can run gen-numpy-dep-graph.sh followed by cleanup script which will uninstall and remove all downloaded sources from your local machine and free up space used by these packages.

Use case 3: NumPy use - just one one script which generates updated dep graphs of all pkg that are referred to in NumPy.org case studies. This is done by redraw-numpy-dep-charts.sh and it also serves as an example for Use case 2.

Fixes #217

Deployed URL

http://numpy-<pr_number>.surge.sh/

@rgommers
Copy link
Member

Note to self: the current outputs of these are in gh-182.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shaloo! These new graphs will be useful. The script does work for me, with some minor hiccups. It would be useful to add a scripts/README.md to make it easier to figure out what to do.

@shaloo
Copy link
Contributor Author

shaloo commented May 8, 2020

Thanks @shaloo! These new graphs will be useful. The script does work for me, with some minor hiccups. It would be useful to add a scripts/README.md to make it easier to figure out what to do.

Hopefully you will have a better experience with the fixes. Pls do let me know if you have any more suggestions and inputs to make it better.

@shaloo shaloo closed this May 8, 2020
@shaloo shaloo reopened this May 8, 2020
@shaloo
Copy link
Contributor Author

shaloo commented May 8, 2020

clicked closed by mistake, reopened.

@shaloo shaloo force-pushed the sfork-217-depgraph branch from cae3a25 to 140823a Compare May 8, 2020 13:49
@shaloo
Copy link
Contributor Author

shaloo commented May 8, 2020

I tried to squash last two updates to readme as part of this update. Had to force push after rebase with upstream/master - hope that is ok.

@rgommers
Copy link
Member

Had to force push after rebase with upstream/master - hope that is ok.

No worries, force-pushing is always okay. The only rule is never to do that to a branch used by other people (e.g. master in this repo). On your own branches and PRs it's always fine.

@rgommers
Copy link
Member

This succeeds out of the box now doing simply ./redraw-numpy-dep-charts.sh. Result:

image

The PyCBC figure would look cleaner with six removed, but let's not hold up this PR on that - it looks good too as is, we can always work on this more in the future if we want to further improve this.

@rgommers
Copy link
Member

Image file sizes here are ~100 kb, which is good.

@rgommers rgommers merged commit 5125314 into numpy:master May 11, 2020
@rgommers
Copy link
Member

Merged, thanks @shaloo!

@shaloo shaloo deleted the sfork-217-depgraph branch May 24, 2020 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create dependency charts for GwPy and Pycb for GW case study
2 participants