| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
This folder contains standalone scripts for measuring the structure and quality of a Python repository.
Optional dependencies used by the evaluation scripts:
Use --root when the repository is already available locally. Use --repo and --branch when you want the script to clone a remote repository first. If the repository is already cloned internally, pass only the local path with --root.
If you want to run everything at once, use run_all.py and choose the output folder with --output-dir.
Examples:
python3 evaluation/repository_summary.py --root /home/amine/HydroModPy-Hackathonpython3 evaluation/repository_summary.py \
--repo https://github.com/ORG/REPO.git \
--branch mainpython3 evaluation/repository_summary.py \
--root . \
--output evaluation/out/summary.json \
--csv evaluation/out/summary.csvFrom a remote repository:
python3 evaluation/repository_summary.py \
--repo https://github.com/ORG/REPO.git \
--branch main \
--output evaluation/out/summary.json \
--csv evaluation/out/summary.csvpython3 evaluation/radon_metrics.py \
--root . \
--output evaluation/out/radon.jsonFrom a remote repository:
python3 evaluation/radon_metrics.py \
--repo https://github.com/ORG/REPO.git \
--branch main \
--output evaluation/out/radon.jsonpython3 evaluation/coupling.py \
--root . \
--output evaluation/out/coupling.jsonpython3 evaluation/cohesion.py \
--root . \
--output evaluation/out/cohesion.jsonpython3 evaluation/extract_architecture.py \
--root . \
--output evaluation/out/architecture.json \
--graph-output evaluation/out/architecture_graph.pngYou can also export the architecture graph as GraphML or JSON by changing the file extension of --graph-output.
If you already have JSON outputs in one folder:
python3 evaluation/generate_report.py \
--input-dir evaluation/out \
--output-dir evaluation/report \
--excel evaluation/report/evaluation.xlsxDirectly from a remote repository:
python3 evaluation/generate_report.py \
--repo https://github.com/ORG/REPO.git \
--branch main \
--output-dir evaluation/report \
--excel evaluation/report/evaluation.xlsxFor a repository that is already cloned locally:
python3 evaluation/run_all.py \
--root /home/amine/HydroModPy-Hackathon \
--output-dir /home/amine/HydroModPy-Hackathon/hackathonFor a remote repository:
python3 evaluation/run_all.py \
--repo https://github.com/ORG/REPO.git \
--branch main \
--output-dir /home/amine/HydroModPy-Hackathon/hackathonThis creates:
Generate a JSON comparison and the main bar chart:
python3 evaluation/compare_repositories.py \
--left-repo https://github.com/ORG/REPO-A.git --left-branch main \
--right-repo https://github.com/ORG/REPO-B.git --right-branch develop \
--output evaluation/out/comparison.json \
--chart evaluation/out/comparison_bar_chart.pngGenerate the complete comparison bundle with all requested charts:
python3 evaluation/compare_repositories.py \
--left-repo https://github.com/ORG/REPO-A.git --left-branch main \
--right-repo https://github.com/ORG/REPO-B.git --right-branch develop \
--left-label hackathon \
--right-label legacy \
--output evaluation/out/comparison.json \
--output-dir evaluation/out/chartsYou can use --left-label and --right-label to force the names shown in the charts.
This will generate:
Run the scripts in this order when you want a complete analysis of one repository:
When comparing two repositories, run:
mkdir -p evaluation/out evaluation/report
python3 evaluation/repository_summary.py --root . --output evaluation/out/summary.json --csv evaluation/out/summary.csv
python3 evaluation/radon_metrics.py --root . --output evaluation/out/radon.json
python3 evaluation/coupling.py --root . --output evaluation/out/coupling.json
python3 evaluation/cohesion.py --root . --output evaluation/out/cohesion.json
python3 evaluation/extract_architecture.py --root . --output evaluation/out/architecture.json --graph-output evaluation/out/architecture_graph.png
python3 evaluation/generate_report.py --input-dir evaluation/out --output-dir evaluation/report --excel evaluation/report/evaluation.xlsx| Back | FazBrowse Home | New Git URL |