Skip to content

Commit 130910c

Browse files
committed
Cleanup of README, 80char line
1 parent 1ef20c3 commit 130910c

File tree

1 file changed

+54
-33
lines changed

1 file changed

+54
-33
lines changed

scripts/pkgdepchart/README.md

+54-33
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,127 @@
1-
# Scripts used for generating numpy dependency charts for numpy.org
1+
# NumPy Dependency Chart generator Scripts
22

3-
**Overview**
3+
## Overview
4+
5+
Typically, you only need to run the top level script **redraw-numpy-dep-charts.sh.**
46

57
Here is how these scripts are organized:
68

7-
* Top level script: redraw-numpy-dep-charts.sh
8-
* Helper scripts that are used by redraw-numpy-dep-charts.sh and should be run in the suggested order below:
9+
* **Top level script:** redraw-numpy-dep-charts.sh
10+
* **Helper scripts:** These scripts are used by **redraw-numpy-dep-charts.sh**
11+
and should be run in the suggested order below:
912

1013
1. fetch-numpydeppkg.sh
1114
2. gen-numpy-dep-graph.sh
1215
3. cleanup-numpydeppkg.sh
1316

14-
If you run the helper scripts, make sure you run them in this order to generate graphs in specified output directory.
17+
If you run the helper scripts, make sure you run them in this order to generate graphs in specified output directory.
1518

1619
Usage details of each script are listed in the section below.
1720

21+
----
22+
1823
## Script: redraw-numpy-dep-charts.sh
1924

2025
### Use Case:
2126

22-
NumPy case studies refers to ehtim, gwpy and PyCBC packages. For each of these, we have created NumPy dependency graphs. You can redraw all these three graphs in one go (obtain 3 png files) in the specified output directory. If you wish to add a new package and also refresh existing charts, you can edit the script and update three arrays:
27+
NumPy case studies refers to ehtim, gwpy and PyCBC packages. For each of these,
28+
we have created NumPy dependency graphs. You can redraw all these three graphs
29+
in one go (obtain 3 png files) in the specified output directory. If you wish
30+
to add a new package and also refresh existing charts, you can edit the script
31+
and update three arrays:
2332

24-
* pkgarray: List of packages for which numpy dependency chart is to be generated
25-
* pkgurl: List of github urls from where pkg sources can be git cloned
26-
* pkgsetup: Dirname (not path) of the top level dir in pkg source that contains
33+
* *pkgarray:* List of packages for which numpy dependency chart is to be generated
34+
* *pkgurl:* List of github urls from where pkg sources can be git cloned
35+
* *pkgsetup:* Dirname (not path) of the top level dir in pkg source that contains
2736
requirements.txt file used to pip install the package in a virtualenv.
2837
The package is uninstalled as part of cleanup after graphs is generated.
2938

3039

3140
#### Usage
3241

33-
redraw-numpy-dep-charts.sh outputdir
42+
redraw-numpy-dep-charts.sh **outputdir**
3443

3544
The output directory is an optional parameter.
45+
3646
If no output directory is specified, the graphs (.png files) of all the packages
3747
listed in pkgarray variable are generated in the current directory from where
3848
the script is run.
3949

40-
Pre-requisites: The following software packages must be installed on the system where you are running this bash script: git, python3, pip3, virtualenv.
50+
**Pre-requisites:**
51+
52+
The following software packages must be installed on the system where you are running this bash script: git, python3, pip3, virtualenv.
53+
4154

4255
----
4356

4457
## Script: fetch-numpydeppkg.sh
4558

4659
### Use Case:
4760

48-
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.
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.
4962

5063
#### Usage
5164

52-
fetch-numpydeppkg.sh package_name scratchdir git_url reqfile_parentdir
65+
fetch-numpydeppkg.sh **package_name scratchdir git_url reqfile_parentdir**
66+
67+
*package_name:* Name of the package (as in pip registry) that will be fetched
68+
69+
*scratchdir:* local directory where the package contents will be fetched.
70+
71+
*git_url:* Full git url required for git cloning.
5372

54-
package_name: Name of the package (as in pip registry) that will be fetched
55-
scratchdir: local directory where the package contents will be fetched.
56-
git_url: Full git url required for git cloning.
57-
reqfile_parentdir: This is the name (not path) of the root directory of package that contains requirements.txt file
73+
*reqfile_parentdir:* This is the name (not path) of the root directory of package that contains requirements.txt file
5874

5975
----
6076

6177
## Script: gen-numpy-dep-graph.sh
6278

6379
### Use Case:
6480

65-
This is a helper script used by redraw-numpy-dep-charts.sh script. Its sole
81+
This is a helper script used by **redraw-numpy-dep-charts.sh** script. Its sole
6682
purpose is to use the pre-installed pkg in a local virtual environment by
67-
the script fetch-numpydeppkg.sh (or manually installed locally) and use them
83+
the script **fetch-numpydeppkg.sh** (or manually installed locally) and use them
6884
to run graphviz, dot and other utilities for creating NumPy dependency chart
6985
as png files for the pkg. It assumes that packages is pre-installed and does
7086
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.
7187

7288
#### Usage:
7389

74-
gen-numpy-dep-graph.sh package_name scratchdir output_graphdir highlight_color (optional)
90+
gen-numpy-dep-graph.sh **package_name scratchdir output_graphdir highlight_color (optional)**
7591

76-
package_name: Name of the package (as in pip registry) for which NumPy dependency
92+
*package_name:* Name of the package (as in pip registry) for which NumPy dependency
7793
graph is to be generated.
78-
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.
79-
output_graphdir: directory pathname where generated graphs in png format will be
94+
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.
96+
97+
*output_graphdir: directory pathname where generated graphs in png format will be
8098
stored.
81-
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
8299

83-
Pre-requisite: Please note, gen-numpy-dep-graph 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.
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
101+
102+
**Pre-requisite:**
103+
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.
84105

85106
----
86107

87108
##Script: cleanup-numpydeppkg.sh
88109

89110
### Use Case:
90111

91-
This is a helper script used by redraw-numpy-dep-charts.sh script. Its sole
92-
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
112+
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
93114
directory contents related to virtualenv setup and package sources that were
94-
installed by fetch-numpydeppkg.sh script. If you have not used fetch-numpydeppkg
115+
installed by **fetch-numpydeppkg.sh** script. If you have not used **fetch-numpydeppkg**
95116
script then you do not need to run the cleanup script.
96117

97118
#### Usage:
98119

99120
*package_name:* Name of the package (as in pip registry) that will be uninstalled.
100-
*scratchdir:* local directory where the package contents were earlier fetched by
101-
fetch-numpydeppkg.sh script.
102-
*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
103-
dependencies that were installed as part of fetching and setting up of pacakge
104-
by fetch-numpydeppkg.sh script.
105121

122+
*scratchdir:* local directory where the package contents were earlier fetched by
123+
**fetch-numpydeppkg.sh** script.
106124

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.

0 commit comments

Comments
 (0)