Giter Site home page Giter Site logo

gitrisky's Introduction

gitrisky

MIT License PyPI pyversions Build Status codecov hasbadges

Predict code bug risk with git metadata

Installation

Installation with pip is recommended:

pip install gitrisky

Note that gitrisky requires numpy. If you don't already have it pip will try to install it for you, but this can result in a suboptimal build, see e.g. here.

For development a few additional dependencies are required:

pip install -r requirements-dev.txt

Usage

gitrisky is installed as a command line tool.

Usage: gitrisky [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  predict  Score a git commit bug risk model.
  train    Train a git commit bug risk model.

The typical workflow is to first train a model on the existing commit history of a repository:

$ cd repo/
$ gitrisky train
Model trained on 69 training examples with 14 positive cases

and then use the trained model to score subsequent commits:

$ gitrisky predict
Commit 910cdb3c has a bug score of 0.2 / 1.0

When invoked without any extra arguments gitrisky predict will score the most recent commit. You can also score a particular commit with the -c flag:

$ gitrisky predict -c 470741f
Commit 470741f has a bug score of 0.7 / 1.0

How does it work?

See this PyData talk for an explanation of how gitrisky works.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for information about contributing to this project.

License

The code in this project is licensed under the MIT license. See LICENSE for details.

Acknowledgements

The initial prototype of gitrisky was developed at Civis Analytics during my 'Hack Time' (time explicitly allotted to explore offbeat ideas) .

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.