Python HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
analyzer Use absolute import path Mar 31, 2018
app Reformatting and import optimization Mar 31, 2018
db
screenshots
tests
vcs Reformatting and import optimization Mar 31, 2018
.coveragerc Add coveragerc Dec 30, 2016
.gitignore Update .gitignore Mar 31, 2018
.travis.yml
CONTRIBUTING.md Create CONTRIBUTING.md Dec 4, 2016
LICENSE
README.md
__init__.py Create first version of pyreportcard Dec 30, 2016
config.py Reformat partial codebase (spaces adjusting) Mar 31, 2018
config_secret.py.example
constants.py
requirements.txt Add requirements.txt Feb 12, 2017
run.py Reformat partial codebase (spaces adjusting) Mar 31, 2018
tox.ini

README.md



Python Report Card

Analyze and report the python projects which are on Github




Inspired by Go Report Card

A report card for your Python application. This inspects a python project is hosted on Github and analyze the source code quality (pep8, pyflakes and bandit etc.), existence of license file, and some useful statistics of whole codebase. Then shows its analysis results on web.

You can see our planning for future versions in here too.

Note: I'm preparing the supports of isolated running environments with Docker. I'll add it soon

ScreenShots

main

report

Features

  • Supports checking the code quality using PEP8 and Pyflakes linting tools
  • Supports counting the code lines and calculates some stats
  • Supports checking the license file
  • Provides a grade system
  • Provides a pyreportcard web server
  • Supports checking the compatibility of Python 2 and 3
  • Supports checking the security issues
  • Supports customizable analyzing using own configuration file
  • Serves it as web service
  • Provides ranking system
  • Provides badge link of repository grade

Install and Run

  • Clone this repository.
  • Run pip install -r requirements.txt to install all dependencies (If you don't have pip, install pip first)
  • Install the MongoDB that is used for our backend database.
  • You must configure the secret values in config_secret.py. Firstly, copy the example secret file to create secret file by cp config_secret.py.example config_secret.py, and then fill out the secret values with yours.
class SecretConfig:
    SECRET_KEY = '...'

    MONGO_DBNAME = 'reportcard'
    MONGO_HOST = '...'
    MONGO_PORT = ...
    # MONGO_USER = '...'
    # MONGO_PASSWORD = '...'
  • Run server by python3 run.py.
  • Go 127.0.0.1:5000 and just use it.

Note: Now, you can run it on local system only, But we'll provide isolated environments using Docker for installing and running soon.

Tests

Note: We have a test code for only vcs module now. We'll add more tests for all features soon

python3 -m unittest discover tests

Dependencies

License

The content of this project itself is licensed under the Creative Commons Attribution 3.0 license, and the underlying source code used to format and display that content is licensed under the MIT license.