Git Product home page Git Product logo

nachokhan / pstruc_example Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 914 KB

A practical showcase of AI-assisted coding using PStruc and ChatGPT, highlighting iterative development and project optimization across three versions with detailed documentation of changes.

Home Page: https://pypi.org/project/pstruc/

Python 100.00%
ai-assisted-development chatgpt code-optimization python software-documentation coding-automation project-enhancement pstruc

pstruc_example's Introduction

PStruc Example Project

This project demonstrates the PStruc library usage for enhancing a project with ChatGPT's assistance. PStruc creates a pstruc_example.yaml file, which, along with specific questions, is provided to ChatGPT. The insights or enhancements suggested by ChatGPT are then used to modify the code.

The project is split into three versions, each representing a stage of development:

  • version_1: Initial version with potential code issues and missing elements.
  • version_2: Revised code based on ChatGPT's suggestions, improved to adhere to PEP8 guidelines.
  • version_3: Further enhancements and feature additions proposed by ChatGPT.

Each version folder contains the project files and a readme.md file, detailing the ChatGPT interactions and suggested modifications. The readme.md in version_1 is empty as it's the starting point.

Note: Setting up and running the project is optional and mainly for experimentation with ChatGPT enhancements.

Setup Instructions

1. Clone the repository.

git clone https://github.com/nachokhan/pstruc_example.git

2. Create and activate the virtual environment:

python -m venv .env
source .env/bin/activate

3. Install dependecies.

pip install -r requirements.txt

4. Run the code

python main.py

USing PStruc

Run the following command to generate the project structure:

pstruc -ip ".env",".git","*pycache*","*.yml","version_*","readme.md" -fc "*.py" -o pstruc_example -f yaml

Argument Explanation

  • -ip: Ignores specified patterns like .env, .git, *pycache*, *.yml, version_*, and readme.md.
  • -fc: Includes the content of Python files (*.py).
  • -o: Sets the output file's name as pstruc_example.yaml.
  • -f: Chooses YAML as the output format.

The command generates a pstruc_example.yaml file, representing the project's structure, including Python files' content while excluding the defined patterns.

pstruc_example's People

Contributors

nachokhan avatar

Stargazers

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