<commit_before># Assignment Dashboard

A web app that displays the forks of files in a GitHub repository (currently hardwired to `sd17spring/ReadingJournal`),
in tabular format.

![](./docs/screenshot.png)


## Status

It works for me :-)

Possible enhancements are listed [here](https://github.com/osteele/assignment-dashboard/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement),
with the [next major milestone](https://github.com/osteele/assignment-dashboard/issues?utf8=✓&q=is%3Aopen%20is%3Aissue%20milestone%3A%22Web%201.0%22%20) being to run it in the cloud.

## Setup

### 1. Install Python

Install Python 3.5 or greater. (Lesser versions of Python 3 will likely work but are untested. Python 2 is right out.)

### 2. Install required Python packages

Install sqlite3.

Then:

    $ pip3 install -r requirements.txt

Depending on how Python is installed, you may need to prefix `pip3 install …` by `sudo`.

### 3. Retrieve a GitHub personal API token

[Create a personal GitHub API token](https://github.com/blog/1509-personal-api-tokens)
and set the `GITHUB_API_TOKEN` environment variable to this value.

### 4. Initialize the database

    $ ./scripts/reset_database


## Usage

The code has two components. The updater updates the project database from GitHub.
The web application browses the data in this database.

### Update the database

    $ python update_database.py

This picks up new commits.

### Run the Web App

Launch Flask:

    $ python3 server.py

Then browse to <http://localhost:4000>.

File bugs and enhancement requests [here](https://github.com/osteele/assignment-dashboard/issues).


## Contributing

### What to Work On

The [GitHub issues](https://github.com/osteele/assignment-dashboard/issues) lists bugs and enhancement requests.

### Style

With exceptions listed in `setup.cfg`, code should conform to [PEP8](https://www.python.org/dev/peps/pep-0008/), [PEP257](https://www.python.org/dev/peps/pep-0257/), and the [Google Python Style Guide](http://google.github.io/styleguide/pyguide.html).

You can verify code against these style guides via:

    $ pip3 install -r requirements-dev.txt  # once
    $ flake8 scripts                        # before each commit

or by setting up a [git pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to run the latter command.

The update script are written in a Jupyter-notebook-like style, for easy development with the
[Hydrogen Atom plugin-in](https://atom.io/packages/hydrogen) and the
[Python Visual Studio Code extension](https://github.com/DonJayamanne/pythonVSCode/wiki/Jupyter-(IPython)).

Specifically, it is light on functions and heavy on global variables.

This is an experiment, and may not have legs.<commit_msg>minor fix to README<commit_after># Assignment Dashboard

A web app that displays the forks of files in a GitHub repository (currently hardwired to `sd17spring/ReadingJournal`),
in tabular format.

![](./docs/screenshot.png)


## Status

It works for me :-)

Possible enhancements are listed [here](https://github.com/osteele/assignment-dashboard/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement),
with the [next major milestone](https://github.com/osteele/assignment-dashboard/issues?utf8=✓&q=is%3Aopen%20is%3Aissue%20milestone%3A%22Web%201.0%22%20) being to run it in the cloud.

## Setup

### 1. Install Python

Install Python 3.5 or greater. (Lesser versions of Python 3 will likely work but are untested. Python 2 is right out.)

### 2. Install required Python packages

Install sqlite3.

Then:

    $ pip3 install -r requirements.txt

Depending on how Python is installed, you may need to prefix `pip3 install …` by `sudo`.

### 3. Retrieve a GitHub personal API token

[Create a personal GitHub API token](https://github.com/blog/1509-personal-api-tokens)
and set the `GITHUB_API_TOKEN` environment variable to this value.

### 4. Initialize the database

    $ ./scripts/reset_database


## Usage

The code has two components. The updater updates the project database from GitHub.
The web application browses the data in this database.

### Update the database

    $ python update_database.py

This picks up new commits.

### Run the Web App

Launch Flask:

    $ python3 server.py

Then browse to <http://localhost:4000>.

File bugs and enhancement requests [here](https://github.com/osteele/assignment-dashboard/issues).


## Contributing

### What to Work On

The [GitHub issues](https://github.com/osteele/assignment-dashboard/issues) lists bugs and enhancement requests.

### Style

With exceptions listed in `setup.cfg`, code should conform to [PEP8](https://www.python.org/dev/peps/pep-0008/), [PEP257](https://www.python.org/dev/peps/pep-0257/), and the [Google Python Style Guide](http://google.github.io/styleguide/pyguide.html).

You can verify code against these style guides via:

    $ pip3 install -r requirements-dev.txt  # once
    $ flake8 scripts                        # before each commit

or by setting up a [git pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) to run the latter command.

The update script is written in a Jupyter-notebook-like style, for easy development with the
[Hydrogen Atom plugin-in](https://atom.io/packages/hydrogen) and the
[Python Visual Studio Code extension](https://github.com/DonJayamanne/pythonVSCode/wiki/Jupyter-(IPython)).

Specifically, it is light on functions and heavy on global variables.

Use of this style is an experiment, and may not have legs.
{'fraction_non_alphanumeric': 0.10737764791818846, 'fraction_numerical': 0.021183345507669833, 'mean_word_length': 4.162111215834119, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3966908', 'n_tokens_mistral': 1764, 'n_tokens_neox': 1650, 'n_words': 573}