GithubHelp home page GithubHelp logo

mahopanda / code-duck Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 9 KB

This is an OpenAI-powered Python code analysis tool for reviewing code and making suggestions. It traverses a specified directory, conducting detailed analyses of functions and classes, and evaluates their adherence to SOLID principles and Pythonic style.

License: MIT License

Python 100.00%

code-duck's Introduction

Code Duck

A Python code analysis tool using OpenAI.

Prerequisites

Before using Code Duck, ensure you have an active account with OpenAI. You will need to generate an OpenAI API Key to utilize this tool. If you haven't already, sign up for OpenAI and follow their documentation to obtain your API key.

Installation

Before the package is available on PyPI, you can build and install it directly from the source code.

Build from Source

  1. Clone the repository:
git clone https://github.com/Mahopanda/code-duck.git
cd code-duck
  1. Build the package:
python3 setup.py bdist_wheel
  1. Install the package from the built wheel:
pip install dist/code_duck-<version>-py3-none-any.whl

Replace with the version number of the package. For example, if the version is 0.1.0, then the filename would be code_duck-0.1.0-py3-none-any.whl.

Usage

code-duck -d /path/to/your/directory -k your_openai_key -m model_name -p

  • -d: Directory to analyze.
  • -k: OpenAI API Key.
  • -m: OpenAI Model to use.
  • -p: Show progress.

Analysis Output

After running Code Duck, an analysis file will be generated alongside each .py file in the specified directory. These files provide detailed feedback and suggestions for improving the code quality. Developers can refer to this analysis while editing the original code. Once the necessary changes are made, the analysis files can be deleted.

Remember, Code Duck provides insights based on OpenAI models, so while the feedback is often valuable, use your own judgment when considering the suggestions.

code-duck's People

Contributors

mahopanda avatar

Stargazers

world4jason avatar Wilson avatar roxanne avatar  avatar Kuo-Ming Lin (Kalvar) avatar

Watchers

 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.