- Python + Github + GraphQL = PyGitGraph
- "PyGitGraph" is a comprehensive suite of Jupyter notebooks for efficiently working with GitHub issues via GitHub's GraphQL API
- the code in this repo allows you to analyze, visualize, and manage your Github issues like a pro!
- future roadmap involves extending this functionality to PRs, Discussions and other Github functionalities
- I have made a blog post on my website covering PyGitGraph. You can find it here. The blog post looks at the tool in a more non-technical way.
- Alternatively, you can continue reading up more about the tool in the sections below.
- GitHub's Issues feature provides robust project management tools, and its GraphQL API enables deep data access
- this repository offers Jupyter notebooks that allow you to:
- create new GitHub issues
- retrieve and analyze existing issues
- analyze trends and generate reports like these ones here
- export and analyze your issues to answer questions like:
- what is the average issue open time?
- which labels have the most associated issues?
- create interactive graphs and rich visualizations from your data e.g.
- track tasks using github issues:
- open an issue to start a task
- close it when done
- start new issues for new tasks
- use the notebooks to extract data, analyze trends, and generate reports e.g.
- github does not provide a direct way to back up issues
- these notebooks aggregate and export issues to safeguard your data. e.g.
- fetch issues - retrieve issues by various parameters
- filter issues - filter issues by labels, time, etc
- create issues - create issues with specific titles, descriptions, and labels
- close issues - close open issues
- delete issues - delete issues
- aggregate issues - combine issues into a single file/dataframe
- visualize issues - create visualizations and export data for other tools
- Pull Requests & Discussions - implement similar actions for pull requests github discussions
- Bulk Actions - Use CSV/JSON input for batch operations on several issues at the same time
- set parameters - configuration settings for queries and scripts. details.
- work with issues - fetch, filter, create, close, and delete issues
- aggregate data - append and aggregate data for backup and analysis. learn more
- visualize data - generate visualizations from aggregated data. explore
- clean up data - remove files created by notebooks. details
- 4 out-of-the-box options
- you have four setup options to work with this code
- using Binder (no installation or registration needed)
- local python installation WITHOUT any virtual environment
- local python installation WITH a virtual environment
- VSCode with Devcontainers
- you can find more info for each of this option in the next 4 sections
- you have four setup options to work with this code
- you do you
- of course, you are not limited to these 4 options only
- you can have your own setup approach as well
- there is restriction set by the repo or the code
- prerequisite
- asked just once
- you would not be asked to enter this token again and again...just once
- you would asked for it once when you start with executing any of the jupyter notebooks in this repo
- next steps
- assuming you now have the token, you can use any of the below 4 options to use this repo
- just launch
- all done
- you are now free to execute any of the notebook in this repo
-
create a github token
- create a token and keep it secure
- you would be asked for it when executing the code in any of the other files in this repo
- dont worry, you will be asked just once - see more details here
-
clone the repository
git clone https://github.com/kanad13/github_issues_explorer.git cd PyGitGraph
-
install dependencies
pip install -r ./requirements.txt
-
all done
- you are now free to execute any of the notebook in this repo
-
create a github token
- create a token and keep it secure
- you would be asked for it when executing the code in any of the other files in this repo
- dont worry, you will be asked just once - see more details here
-
clone the repository
git clone https://github.com/kanad13/PyGitGraph.git cd PyGitGraph
-
create a virtual environment
python3 -m venv PyGitGraph_env
-
activate the environment
-
windows -
.\PyGitGraph_env\scripts\activate
-
macos/linux -
source PyGitGraph_env/bin/activate
-
-
install dependencies
pip install -r ./requirements.txt
-
all done
- you are now free to execute any of the notebook in this repo
- create a github token
- create a token and keep it secure
- you would be asked for it when executing the code in any of the other files in this repo
- dont worry, you will be asked just once - see more details here
- open the repository in a container
- open the command palette (
ctrl+shift+p
), and select "Remote-Containers: Open Folder in Container"
- open the command palette (
- automatic setup
- the environment will automatically install dependencies
- customization
- adjust these files for your environment
- all done
- you are now free to execute any of the notebook in this repo