Skip to content

Commit 1f79b4e

Browse files
committed
copy readme over from devstats-data repo
1 parent 644ca11 commit 1f79b4e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
11
# devstats
2+
3+
This repository holds the devstats package. devstats uses the github API to
4+
generate developer statistics and a developer statistics report on a specified
5+
project.
6+
7+
## OAuth key for accessing GitHub
8+
9+
Per the [GitHub GraphQL API docs](https://developer.github.com/v4/guides/forming-calls/),
10+
you need a personal access token with `public_repo` permission to access the GraphQL API.
11+
12+
This code expects the personal access token to be in the environment variable
13+
`GRAPH_API_KEY`.
14+
15+
You can [create a personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) on GitHub and save it somewhere you trust.
16+
Then, when you want to use the code: `export GRAPH_API_KEY=<yourkey>`
17+
18+
## Query script
19+
20+
The ``query.py`` script can be used to collect data for other projects like
21+
so: ``python query.py <repo_owner> <repo_name>`` where ``repo_owner`` and
22+
``repo_name`` are the names of the **org** and **repo** on GitHub, respectively.
23+
24+
First you need to install the required Python packages:
25+
26+
```bash
27+
pip install -r requirements.txt
28+
```
29+
30+
For example, to download the latest data for ``pandas``:
31+
32+
```bash
33+
python query.py pandas-dev pandas
34+
```

0 commit comments

Comments
 (0)