Giter Club home page Giter Club logo

pyaud's Introduction

pyaud

License PyPI Build CodeQL pre-commit.ci status codecov.io readthedocs.org python3.8 Black isort docformatter pylint Security Status Known Vulnerabilities pyaud

Framework for writing Python package audits

The pyaud framework is designed for writing modular audits for Python packages

Audits can be run to fail, such as when using CI, or include a fix

Fixes can be written for whole directories or individual files

Plugins can be written for manipulating files

Supports single script plugins

Installation

$ pip install pyaud

Usage

Commandline

usage: pyaud [-h] [-v] [-f] [-n] [-s] [--audit LIST] [--exclude EXCLUDE] MODULE

positional arguments:
  MODULE             choice of module: [modules] to list all

optional arguments:
  -h, --help         show this help message and exit
  -v, --version      show program's version number and exit
  -f, --fix          suppress and fix all fixable issues
  -n, --no-cache     disable file caching
  -s, --suppress     continue without stopping for errors
  --audit LIST       comma separated list of plugins for audit
  --exclude EXCLUDE  regex of paths to ignore

Plugins

pyaud will search for a plugins package in the project root

To register a plugin package ensure it is importable and prefix the package with pyaud_

The name pyaud_plugins is reserved and will be automatically imported

To view available plugins see pyaud-plugins README or run pyaud modules all

For writing plugins see docs

Configure

Configuration values are declared in the pyproject.toml file

[tool.pyaud]
audit = [
  "commit-policy",
  "const",
  "docs",
  "files",
  "format",
  "format-docs",
  "format-str",
  "imports",
  "lint",
  "params",
  "test",
  "typecheck",
  "unused"
]
exclude = '''
  (?x)^(
    | docs\/conf\.py
    | whitelist\.py
  )$
'''

pyaud's People

Contributors

dependabot[bot] avatar jshwi avatar pre-commit-ci[bot] avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  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.