A package that provides fortune telling features, developed with pyenv, built with build using setuptools, uploaded to PyPI using twine, and distributed via pip.
Project description
Python Package Exercise
An exercise to create a Python package, build it, test it, distribute it, and use it. See instructions for details.
Team Members
- Boming Zhang (bz2196) GitHub Profile
- Annabeth Gao (mg6839) GitHub Profile
- Jack Zhang (yz6973) GitHub Profile
Product Description
Pytarot is a lighthearted Python package designed to offer fun and whimsical insights into life’s mysteries. This package includes:
- Random Answers of Wisdom: Provides insightful or humorous responses to user questions.
- Daily Action: Randomly generate positive reminders and suggestions for the day.
- True Lover Generator: Randomly generates a “true lover” profile for fun.
- Lucky Day Generator: Suggests a lucky day in the current month for the user.
A link to the Pytarot package on PyPI: https://pypi.org/project/pytarot/0.1.0/
System Setup and Environment Configuration Guide
Prerequisites
- Python (version 3.6 or later)
- pip (Python package installer)
- pipenv (for managing virtual environments)
Installation Steps
-
Clone the Repository:
git clone https://github.com/yourusername/pytarot.git cd pytarot
-
Set Up Virtual Environment with Pipenv: Initialize a virtual environment and install dependencies in editable mode:
pipenv install -e .
-
Activate the Virtual Environment: Start the virtual environment created by
pipenv:pipenv shell -
Running the Package
You can run individual functions directly in the Python interactive shell or use themain.pyscript.Running Functions in Python Shell
Open the Python shell:python
-
Import and test the package functions:
from pytarot import get_answers_of_wisdom, get_lucky_day, get_true_lover, get_positive_action print(answersofwisdom.get_answers_of_wisdom()) print(luckyday.get_lucky_day()) print(truelover.get_true_lover()) print(positive_action.get_positive_message())
-
Running
main.py
Alternatively, you can execute themain.pyfile to run the package as a script:python main.py -
Deactivate the Virtual Environment
When you’re done, exit thepipenvshell:exit -
How to Run Unit Tests
Unit tests are located in thetestdirectory and can be run usingpytest.Install pytest (if not already installed in the virtual environment):
pipenv install pytest
-
Run Tests: Run all tests from the main project directory:
python -m pytest
Contributing to Pytarot
We welcome contributions from developers who want to improve Pytarot! Please follow the steps below to set up your development environment.
Setting Up the Development Environment
-
Fork the Repository: First, fork the repository to your GitHub account.
-
Clone Your Fork:
git clone https://github.com/yourusername/pytarot.git cd pytarot
-
Set Up a Virtual Environment with Pipenv: Install all dependencies in editable mode:
pipenv install -e .
-
Activate the Virtual Environment:
pipenv shell -
Install Development Dependencies: If there are additional tools like
pytestfor testing, make sure they’re installed:pipenv install --dev
-
Building and Testing:To ensure your changes work as expected, please follow these steps:
Run Unit Tests: Make sure all tests pass before submitting a pull request.
python -m pytest
Make Your Changes: Implement new features or bug fixes in your development branch.
Commit and Push Changes: Use meaningful commit messages.
git add . git commit -m "Description of changes" git push origin branch-name
Submit a Pull Request: Open a pull request on the main repository for review.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytarot-0.1.1.tar.gz.
File metadata
- Download URL: pytarot-0.1.1.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebbb5af257cc4adabe2e5dc8bcd5fd1076066ab26e05ba6e42f065322aea7846
|
|
| MD5 |
ee163cf50be6e1e3c38db374add3db19
|
|
| BLAKE2b-256 |
3b07ed1c522e0c42168c7e6c28bf945c271e5540dd602c0063ae42b412d86ebc
|
File details
Details for the file pytarot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pytarot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54d28e436792ec1a8e0c9275762755ca442be1510cd56dac59b0442f55da7154
|
|
| MD5 |
5979155c30682778ccf714fdabd2e0b6
|
|
| BLAKE2b-256 |
e2a267f5cd48696209d5d652e19980ba1779eeb4e5ce2c8a26bb8ba0e46d0ad8
|