Giter VIP home page Giter VIP logo

blue-chip's Introduction

PyPI version Build Status Coverage Status Language grade: Python Total alerts Code style: black

blue-chip

One click Python code quality package

blue-chip uses black, isort, invoke and prospector configured to work well together out of the box.


Install

The recommended installation method when installing globally is to use pipx

pipx install blue-chip

Otherwise (for best results) use pip to install directly into your project's virtual environment.

pip install blue-chip

Using poetry.

poetry add --dev blue-chip

Using pipenv you need to pin the version.

pipenv install --dev blue-chip==0.0.8

Command-line use

List the possible blue-chip commands with bc --list

$bc --list

Subcommands:

  fmt    Format python source code.
  lint   Run static analysis on python source code.
  sort   Sort module imports.

Enterprise use

Enterprise teams may find it useful to fork and redistribute this package with their own custom defined standards.

In many cases this is a simple as changing the package name and values in blue_chip/constants.py.

For fine grain control of the static analysis tools, edit the prospector profiles in blue_chip/config.

blue-chip's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar kilo59 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tubbz-alt

blue-chip's Issues

integrate isort

compatible settings at the end of black's readme on wrapping lines

[tool.isort]
multi_line_output = 3
include_trailing_comma = "True"
force_grid_wrap = 0
use_parentheses = "True"
line_length = 88

Probably need to use the command line because we can't rely on this file being present for users.

better cli?

Using invoke as the cli runner makes the project code dead simple, and seems to work fine.

However since some of the dependent tools already require click, it wouldn't add *any new dependencies to start using click (or typer).

  1. Are there compelling reasons to switch to click/typer library?

Pro

  • dedicated cli library
  • ??

Con

  • code becomes more complex
  • teams that fork/copy repo can no longer just plug in their existing invoke tasks
  • ??

integration with code editors

Editors to support

  • VS code
  • Pycharm/IntelliJ
  • others?

Possible integration methods

  1. expose specific command-line arguments supplied

    • black
    • isort
    • prospector
  2. supply configuration file path

  3. create/append configuration file settings

    • black
    • isort
    • prospector

update dependencies (isort, prospector)

New version of isort (5) has greatly simplified integration with black via the --profile black option.
New version of prospector uses new pylint which reverted the logging-format-style setting.

  • isort update
  • prospector update

better documentation

  • decide on documentation tools
  • create doc publishing pipeline(github action?)
  • demo use gif

consider dropping prospector

Prospector requires using the copy-left GNU Public license and prevents using the latest versions of static analysis tools.
#35

Prospector profiles

Create a set of prospector profiles with settings compatible with the default black formatting rules.

  • audit/parent
  • default
  • test
  • docstrings

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.