You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/pkgdepchart/README.md
+33-22
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Here is how these scripts are organized:
10
10
***Helper scripts:** These scripts are used by **redraw-numpy-dep-charts.sh**
11
11
and should be run in the suggested order below:
12
12
13
-
1. fetch-numpydeppkg.sh
13
+
1. fetch-numpydeppkg.sh
14
14
2. gen-numpy-dep-graph.sh
15
15
3. cleanup-numpydeppkg.sh
16
16
@@ -36,12 +36,11 @@ and update three arrays:
36
36
requirements.txt file used to pip install the package in a virtualenv.
37
37
The package is uninstalled as part of cleanup after graphs is generated.
38
38
39
-
40
39
#### Usage
41
40
42
41
redraw-numpy-dep-charts.sh **outputdir**
43
42
44
-
The output directory is an optional parameter.
43
+
*outputdir:*The output directory is an optional parameter.
45
44
46
45
If no output directory is specified, the graphs (.png files) of all the packages
47
46
listed in pkgarray variable are generated in the current directory from where
@@ -51,20 +50,24 @@ the script is run.
51
50
52
51
The following software packages must be installed on the system where you are running this bash script: git, python3, pip3, virtualenv.
53
52
54
-
55
53
----
56
54
57
55
## Script: fetch-numpydeppkg.sh
58
56
59
57
### Use Case:
60
58
61
-
This script is one of the helper scripts used by **redraw-numpy-dep-charts.sh** script. Its sole purpose is to download the package for which numpy dependency graph is to be generated and install it in a virtual environment, setup the directory structure which can be used by other helper script **gen-numpy-dep-graph.sh** to generate the graph. This script is paired with **cleanup-numpydeppkg.sh** script for uninstalling and removing scratch data.
59
+
This script is one of the helper scripts used by **redraw-numpy-dep-charts.sh**
60
+
script. Its sole purpose is to download the package for which numpy dependency
61
+
graph is to be generated and install it in a virtual environment, setup the
62
+
directory structure which can be used by other helper script
63
+
**gen-numpy-dep-graph.sh** to generate the graph. This script is paired with
64
+
**cleanup-numpydeppkg.sh** script for uninstalling and removing scratch data.
*package_name:* Name of the package (as in pip registry) that will be fetched
70
+
*package_name:* Name of the package (as in pip registry) that will be fetched.
68
71
69
72
*scratchdir:* local directory where the package contents will be fetched.
70
73
@@ -83,37 +86,45 @@ purpose is to use the pre-installed pkg in a local virtual environment by
83
86
the script **fetch-numpydeppkg.sh** (or manually installed locally) and use them
84
87
to run graphviz, dot and other utilities for creating NumPy dependency chart
85
88
as png files for the pkg. It assumes that packages is pre-installed and does
86
-
not clean up any pre-installed packages. In case a user has the package pre-installed and would like to simply generate NumPy dependency chart, this script can be used.
89
+
not clean up any pre-installed packages. In case a user has the package
90
+
pre-installed and would like to simply generate NumPy dependency chart, this script can be used.
*package_name:* Name of the package (as in pip registry) for which NumPy dependency
93
-
graph is to be generated.
96
+
*package_name:* Name of the package (as in pip registry) for which NumPy dependency graph is to be generated.
94
97
95
-
*scratchdir:* local directory where the package contents reside, the same directory as input to the fetch-numpydeppkg.sh where package_name was fetched by that script.
98
+
*scratchdir:* local directory where the package contents reside, the same directory as input to the fetch-numpydeppkg.sh where package_name was fetched by that script.
96
99
97
-
*output_graphdir: directory pathname where generated graphs in png format will be
98
-
stored.
100
+
*output_graphdir:* directory pathname where generated graphs in png format will be stored.
99
101
100
-
highlight_color:* color understood by dot language. Default is cyan. Other acceptable colors are red, blue. For a complete list see https://www.graphviz.org/doc/info/lang.html and https://www.graphviz.org/doc/info/colors.html
102
+
highlight_color:* color understood by dot language. Default is cyan. Other
103
+
acceptable colors are red, blue. For a complete list see:
104
+
105
+
*https://www.graphviz.org/doc/info/lang.html
106
+
*https://www.graphviz.org/doc/info/colors.html
101
107
102
108
**Pre-requisite:**
103
109
104
-
Please note, **gen-numpy-dep-graph** script needs the virtualenv directory that was activated and used for package deployment a priori say by **fetch-numpydeppkg.sh** script or manually by user. It is assumed that the scratchdir comprises of two top level directories - virtualenv dir and another dir with package_name sources that are git cloned or a local copy of the same.
110
+
Please note, **gen-numpy-dep-graph** script needs the virtualenv directory
111
+
that was activated and used for package deployment a priori say by
112
+
**fetch-numpydeppkg.sh** script or manually by user. It is assumed that the
113
+
scratchdir comprises of two top level directories - virtualenv dir and another
114
+
dir with package_name sources that are git cloned or a local copy of the same.
105
115
106
116
----
107
117
108
118
##Script: cleanup-numpydeppkg.sh
109
119
110
-
### Use Case:
120
+
### Use Case:
111
121
112
122
This is a helper script used by **redraw-numpy-dep-charts.sh** script. Its sole
113
-
purpose is to cleanup all the packages that were installed by **fetch-numpydeppkg.sh** script executed prior to running cleanup script. It also removes the scratch
114
-
directory contents related to virtualenv setup and package sources that were
115
-
installed by **fetch-numpydeppkg.sh** script. If you have not used **fetch-numpydeppkg**
116
-
script then you do not need to run the cleanup script.
123
+
purpose is to cleanup all the packages that were installed by
124
+
**fetch-numpydeppkg.sh** script executed prior to running cleanup script. It
125
+
also removes the scratch directory contents related to virtualenv setup and
126
+
package sources that were installed by **fetch-numpydeppkg.sh** script. If you
127
+
have not used **fetch-numpydeppkg** script then you do not need to run the cleanup script.
117
128
118
129
#### Usage:
119
130
@@ -122,6 +133,6 @@ script then you do not need to run the cleanup script.
122
133
*scratchdir:* local directory where the package contents were earlier fetched by
123
134
**fetch-numpydeppkg.sh** script.
124
135
125
-
*reqfile_parentdir:* This is the name (not path) of the root directory of package that contains requirements.txt file. This is needed to uninstall all package
126
-
dependencies that were installed as part of fetching and setting up of package
127
-
by **fetch-numpydeppkg.sh** script.
136
+
*reqfile_parentdir:* This is the name (not path) of the root directory of
137
+
package that contains requirements.txt file. This is needed to uninstall all
138
+
package dependencies that were installed as part of fetching and setting up of package by **fetch-numpydeppkg.sh** script.
0 commit comments