afaqAhmadK/GithubRepo-Analyzer
GitHub Repository Analyzer ๐
This project delves into any public GitHub repository to assess the health status of open-source projects. Specifically, it explores the following key areas:
- Commit History ๐ฐ๏ธ
- Most Active Users ๐งโ๐ป
This project is additionally maintained on GitHub. Please note that both versions are maintained separately.
๐ How it Works
The analyzer collects data from two essential open-source GitHub API endpoints:
- Contributors:
https://api.github.com/repos/facebook/react/contributors - Commits:
https://api.github.com/repos/facebook/react/commits
This collected JSON information is then consolidated and presented in various useful formats:
- Streamlit Deployed App ๐: Access the live application here. (Please note: The link may occasionally be down. Feel free to email if you'd like it to be reactivated.)
- Generated PDF Report ๐
- Supportive Visualizations (Images) ๐ผ๏ธ
Additional Notes:
- When running the script locally via
argparse, the PDF report and supporting images will be saved to your local machine. - When utilizing the Streamlit application, the PDF will only be saved upon clicking the 'Generate PDF' button.
- All generated figures will be displayed directly within the Streamlit interface.
๐ File Structure & Explanation
Here's a breakdown of the project's key files:
main.py: ๐งฉ The central file that orchestrates different parts of the program.
Files located in the scripts/ directory:
app.py: ๐ฑ Contains the core Streamlit application logic.contributors.py: ๐ Gathers information about repository contributors, including:- Top and lowest contributors.
- Respective bar-plot visualizations of their contributions.
commits.py: ๐ Collects data regarding the repository's commit history, offering:- Prints authors by greatest commit count & timeline.
- Enables in-line (CMD) visualization using Python's
tabulatemodule. - Produces insightful visualizations such as:
- Commits per day ๐
- Commits per day per user ๐จโ๐ป
- Commit word cloud โ๏ธ
variables.py: โ๏ธ Houses all global variables and their accompanying documentation.
๐ Getting Started: How to Run
You have several options to run this project:
- Local Streamlit App ๐ฅ๏ธ:
- First, fork the repository to your local machine.
- Ensure you have Streamlit installed (
pip install streamlit). - Run the application using:
streamlit run app.py
- Streamlit Community Cloud Deployment โ๏ธ:
- Easily deploy the app using the Streamlit Community Cloud platform.
- Command-Line Interface (CLI) with Argparse ๐จโ terminals:
- For help and available arguments, run:
python main.py -h - You can specify the repository in two ways:
python main.py --repo facebook/reactpython main.py --repo https://github.com/facebook/react- Both commands will work seamlessly.
- Hugging Face Spaces Deployment โจ:
- The app is also deployed here. Feel free to check it out!
โจ Sample Output
To see an example of the output when the script is run through the command line, please refer to the facebook/react directory within the repository.
Branch Details
- main: main
- hf-display: branch used to diagnose any display config problem on hugging face space interface
๐ก Possible Future Updates
We're always looking to improve! Here are some potential enhancements:
- Docker Deployment ๐ณ
- Deployment on Additional Free-Hosted Cloud Services (Already Added! Check out this commit for the Hugging Face Spaces deployment) โ
- Integration of More API Endpoints ๐
