Skip to content

Commit e48f4b7

Browse files
author
Maximilian Karl
authored
Merge pull request #61 from TUBAF-IFI-DiPiT/SebastianZug-READMEpatch
Update README according to installation
2 parents 8c22340 + 4c943ca commit e48f4b7

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,63 @@ The internal structure and relations of the data frames are included in the proj
4646

4747
`github2pandas` is available on [pypi](https://pypi.org/project/github2pandas/). Use pip to install the package.
4848

49+
### global
50+
51+
On Linux:
52+
53+
```
54+
sudo pip3 install github2pandas
55+
sudo pip install github2pandas
56+
```
57+
58+
On Windows as admin or for one user:
59+
4960
```
50-
sudo pip3 install github2pandas
61+
pip install github2pandas
62+
pip install --user github2pandas
5163
```
5264

53-
## Application
65+
### in virtual environment:
66+
67+
```
68+
pipenv install github2pandas
69+
```
70+
71+
## Usage
5472

5573
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!
5674

75+
Access token is to define in `.env` oder `.py (.ipynb)` file. The default value of python.envFile setting is `${workspaceFolder}/.env`
76+
77+
```
78+
TOKEN="example_token"
79+
```
80+
81+
An short example of a python script:
82+
83+
```
84+
import os
85+
86+
from github2pandas.issues import Issues
87+
from github2pandas.utility import Utility
88+
from pathlib import Path
89+
90+
git_repo_name = "github2pandas"
91+
git_repo_owner = "TUBAF-IFI-DiPiT"
92+
93+
default_data_folder = Path("data", git_repo_name)
94+
github_token = os.environ['TOKEN']
95+
96+
repo = Utility.get_repo(git_repo_owner, git_repo_name, github_token, default_data_folder)
97+
Issues.generate_issue_pandas_tables(repo, default_data_folder)
98+
issues = Issues.get_issues(default_data_folder,Issues.ISSUES)
99+
100+
# List the last 14 issue entries
101+
issues.head(14)
102+
```
103+
104+
## Notebook examples
105+
57106
The corresponding [github2pandas_notebooks](https://github.com/TUBAF-IFI-DiPiT/github2pandas_notebooks/blob/main/README.md) repository illustrates the usage with examplary investigations.
58107

59108
The documentation of the module is available at [https://github2pandas.readthedocs.io/](https://github2pandas.readthedocs.io/).

0 commit comments

Comments
 (0)