Skip to main content

Python build & test

GPT Coder

Description

This package is designed to help users write better and more fun code. It allows users to modify the conciseness, commenting, and readability of the code returned by the GPT model. Through the usage of this package, users can expect code responses that are more tailored towards their preferences.

Instructions

Ensure that you already have pipenv installed. If not, you can install it by running the following command:

pip install pipenv

In order to use our package, run this line in your terminal:

pip install gptcoder

Then, add this line to the top of your file:

from gptcoder import GPTCoder

Functions

  1. set_language

    • Description: This function sets the language of the code to be generated.
    • Parameters:
      • language_code: int
        • Description: The code corresponding to the programming language of the code to be generated.
        • Values: 1. Python, 2. JavaScript, 3. Java, 4. C, 5. C++, 6. C#, 7. TypeScript, 8. PHP, 9. Swift, 10. Ruby
        • Default: 1
  2. set_conciseness

    • Description: This function sets the conciseness of the code to be generated.
    • Parameters:
      • conciseness: int
        • Description: The conciseness of the code to be generated.
        • Values: 1-10
        • Default: 1
  3. set_commenting

    • Description: This function sets the commenting of the code to be generated.
    • Parameters:
      • commenting: int
        • Description: The commenting of the code to be generated.
        • Values: 1-10
        • Default: 5
  4. set_readability

    • Description: This function sets the readability of the code to be generated.
    • Parameters:
      • readability: int
        • Description: The readability of the code to be generated.
        • Values: 1-10
        • Default: 10
  5. generate_code

    • Description: This function generates code based on the given prompt.
    • Parameters:
      • code_prompt: str
        • Description: The prompt for the code to be generated.
        • Values: Any string
        • Default: None

Contributing

To contribute to this project, follow these steps:

  1. Set up the virtual environment

    pip install pipenv
    cd path/to/project
    pipenv shell
    
  2. Install dependencies:

    Our project's dependencies are listed in the Pipfile. You can install them with pipenv:

    pipenv install gptcoder
    
  3. Build the package:

    The package can be built using the pyproject.toml file, which contains the build system (poetry) and the project metadata. To build the package, run:

    python3 -m build
    

How to run unit tests

Simple example unit tests are included within the tests directory. To run the tests:

  1. Install pytest in a virtual environment.
  2. Run the tests from the main project directory: python3 -m pytest.
  3. Tests should never fail.

Demo

Demo Program

Team Members

Package Page

gptcoder on PyPi

Metadata

Release files for gptcoder 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gptcoder 0.1.5
File Size Uploaded
gptcoder-0.1.5.tar.gz 43.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gptcoder 0.1.5
File Interpreter ABI Platform
gptcoder-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 72.0 kB

Release files / gptcoder-0.1.5.tar.gz

Download URL gptcoder-0.1.5.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
92d8b66b1b25e18596ccebe00368f3f6fd7bc191f6a79abb576a391725150f04
BLAKE2b-256 checksum
How to use checksums
d9a658142b4eadfb9aa6581c2ae5bb1da3e1b842cd964b8a0ac12d642b5a0ad8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / gptcoder-0.1.5-py3-none-any.whl

Download URL gptcoder-0.1.5-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19f30c7b3c82b6e8d75b5829e20451ebfad7676a49965c4ee22c6b251d768426
BLAKE2b-256 checksum
How to use checksums
1da8541e3267e621a449fc60102fb527b9c3d09fbbea7f6bf20c60ab8624081e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page