Git Product home page Git Product logo

checkmate's Introduction

Welcome to QuantifiedCode!

QuantifiedCode is a code analyis & automation platform. It helps you to keep track of issues and metrics in your software projects, and can be easily extended to support new types of analyses. The application consists of several parts:

  • A frontend, realized as a React.js app
  • A backend, realized as a Flask app, that exposes a REST API consumed by the frontend
  • A background worker, realized using Celery, that performs the code analysis

Installation

We provide several options for installing QuantifiedCode. Which one is the right one for you depends on your use case.

  • The manual installation is best if you want to modify or change QuantifiedCode
  • The Docker-based installation is probably the easiest way to try QuantifiedCode without much work
  • The Ansible-based installation is the most suitable way if you want to run QuantifiedCode in a professional infrastructure (possibly with multiple servers)

The following section will only discuss the manual installation process, for the other options please check their corresponding repositories.

Manual Installation

The installation consists of three parts:

  • Install the dependencies required to run QuantifiedCode
  • Download the required source code
  • Set up the configuration

Installing Dependencies

QuantifiedCode requires the following external dependencies:

  • A message broker (required for the background tasks message queue). We recommend either RabbitMQ or Redis.
  • A database (required for the core application). We recommend PostgreSQL, but SQLite is supported as well. Other database systems might work too (e.g. MySQL), but are currently not officially supported. If you need to run QuantifiedCode on a non-supported database, please get in touch with us and we'll be happy to provide you some guidance.

Download the QuantifiedCode source code

Now with the dependencies installed, we can go ahead and download QuantifiedCode:

git clone [email protected]:quantifiedcode/quantifiedcode.git

Set up a virtual environment (optional)

In addition, it is advised to create a (Python 2.7) virtual environment to run QuantifiedCode in:

virtualenv venv

#activate the virtual environment
source venv/bin/activate

Install the required Python packages

QuantifiedCode manages dependencies via the Python package manager, pip. To install them, simply run

pip install -r requirements.txt

Edit Settings

QuantifiedCode gets configured via YAML settings files. When starting up the application, it incrementally loads settings from several files, recursively updating the settings object. First, it will load default settings from quantifiedcode/settings/default.yml. Then, it will check if a QC_SETTINGS environment variable is defined and points to a valid file, and if so it will load settings from it (possibly overwriting default settings). If not, it will look for a settings.yml file in the current working directory and load settings from there. Additionally, it will check if a QC_SECRETS environment variable is defined and points to a valid file, and also load settings from there (this is useful for sensitive settings that should be kept seperate from the rest [e.g. to not check them into version control]).

There is a sample settings.yml file in the root of the repository that you can start from.

Running the Setup

After editing your settings, run the setup command via

#run from the root directory of the repository
python manage.py setup

The setup assistant will iteratively walk you through the setup, and when finished you should have a working instance of QuantifiedCode!

Running the web application

To run the web application, simply run

python manage.py runserver

Running the background worker

To run the background worker, simply run

python manage.py runworker

Docker-Based Installation

Coming Soon!

Ansible-Based Installation

Coming Soon!

checkmate's People

Contributors

adewes avatar programmdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

checkmate's Issues

__init__.py needs to have imports for the different sub-modules

Traceback (most recent call last):
  File "manage.py", line 1, in <module>
    from quantifiedcode.settings import settings
  File "/root/quantifiedcode/quantifiedcode/settings/__init__.py", line 1, in <module>
    from .base import * #noqa
  File "/root/quantifiedcode/quantifiedcode/settings/base.py", line 12, in <module>
    from quantifiedcode.helpers.settings import Settings, load_settings
  File "/root/quantifiedcode/quantifiedcode/helpers/settings.py", line 13, in <module>
    from checkmate.settings import Settings as CheckmateSettings
ImportError: No module named checkmate.settings

Once I patch __init__.py (all of them) with a simple from . import *,

Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from quantifiedcode.backend.commands import commands
  File "/root/quantifiedcode/quantifiedcode/backend/commands/__init__.py", line 6, in <module>
    from .server import runserver
  File "/root/quantifiedcode/quantifiedcode/backend/commands/server.py", line 2, in <module>
    from quantifiedcode.app import get_app
  File "/root/quantifiedcode/quantifiedcode/app.py", line 21, in <module>
    from quantifiedcode.backend.app import get_app as get_backend_app
  File "/root/quantifiedcode/quantifiedcode/backend/app.py", line 22, in <module>
    from .api.v1 import routes as routes_v1
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/__init__.py", line 1, in <module>
    from .routes import routes
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/routes.py", line 51, in <module>
    from .issue import (
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/issue.py", line 18, in <module>
    from .forms.issue_status import IssueStatusForm
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/forms/issue_status.py", line 6, in <module>
    class IssueStatusForm(Form):
  File "/root/quantifiedcode/quantifiedcode/backend/api/v1/forms/issue_status.py", line 9, in IssueStatusForm
    ignore_reason = SelectField(u"Ignore Reason", choices=[(str(Issue.IgnoreReason.false_positive),"false positive"),
AttributeError: type object 'Issue' has no attribute 'IgnoreReason'

when will checkmate be completed?

This is a very good project! But I want to know when it will be completed. This version has some bugs and I can't run it. I'm looking forward to your reply! Thank you!

Add support for Python3

I have certain requirements where I would like to use checkmate but AFAICS checkmate only supports Python 2.7. Is supporting Python 3 on the roadmap?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.