Giter Site home page Giter Site logo

mikekutzma / pep8speaks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pep8speaks-org/pep8speaks

0.0 2.0 0.0 3.79 MB

A GitHub :octocat: app to automatically review Python code style over Pull Requests

Home Page: https://pep8speaks.com

License: GNU Affero General Public License v3.0

Python 99.49% HTML 0.51%

pep8speaks's Introduction

PEP8 Speaks Build Status Code Health

A GitHub :octocat: integration to automatically review Python code style over Pull Requests

"PEP8 unto thyself, not unto others" - Raymond Hettinger

Example

How to Use?

  • Go to the homepage of the Integration
  • Click on Install button
  • Add the repositories you want this service for

Features

  • The bot makes a single comment on the PR and keeps updating it on new commits. No hustle on emails !
  • The bot comments only if Python files are involved. So, install the integration on all of your repositories. The bot won't speak where it should not
  • Comment @pep8speaks suggest diff in a comment of the PR, and it will comment a gist of diff suggesting fixes for the PR. Example
  • You can also comment @pep8speaks suggest the diff or anything you wish, as long as you mention the bot and have suggest and diff keywords.
  • Comment @pep8speaks pep8ify on the PR and it will create a Pull Request with changes suggested by autopep8 against the branch of the author of the PR. autopep8 fixes most of the errors reported by pycodestyle.
  • Add [skip pep8] anywhere in the commit message, PR title or PR description to prohibit pep8speaks to comment on the Pull Request.
  • To pause the bot on a PR, comment @pep8speaks Keep Quiet.
  • Comment @pep8speaks Resume now. to resume.
  • The keywords are quiet and resume and the mention of the bot.

Configuration

A config file is not required for the integration to work. However it can be configured additionally by adding a .pep8speaks.yml file to the base directory of the repo. Here are the available options of the config file :

# File : .pep8speaks.yml

message:  # Customize the comment made by the bot
    opened:  # Messages when a new PR is submitted
        header: "Hello @{name}, Thank you for submitting the Pull Request !"
                # The keyword {name} is converted into the author's username
        footer: "Do see the [Hitchhiker's guide to code style](https://goo.gl/hqbW4r)"
                # The messages can be written as they would over GitHub
    updated:  # Messages when new commits are added to the PR
        header: "Hello @{name}, Thank you for updating !"
        footer: ""  # Why to comment the link to the style guide everytime? :)
    no_errors: "Cheers ! There are no PEP8 issues in this Pull Request. :beers: "

scanner:
    diff_only: False  # If True, errors caused by only the patch are shown

pycodestyle:
    max-line-length: 100  # Default is 79 in PEP8
    ignore:  # Errors and warnings to ignore
        - W391
        - E203

only_mention_files_with_errors: True  # If False, a separate status comment for each file is made.
descending_issues_order: False # If True, PEP8 issues in message will be displayed in descending order of line numbers in the file

Check out the default configuration options.

Note : See more pycodestyle options

How to fix?

  • Check the errors locally by the command line tool pycodestyle (previously known as pep8).
  • autopep8 is another command line tool to fix the issues.

Popular Users


Pandas

SunPy

Astropy

Scikit Learn Contrib

Scikit Image

Spyder IDE

Private repos

Deploy

The integration only works for publicly hosted repositories. So if you are looking to deploy a fork of it or use the integration for private repositories, here are the instructions.

Contribute

This is a very young project. If you have got any suggestions for new features or improvements, please comment over here. Pull Requests are most welcome !

❤️


Created using commits.io

This project does not endorse all of the rules of the original PEP8 and thus believes in customizing the pycodestyle.

pep8speaks's People

Contributors

ashwch avatar canihavesomecoffee avatar khanchi97 avatar matheus-manoel avatar orkohunter avatar pep8speaks avatar

Watchers

 avatar  avatar

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.