This project pulls current PatternFly usage metrics across a number of products.
-
Install dependencies:
npm install
-
Run a new report:
npm run collect
-
View the new report, created within:
/stats-static/{CURRENT-DATE}
-
Create a .csv and .xslx report (see below for installation)
python to_xls.py
This project references a static list of projects, listed within repos.json. A new report is generated by running npm run collect
, which triggers the functionality within /src/static-analysis/cli.js.
These repositories are cloned locally into a /tmp
directory, and each are looped through functionality within getPackageStats.js, getPatternflyStats.js, and getSortedImports.js to output the following files:
_all_dependencies.json
- Groups all projects by shared dependency
_all.json
- Lists all imported PatternFly assets by import file path or import type
_all_sorted.json
- Groups together common imported assets regardless of file path from
_all.json
and sorts them by total imported quantity across repos.
- Groups together common imported assets regardless of file path from
# 1) Install a venv (only needed once)
python3 -m venv .venv
# 2) Activate it
source .venv/bin/activate
# 3) Install packages
python3 -m pip install -r requirements.txt
# 4) Run the code
python3 to_xls.py
# 5) (Optional) Deactivate the venv again
deactivate
If step 3 fails, you need to install pip. on Linux e.g.
via dnf install python3-pip
.
`