Skip to content
generated from tweag/project

FawltyDeps GitHub Action to lint packages for undeclared or unused 3rd-party dependencies

License

Notifications You must be signed in to change notification settings

tweag/FawltyDeps-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Code of conduct

FawltyDeps GitHub Action

This FawltyDeps GitHub Action lints packages for undeclared or unused 3rd-party dependencies.

See more about FawltyDeps:

FawltyDeps is a dependency checker for Python that finds undeclared and/or unused 3rd-party dependencies in your Python project. The name is inspired by the Monty Python-adjacent Fawlty Towers sitcom.

Table of contents

Key Concepts

Usage

Inputs

Outputs

Example usage

Documentation

Development

Key Concepts

This allows you to run FawltyDeps as part of an independent GitHub action.

Usage

This action will run fawltydeps in the project directory for a Python codebase. See the FawltyDeps - Configuration documentation for more on how to configure this tool.

Inputs

options

Optional command line arguments to fawltydeps.

Example usage

You need to use a checkout action before the FawltyDeps action.

For simple usage, save this in your project as .github/workflows/lint.yml:

---
name: Lint

on: pull_request

jobs:
  lint:
    name: FawltyDeps
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v4
      - name: lint - FawltyDeps
        uses: tweag/[email protected]

Here is a more advanced example with customized command line options:

      - name: lint - FawltyDeps
        uses: tweag/[email protected]
        with:
          options: --detailed --exclude vendor/

Invoking FawltyDeps using options: --detailed yields good results when you just want to see what problems may be present. That is now the default, if you do not specify any options. You can also configure FawltyDeps through the [tool.fawltydeps] section in your project's pyproject.toml file, see [Configuration](https://github.com/tweag/FawltyDeps#configuration] in the main FawltyDeps documentation for more details.

Documentation

This action was inspired by and partially derived from the MIT-licensed black and isort-action GitHub actions.

Development

For details on setting up your development environment, please refer to the contributing guidelines of how to set up your development environment in our CONTRIBUTING.md file.