Skip to content

Jupyter notebooks for efficiently working with GitHub issues via GitHub's GraphQL API.

License

Notifications You must be signed in to change notification settings

kanad13/PyGitGraph

Repository files navigation

Python + Github + GraphQL = PyGitGraph

  • 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

blog post on "PyGitGraph"

  • 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.

purpose of "PyGitGraph"

  • 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

use cases of "PyGitGraph"

data analysis

  • 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.

time tracking

  • 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.

data backup

  • github does not provide a direct way to back up issues
  • these notebooks aggregate and export issues to safeguard your data. e.g.

features of "PyGitGraph"

completed

  • 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

in progress

  • 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

folder structure of this repository

  1. set parameters - configuration settings for queries and scripts. details.
  2. work with issues - fetch, filter, create, close, and delete issues
  3. aggregate data - append and aggregate data for backup and analysis. learn more
  4. visualize data - generate visualizations from aggregated data. explore
  5. clean up data - remove files created by notebooks. details

use "PyGitGraph"

  • 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 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

create github token

  • prerequisite
    • creating a github token is prerequisite for interacting with Github GraphQL
    • 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
    • find here details on how to create a new token
  • 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

using Binder

  • just launch
    • simply click the badge below to launch this repository in Binder: Binder
    • this will launch a live environment where you can interact with the Jupyter notebooks and try out the code without any installation
  • all done
    • you are now free to execute any of the notebook in this repo

local python installation

  • 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

python virtual environment

  • 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

vscode devcontainer (docker)

  • 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"
  • automatic setup
    • the environment will automatically install dependencies
  • customization
  • all done
    • you are now free to execute any of the notebook in this repo

About

Jupyter notebooks for efficiently working with GitHub issues via GitHub's GraphQL API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published