No project description provided
Project description
Desert Tortoise Digital Pet Package
This package was created by following Packaging Python Projects with pipenv for virtual environment and dependency management. It provides a playful ASCII-art digital pet system where users can adopt pets from a shelter, feed them, play with them, put them to sleep, and inspect their status.
How this package was created
- Set up project files including LICENSE, README.md, Pipfile, pyproject.toml, source package directory, and tests.
- Implemented an abstract base class for shared pet behavior and concrete species classes.
- Added a shared shelter module to manage species inventory and adoption/return flows.
- Added unit tests using pytest.
- Added GitHub Actions CI to run tests on pull requests to main for Python 3.11 and 3.12.
- Configured package metadata in pyproject.toml.
Current high-level structure:
3-package-desert_tortoise/
|____README.md
|____LICENSE
|____Pipfile
|____pyproject.toml
|____example.py
|____tests/
|____desert_tortoise/
|______init__.py
|____pet.py
|____parrot.py
|____bunny.py
|____cat.py
|____dog.py
|____tortoise.py
|____shelter.py
PyPI Website
How to install and use this package
Install from PyPI
pip install desert-tortoise-pet-package
Local development install
git clone https://github.com/swe-students-spring2026/3-package-desert_tortoise.git
cd 3-package-desert_tortoise
pipenv install --dev
pipenv run pip install -e .
Basic usage
from desert_tortoise import Parrot
pet = Parrot.adopt("Kiwi")
pet.feed("seeds", 2)
pet.play("mirror")
pet.sleep(1)
print(pet.status())
Full example program
The complete example that demonstrates all current pet classes is in example.py.
Run it with:
pipenv run python example.py
API overview
Each pet class supports the following argument-driven functions:
- adopt(name: str)
- feed(food_type: str, amount: int = 1)
- play(type_of_toy: str)
- sleep(time: int = 5)
- status()
Available classes exported by the package:
- Parrot
- Bunny
- Cat
- Dog
- Tortoise
Shared shelter helper module:
- shelter.has_available(species)
- shelter.adopt_one(species)
- shelter.return_one(species, default_name)
- shelter.snapshot()
How to run unit tests
pipenv install --dev
pipenv run pytest -q
Tests should not fail. Any failing test indicates behavior mismatch or a regression.
How to build and publish
Install build tools:
pipenv install --dev build twine
Build distributions:
pipenv run python -m build
Verify package files:
tar --list -f dist/desert_tortoise_pet_package-1.0.0.tar.gz
Upload to TestPyPI:
pipenv run twine upload -r testpypi dist/*
Upload to PyPI:
pipenv run twine upload dist/*
When releasing a new version:
- Delete dist directory.
- Delete generated egg-info metadata if present.
- Bump version in pyproject.toml.
- Rebuild and upload again.
Continuous integration
This repository uses GitHub Actions to run tests on pull requests into main using Python 3.11 and 3.12.
Workflow file:
- .github/workflows/build.yml
Contribution workflow
- Create a feature branch from main.
- Implement changes and tests.
- Open a pull request into main.
- Request teammate review.
- Merge after review and passing CI.
Team Member
Environment variables and secret files
No environment variables or secret configuration files are required for the current implementation.
If this changes in the future, include an env.example file with dummy values and document setup steps here.
License
MIT License. See License for details.
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 desert_tortoise_virtual_pet_package-1.0.2.tar.gz.
File metadata
- Download URL: desert_tortoise_virtual_pet_package-1.0.2.tar.gz
- Upload date:
- Size: 50.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
372831183bb76089b595725e4fd252204644a8d38b20174483f1837afe88db29
|
|
| MD5 |
8ca9c6abb43ed7ea7feda1c00f10f428
|
|
| BLAKE2b-256 |
e7aebae9c1fc461dc24fc7f3147fe54f6243b402a4b34d167a5977ea3ee6a237
|
File details
Details for the file desert_tortoise_virtual_pet_package-1.0.2-py3-none-any.whl.
File metadata
- Download URL: desert_tortoise_virtual_pet_package-1.0.2-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e58a0b8cba04fbbcdfb81f0a235179efbfb42a0b4b58775ff441e26064d3b6
|
|
| MD5 |
68aa09101369e0c337cf05be5f284dfb
|
|
| BLAKE2b-256 |
202f08c95fa0a93f3b4b32df9518018e0d9713bbaa5af8f78a586c518874cb70
|