Metadata-Version: 2.1
Name: github2pandas
Version: 1.0.1
Summary: github2pandas supports the aggregation of project activities in a GitHub repository and makes them available in pandas dataframes
Home-page: https://github.com/TUBAF-IFI-DiPiT/github2pandas
Author: Maximilian Karl & Sebastian Zug
License: BSD 2
Download-URL: https://github.com/user/reponame/archive/v_01.tar.gz
Keywords: git,github,collaborative code development,git mining
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: alabaster (==0.7.12)
Requires-Dist: argon2-cffi (==20.1.0)
Requires-Dist: argparse (==1.4.0)
Requires-Dist: backcall (==0.2.0)
Requires-Dist: cached-property (==1.5.2)
Requires-Dist: certifi (==2020.12.5)
Requires-Dist: cffi (==1.14.5)
Requires-Dist: datetime (==4.3)
Requires-Dist: git2net (==1.4.10)
Requires-Dist: human-id (==0.1.0.post3)
Requires-Dist: ipython-genutils (==0.2.0)
Requires-Dist: ipywidgets (==7.6.3)
Requires-Dist: jsonschema (==3.2.0)
Requires-Dist: jupyter (==1.0.0)
Requires-Dist: jupyterlab-pygments (==0.1.2)
Requires-Dist: lizard (==1.17.7)
Requires-Dist: m2r2 (==0.2.7)
Requires-Dist: mistune (==0.8.4)
Requires-Dist: pandas (==1.2.3)
Requires-Dist: pandocfilters (==1.4.3)
Requires-Dist: pickleshare (==0.7.5)
Requires-Dist: pydriller (==1.15.2)
Requires-Dist: pygit2 (==1.5.0)
Requires-Dist: pygithub (==1.54.1)
Requires-Dist: pyjwt (==1.7.1)
Requires-Dist: pysqlite3 (==0.4.6)
Requires-Dist: python-dotenv (==0.17.0)
Requires-Dist: python-levenshtein (==0.12.2)
Requires-Dist: pytz (==2021.1)
Requires-Dist: pyyaml (==5.4.1)
Requires-Dist: qtpy (==1.9.0)
Requires-Dist: requests (==2.25.1)
Requires-Dist: selenium (==3.141.0)
Requires-Dist: send2trash (==1.5.0)
Requires-Dist: snowballstemmer (==2.1.0)
Requires-Dist: sphinx (==3.5.3)
Requires-Dist: testpath (==0.4.4)
Requires-Dist: wcwidth (==0.2.5)
Requires-Dist: webencodings (==0.5.1)
Requires-Dist: widgetsnbextension (==3.5.1)
Requires-Dist: wrapt (==1.12.1)
Requires-Dist: ptyprocess (==0.7.0) ; os_name != "nt"
Requires-Dist: nbclient (==0.5.3) ; python_full_version >= "3.6.1"
Requires-Dist: prompt-toolkit (==3.0.18) ; python_full_version >= "3.6.1"
Requires-Dist: scipy (==1.6.2) ; python_version < "3.10" and python_version >= "3.7"
Requires-Dist: pyparsing (==2.4.7) ; python_version >= "2.6" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: entrypoints (==0.3) ; python_version >= "2.7"
Requires-Dist: attrs (==20.3.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: babel (==2.9.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: deprecated (==1.2.12) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: idna (==2.10) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: imagesize (==1.2.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: markupsafe (==1.1.1) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: packaging (==20.9) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: prometheus-client (==0.10.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: pycparser (==2.20) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: python-dateutil (==2.8.1) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: six (==1.15.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: tqdm (==4.60.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
Requires-Dist: bleach (==3.3.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: chardet (==4.0.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: click (==7.1.2) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: defusedxml (==0.7.1) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: docutils (==0.17) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: jinja2 (==2.11.3) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: zope.interface (==5.3.0) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
Requires-Dist: urllib3 (==1.26.4) ; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4" and python_version < "4"
Requires-Dist: ipython (==7.22.0) ; python_version >= "3.3"
Requires-Dist: gitdb (==4.0.7) ; python_version >= "3.4"
Requires-Dist: gitpython (==3.1.14) ; python_version >= "3.4"
Requires-Dist: async-generator (==1.10) ; python_version >= "3.5"
Requires-Dist: decorator (==5.0.5) ; python_version >= "3.5"
Requires-Dist: ipykernel (==5.5.3) ; python_version >= "3.5"
Requires-Dist: jupyter-client (==6.1.12) ; python_version >= "3.5"
Requires-Dist: nbformat (==5.1.3) ; python_version >= "3.5"
Requires-Dist: nest-asyncio (==1.5.1) ; python_version >= "3.5"
Requires-Dist: pathpy2 (==2.2.0) ; python_version >= "3.5"
Requires-Dist: pygments (==2.8.1) ; python_version >= "3.5"
Requires-Dist: pyrsistent (==0.17.3) ; python_version >= "3.5"
Requires-Dist: smmap (==4.0.0) ; python_version >= "3.5"
Requires-Dist: sphinxcontrib-applehelp (==1.0.2) ; python_version >= "3.5"
Requires-Dist: sphinxcontrib-devhelp (==1.0.2) ; python_version >= "3.5"
Requires-Dist: sphinxcontrib-htmlhelp (==1.0.3) ; python_version >= "3.5"
Requires-Dist: sphinxcontrib-jsmath (==1.0.1) ; python_version >= "3.5"
Requires-Dist: sphinxcontrib-qthelp (==1.0.3) ; python_version >= "3.5"
Requires-Dist: sphinxcontrib-serializinghtml (==1.1.4) ; python_version >= "3.5"
Requires-Dist: tornado (==6.1) ; python_version >= "3.5"
Requires-Dist: jedi (==0.18.0) ; python_version >= "3.6"
Requires-Dist: jupyter-console (==6.4.0) ; python_version >= "3.6"
Requires-Dist: jupyter-core (==4.7.1) ; python_version >= "3.6"
Requires-Dist: jupyterlab-widgets (==1.0.0) ; python_version >= "3.6"
Requires-Dist: nbconvert (==6.0.7) ; python_version >= "3.6"
Requires-Dist: notebook (==6.3.0) ; python_version >= "3.6"
Requires-Dist: parso (==0.8.2) ; python_version >= "3.6"
Requires-Dist: pyzmq (==22.0.3) ; python_version >= "3.6"
Requires-Dist: qtconsole (==5.0.3) ; python_version >= "3.6"
Requires-Dist: terminado (==0.9.4) ; python_version >= "3.6"
Requires-Dist: numpy (==1.20.2) ; python_version >= "3.7"
Requires-Dist: traitlets (==5.0.5) ; python_version >= "3.7"
Requires-Dist: pexpect (==4.8.0) ; sys_platform != "win32"
Requires-Dist: pypiwin32 (==223) ; sys_platform == "win32"

# Transform GitHub Activities to Pandas Dataframes

## General information

This package is being developed by the participating partners (TU Bergakademie Freiberg, OVGU Magdeburg and HU Berlin) as part of the DiP-iT project [Website](http://dip-it.ovgu.de/).

The package implements Python functions for 
+ aggregating and preprocessing GitHub activities (Commits, Actions, Issues, Pull-Requests) and 
+ generating project progress summaries according to different metrics (ratio of changed lines, ratio of aggregated Levenshtein distances e.g.).

`github2pandas` stores the collected information in a collection of pandas DataFrames starting from a user defined root folder. The structure beyond that (file names, folder names) is defined as a member variable in the corresponding classes and can be overwritten. The default configuration results in the following file structure.

```
data                                     <- Root directory given as parameter
â”œâ”€â”€ My_Github_Repository_0               <- Repository name
â”‚   â”œâ”€â”€ Repo.json                        <- Json file containing user and repo name
â”‚   â”œâ”€â”€ Issues
â”‚   â”‚   â”œâ”€â”€ pdIssuesComments.p
â”‚   â”‚   â”œâ”€â”€ pdIssuesEvents.p
â”‚   â”‚   â”œâ”€â”€ pdIssues.p
â”‚   â”‚   â””â”€â”€ pdIssuesReactions.p
â”‚   â”œâ”€â”€ PullRequests
â”‚   â”‚   â”œâ”€â”€ pdPullRequestsComments.p
â”‚   â”‚   â”œâ”€â”€ pdPullRequestsEvents.p
â”‚   â”‚   â”œâ”€â”€ pdPullRequests.p
â”‚   â”‚   â”œâ”€â”€ pdPullRequestsReactions.p
â”‚   â”‚   â””â”€â”€ pdPullRequestsReviews.p
â”‚   â”œâ”€â”€ Users.p
â”‚   â”œâ”€â”€ Versions
â”‚   â”‚   â”œâ”€â”€ pdCommits.p
â”‚   â”‚   â”œâ”€â”€ pdEdits.p
â”‚   â”‚   â”œâ”€â”€ pdBranches.p
â”‚   â”‚   â”œâ”€â”€ repo                         <- Repository clone
â”‚   â”‚   â”‚   â”œâ”€â”€ ..
â”‚   |   |   â””â”€â”€ ..
â”‚   â”‚   â””â”€â”€ Versions.db
â”‚   â””â”€â”€ Workflows
â”‚       â””â”€â”€ pdWorkflows.p
â”œâ”€â”€ My_Github_Repository_1
...
```
The internal structure and relations of the data frames are included in the project's [wiki](https://github.com/TUBAF-IFI-DiPiT/github2pandas/wiki).

## Installation

Due to the early stage of development the `github2pandas` package is not yet available as a pip package. Installations should be done accordingly as follows:

1. Generate local clone of the package
    ```
    git clone https://github.com/TUBAF-IFI-DiPiT/github2pandas.git
    ```
2. Include the specific folder to your python path 
    ```
    pipenv install --dev
    ```

## Application examples 

GitHub token is required for use, which is used for authentication. The [website](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) describes how you can generate this for your GitHub account. Customise the username and project name and explore any public or private repository you have access to with your account!

| Aspect              | Example                                                                                                                        | Executable notebook | 
|:------------------- |:------------------------------------------------------------------------------------------------------------------------------ |:------------------- |
| Overview Example    | [Overview_Example.ipynb](https://github.com/TUBAF-IFI-DiPiT/github2pandas/blob/main/notebooks/Overview_Example.ipynb)          | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/TUBAF-IFI-DiPiT/github2pandas/HEAD?filepath=%2Fnotebooks)  |
| Commits & Edits     | [Version_Example.ipynb](https://github.com/TUBAF-IFI-DiPiT/github2pandas/blob/main/notebooks/Version_Example.ipynb)            |                     |
| Workflows / Actions | [Workflow_Example.ipynb](https://github.com/TUBAF-IFI-DiPiT/github2pandas/blob/main/notebooks/Workflow_Example.ipynb)          |                     |
| Issues              | [Issue_Example.ipynb](https://github.com/TUBAF-IFI-DiPiT/github2pandas/blob/main/notebooks/Issues_Example.ipynb)               |                     |
| Pull-Requests       | [Pull_Requests_Example.ipynb](https://github.com/TUBAF-IFI-DiPiT/github2pandas/blob/main/notebooks/Pull_Requests_Example.ipynb)|                     | 

The documentation of the module is available at XXX. 

# For Developers

Naming conventions: https://namingconvention.org/python/

## Working with pipenv


| Process                                     | Command                                                 |
| ------------------------------------------- | ------------------------------------------------------- |
| Installation                                | `pipenv install --dev`                                  |
| Run specific script                         | `pipenv run python file.py`                             |
| Run all Tests                               | `pipenv run python -m unittest`                         |
| Run all tests in a specific folder          | `pipenv run python -m unittest discover -s 'tests'`     |
| Run all tests with specific filename        | `pipenv run python -m unittest discover -p 'test_*.py'` |
| Start Jupyter server in virtual environment | `pipenv run jupyter notebook`                           | 

## Generating documentation

1. Run following command in main folder

```
pipenv run  sphinx-apidoc -o ./docu/source/ ./github2pandas
```

2. Generate html documentation 

```
cd docu
make html
```


