Package: pyprankerror
PyPrankErrorPyPrankError is a Python package that lets the user create silly (or serious) error messages, stack traces, crash reports, and hacked messages for a pranks purpose.Team membersNathalia XuRobert (Bobby) ImpastatoPhoebus YipAlicia Hwanglink to our package's page on the PyPI websiteHow to Install and UseInstallpipenvif you have not already done so:pip install pipenvIn your project directory, runpipenv install -i https://test.pypi.org/simple/ pyprankerror==1.0.2.
(If you get error, includepython -mbefore pipenv.)Or if it does not work, runpip install pyprankerror==1.0.2To activate virtual environment:pipenv shellNow import pyprankerror to use it your own program:from PyPrankError import pyprankerror(If import gives back error, change it toimport pyprankerror)Documentation for all functions:generate_hacked_message(is_long, is_silly)Description: Returns a message that makes it look like the user is being hacked. Return nothing.is_long (bool): False indicates shorter output, True indicates longer output.is_silly (bool): True indicates silly less realistic and silly variable and function names.generate_stacktrace(length, is_silly)Description: Prints a fake stack trace and returns nothing.length (int): 0 indicates short (9 lines) output, 1 indicates long (26 lines) output.is_silly (bool): True indicates less realistic and silly variable names in the stack trace.generate_crash_report(is_long, is_silly)Description: Prints a fake crash reportis_long (bool): False indicates shorter (19 lines) output, True indicates longer output (38 lines).is_silly (bool): True indicates a silly and less realistic crash report.generate_error(err_type, isSilly)Description: Returns a fake error messageerr_type (str): Indicate a “syntax”, “runtime” or “logical” error type.is_silly (bool): True indicates silly and less realistic and crash report.Example projectRunpython example-program.pyHow to contributeTo test, build, and distribute with GitHub repo codeTo contribute to our package, please clonethisrepository.Move into the project directory and proceed to following steps:Installpipenvif you have not already done so:pip install pipenvIf you have already installed but cannot usepipenv, usepython -m pipenvfor allpipenvcommands instead.Activate the virtual environment and install project dependencies with pipenv:pipenv --python 3.x# Replace '3.x' with your desired Python versionActivate the virtual environment:pipenv shell(You might need to installpipenvin the virtual environment again if you receive error when activating it.)Install project dependencies, including dev packages:pipenv install --devTest the source code with Pytest from the main project directory:pytestInstall build if you haven't:pip install buildWhen you are satisfied with the change and wish to build and distribute, make the build:python -m build, increment the version number, and then upload to GitHub or PyPI depending on the need of the developers.To test, build, and distribute with package from PyPITryinstalling and using your packagein a separate Python projectInstallpipenvif you have not already done so:pip install pipenvCreate a pipenv-managed virtual environment and install the latest version of your package installed:pipenv install -i https://test.pypi.org/simple/ pyprankerror==1.0.2(Note that if you've previously created a pipenv virtual environment in the same directory, you may have to delete the old one first. Find out where it is located with the pipenv --venv command.)Activate the virtual environment:pipenv shellWrite test code. Note that when testing a PyPI package, the import statement should look likefrom PyPrankError import pyprankerror. If you use any test code from the repository, remove thesrc.in the import statements.Test the source code with Pytest from the root directory:pytestInstall build if you haven't:pip install buildInclude a pyproject.toml file. You can copy from the repository and increment the version number.When you are satisfied with the change and wish to build and distribute, make the build:python -m buildand then upload to GitHub or PyPI depending on the need of the developers.