Skip to main content

An example of a package developed with pipenv, built with build using setuptools, uploaded to PyPI using twine, and distributed via pip.

Project description

MyCodeBuddy

Python build & test

A Python package designed to assist you throughout your coding projects. This package allows users to receive debugging tips, fun facts, resources for language help, and has a study timer to help users stay focused.

Teammates

Link to package on PyPI

MyCodeBuddyProject

Developer Instructions

Step 1: Install the Package

To use MyCodeBuddyProject in your project, first install it from PyPI. In your terminal or command prompt, type:

pip install mycodebuddyproject

Step 2: Import Package

After installing the package, import mycodebuddyproject functions so they can be used directly in your code.

A sample program can be found here.

import src.mycodebuddyproject.get_debug_tips as debug
import src.mycodebuddyproject.get_help as get_help
import src.mycodebuddyproject.fun_facts as fun_facts
from src.mycodebuddyproject.study_timer import StudyTimer

print("Get a debugging tip for runtime errors")
print(debug.debug_tip("runtime"))

print("# Get a documentation link for Python")
print(get_help.language_help("python"))

print("Get a fun fact about Python features")
print(fun_facts.get("features"))

print("Start a study timer for 2 minutes")
timer = StudyTimer()  # Create an instance of StudyTimer
timer.start(25)       # Start a 25-minute study session
timer.pause()         # Pause the session
timer.resume()        # Resume the session
timer.cancel()        # Cancel the session

Functions

debug_tip(error_type)

Returns a random debugging tip for the specified error type.

  • Parameters:
    • error_type (str): The type of error ("syntax, "runtime", "logic").
  • Returns: random debugging tip
Example
debug_tip("runtime")
# Output: "Are you trying to divide by 0? This will cause an error."

language_help(language)

Returns a link to documentation for a specified programming language.

  • Parameters:
    • language (str): The programming language name.
  • Returns: a link to documentation.
Example
language_help("python")
# Output: "https://docs.python.org/3/"

get(fact_type)

Returns a random fun fact for the specified fact type.

  • Parameters:
    • fact_type (str): The type of fact ("features", "libraries", "trivia", "performance").
  • Returns: random fun fact
Example
get("features")
# Output: "Python uses indentation (whitespace) to define code blocks instead of braces {}."

Study Timer

start(timer_length)

Starts timer with length specified in minutes.

  • Parameters:
    • timer_length (str): The desired length of the timer in minutes.
  • Returns:
    • No return value

pause()

Pauses current timer.

  • Parameters:
    • no parameters
  • Returns:
    • No return value

resume()

Resumes paused timer.

  • Parameters:
    • no parameters
  • Returns:
    • No return value

cancel()

Ends current session.

  • Parameters:
    • no parameters
  • Returns:
    • No return value
Example
timer = StudyTimer() # Instantiate study timer class
timer.start(25) 
# Output: 
# Study session started! Good luck, you got it!!
#Enter 'pause' to pause the session at any time.
timer.pause()         # Pause the session
# Output:
# Study session paused, please enter 'resume' when you want to resume.
timer.resume()        # Resume the session
# Output:
# Resuming now.
timer.cancel()        # Cancel the session
#Output:
# Study session canceled.

Developer Contributions

If you’d like to contribute:

  1. Clone the repository using:

    git clone https://github.com/software-students-spring2025/3-python-package-float.git
    cd 3-python-package-float
    
  2. Create and run virtual environment

    # Install or update pipenv if needed
    pip install --upgrade pipenv
    
    # Create virtual environment and install dependencies
    pipenv install --dev
    
    # Activate virtual environment
    pipenv shell
    
  3. Create a new branch and make your changes.

    git checkout -b branch-name
    
  4. Run all pytests with the following command:

    pytest
    
  5. Build the package with the following command:

    python -m build
    
  6. Commit and push changes

    git add .
    git commit -m "description of changes"
    git push origin branch-name
    
  7. Make a pull request on this project's repository on Github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mycodebuddyproject-0.1.1.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mycodebuddyproject-0.1.1-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file mycodebuddyproject-0.1.1.tar.gz.

File metadata

  • Download URL: mycodebuddyproject-0.1.1.tar.gz
  • Upload date:
  • Size: 50.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for mycodebuddyproject-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3f105db31f2313e4ffaae7c7c95f763f493634e6e4634192bb75adeb65dfa1b3
MD5 754ea98545e410824f4063f834fb782d
BLAKE2b-256 c0cd1b58d8f41254f5035efe0e885acd3ebb3a75c09b097a4e5dfa88153a2f8f

See more details on using hashes here.

File details

Details for the file mycodebuddyproject-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mycodebuddyproject-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0fe2d7c8cbc2e1825d380ae2cf07f9efb42ae14fa727a279bf147558fb5e662d
MD5 c53d0d3ce8011c8860c6220f9c4874f1
BLAKE2b-256 da7cfd67e0e26afec174fd2a4812254b1ddd883998cf757f0f21a6b34d6c4cf4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page