A comprehensive, professional Python package that tests knowledge about mushroom cultivation techniques, varieties, substrates, terminology, and medicinal properties. This educational tool provides an interactive learning experience for mushroom cultivation enthusiasts at all skill levels.
- ๐ฆ Installable Python Package:
pip install -e .for system-wide access - ๐ฏ Modular Design: Clean separation of concerns (core, ui, data, utils)
- ๐ Comprehensive Documentation: Professional headers and API docs in every file
- ๐งช Full Test Coverage: Unit tests for all major components
- ๐ง Multiple Entry Points:
python -m mushroom_quiz(recommended)mushroom-quiz(after installation)- Legacy compatibility maintained
- Clear Module Structure:
/core,/ui,/data,/utilsorganization - Professional Standards: Type hints, docstrings, version consistency
- Easy Extension: Well-defined interfaces for adding features
- IDE Support: Better code completion and navigation
- Test Framework:
pytestcompatible test suite
# Install as development package
pip install -e .
# Run the application (multiple ways)
python -m mushroom_quiz # Recommended
mushroom-quiz # After installation
python mushroom_quiz_app_legacy.py # Legacy compatibility
# Run tests
python -m pytest tests/- Expanded Question Database: Now includes 111 questions (up from 45)
- Enhanced Medicinal Mushroom Coverage: 19 dedicated questions on health benefits
- Comprehensive Headers: Professional documentation in all code files
- Improved Balance: Better distribution across all topics and difficulty levels
- Advanced Cultivation Topics: Sterilization, cultivation processes, and growing methods
src/mushroom_quiz/ # Main package directory
โโโ __init__.py # Package initialization and exports
โโโ __main__.py # Entry point for `python -m mushroom_quiz`
โโโ app.py # Main application coordination
โโโ core/ # Core functionality
โ โโโ __init__.py # Core module exports
โ โโโ quiz_engine.py # Quiz game logic and QuizGame class
โ โโโ timer.py # Timed input with visual countdown
โโโ ui/ # User interface modules
โ โโโ __init__.py # UI module exports
โ โโโ terminal_ui.py # Terminal interface and styling
โโโ data/ # Data management
โ โโโ __init__.py # Data module exports
โ โโโ question_loader.py # Question loading abstraction
โ โโโ quiz_questions.py # Question database (111 questions)
โโโ utils/ # Utility functions
โโโ __init__.py # Utils module exports
โโโ helpers.py # Common helper functions
tests/ # Test suite
โโโ __init__.py # Test package initialization
โโโ test_question_loader.py # Unit tests for question loading
docs/ # Documentation
โโโ DEVELOPMENT_NOTES.md # Development notes
โโโ VERSIONING.md # Version history
โโโ MODULAR_STRUCTURE.md # Detailed architecture guide
web/ # Web version
โโโ index.html # Main HTML file
โโโ styles.css # CSS styling
โโโ questions.js # Question database (JavaScript)
โโโ quiz.js # Main quiz logic (JavaScript)
retro/ # Retro versions (New!)
โโโ README.md # Retro collection documentation
โโโ mushroom_quiz_spectrum.bas # ZX Spectrum BASIC version
โโโ mushroom_quiz_c64.bas # Commodore 64 BASIC version
# Package files
setup.py # Package installation script
requirements.txt # Dependencies
README.md # This documentation
LICENSE # MIT License
# Legacy compatibility
mushroom_quiz_app.py # Original entry point (preserved)
mushroom_quiz_app_legacy.py # Backward compatibility wrapper
quiz_ui.py # Original UI module (preserved)
quiz_questions.py # Original questions (preserved)
quiz_logic.py # Original logic (preserved)
quiz_timer.py # Original timer (preserved)
__init__.py: Package initialization with version info and main export__main__.py: Entry point forpython -m mushroom_quizexecutionapp.py: Main application coordination and menu flow
quiz_engine.py: ContainsQuizGameclass andcreate_quiz()functiontimer.py:TimedInputclass with visual countdown and threading
terminal_ui.py: All UI functions, ANSI colors, menus, and displays
question_loader.py: Abstraction layer for question filtering and accessquiz_questions.py: Comprehensive database of 111 questions
helpers.py: Common utility functions (validation, formatting, etc.)
test_question_loader.py: Unit tests for question loading functionality
mushroom_quiz_app.py: Original main application entry pointquiz_ui.py: Original user interface modulequiz_questions.py: Original question databasequiz_logic.py: Original core logicquiz_timer.py: Original timer functionalitymushroom_quiz_app_legacy.py: Backward compatibility wrapper
- Multiple Difficulty Levels: Beginner, Intermediate, Advanced, Mixed
- Flexible Quiz Length: 5, 10, or 20 questions
- Timer Modes: Relaxed (no timer), Timed (30s), Speed (15s)
- Colorful Interface: ANSI colors and emojis
- Study Recommendations: Personalized based on wrong answers
- Screen Management: Clean interface with screen clearing
# Recommended: Run as Python module
python -m mushroom_quiz
# After installation: Use console command
pip install -e . # Install package
mushroom-quiz # Run command
# Development: Import in Python
from mushroom_quiz import main
main()# Original entry point
python mushroom_quiz_app.py
# Legacy wrapper with compatibility note
python mushroom_quiz_app_legacy.py-
Local Development:
cd web python -m http.server 8000 # Open http://localhost:8000 in your browser
-
Production Deployment:
- Deploy the
web/folder to any web server - No server-side processing required (static files only)
- Compatible with GitHub Pages, Netlify, Vercel, etc.
- Deploy the
- Responsive Design: Works on desktop, tablet, and mobile devices
- Modern UI: Beautiful gradient backgrounds and smooth animations
- Interactive Elements: Hover effects and visual feedback
- Progress Tracking: Visual progress bar and real-time scoring
- Timer Visualization: Circular countdown timer with color coding
- Keyboard Support: Use number keys (1-4) to select answers
- Social Sharing: Share results with friends
- Accessibility: Semantic HTML and keyboard navigation
- Cross-browser Compatible: Works in all modern browsers
- Beginner: 38 questions (34.2%) - Perfect for newcomers
- Intermediate: 46 questions (41.4%) - Core learning content
- Advanced: 27 questions (24.3%) - Expert-level challenges
- Cultivation Process: 22 questions (19.8%) - Step-by-step procedures
- Medicinal Mushrooms: 19 questions (17.1%) - Health benefits & compounds
- Mushroom Varieties: 14 questions (12.6%) - Species identification
- Sterilization: 13 questions (11.7%) - Contamination prevention
- Growing Conditions: 9 questions (8.1%) - Environmental factors
- Growing Methods: 8 questions (7.2%) - Techniques & systems
- Biology Basics: 7 questions (6.3%) - Fundamental knowledge
- Timing: 7 questions (6.3%) - Schedules & lifecycle stages
- Substrates: 6 questions (5.4%) - Growing media
- Beginner Varieties: 6 questions (5.4%) - Entry-level species
- ๐งฌ Biology Basics: Hyphae, mycelium, spores, fungal lifecycle
- ๐ฑ Beginner Varieties: Oyster mushrooms, coffee ground cultivation
- โ๏ธ Cultivation Process: Inoculation, colonization, pinning, flushing
- ๐ก๏ธ Growing Conditions: Temperature, humidity, pH, CO2, lighting
- ๐ง Growing Methods: Log cultivation, monotub, SGFC, vertical systems
- ๐ Medicinal Mushrooms: Reishi, Lion's Mane, Cordyceps, Turkey Tail, Chaga
- ๐ Mushroom Varieties: Shiitake, King Oyster, Maitake, Enoki, Wine Cap
- ๐งช Sterilization: Pressure cooking, autoclaves, sterile technique
- ๐พ Substrates: Sawdust, straw, coffee grounds, supplements
- โฐ Timing: Harvest timing, spawn storage, flush intervals
# Run all tests
python -m pytest tests/
# Run with verbose output
python -m pytest tests/ -v
# Run specific test file
python -m pytest tests/test_question_loader.py
# Run with unittest
python -m unittest discover tests/- โ Question loading and filtering by difficulty
- โ Question counting functionality
- โ Difficulty level management
- โ Invalid input handling
- โ Module import verification
Create test files in the tests/ directory following the naming pattern test_*.py:
import unittest
import sys
import os
# Add src directory to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
from mushroom_quiz.module import function_to_test
class TestClassName(unittest.TestCase):
def test_function_name(self):
result = function_to_test()
self.assertEqual(result, expected_value)# Main application entry point
from mushroom_quiz import main
main() # Start the interactive quiz
# Direct quiz execution
from mushroom_quiz.core import create_quiz
score, total = create_quiz(
difficulty="intermediate", # 'beginner', 'intermediate', 'advanced', 'mixed'
num_questions=10, # 5, 10, or 20
timer_seconds=30 # None for no timer, 15 or 30 for timed
)
print(f"Score: {score}/{total}")from mushroom_quiz.data import get_questions_by_difficulty, get_all_questions
# Get questions by difficulty
beginner_questions = get_questions_by_difficulty('beginner')
all_questions = get_all_questions()
# Count questions
from mushroom_quiz.data.question_loader import get_question_count_by_difficulty
count = get_question_count_by_difficulty('intermediate')from mushroom_quiz.utils import validate_input, format_percentage
# Validate user input
valid_choice = validate_input("3", 1, 4) # Returns 3 if valid
# Format percentages
percentage = format_percentage(8, 10) # Returns "80.0%"
# Get performance level
from mushroom_quiz.utils.helpers import get_performance_level
level, emoji, description = get_performance_level(9, 10)
# Returns ("Expert", "๐", "Outstanding knowledge!")Add questions to the QUESTIONS list in src/mushroom_quiz/data/quiz_questions.py:
{
"question": "Your question here?",
"options": ["Option 1", "Option 2", "Option 3", "Option 4"],
"answer": "Correct option",
"difficulty": "beginner|intermediate|advanced",
"explanation": "Educational explanation",
"topic": "topic_category"
}- New UI elements: Add to
quiz_ui.py - New timer modes: Extend
quiz_timer.py - New game modes: Modify
quiz_logic.py - Statistics tracking: Extend the main app
- Maintainability: Each module has a single responsibility
- Scalability: Easy to add new features without breaking existing code
- Testability: Modules can be tested independently
- Reusability: Components can be reused in other projects
- Readability: Code is organized and well-documented
- Collaboration: Multiple developers can work on different modules
โ Database Expansion: Increased from 45 to 111 questions (147% growth) โ Topic Balance: Eliminated small categories, improved distribution โ Medicinal Focus: Comprehensive coverage of health benefits โ Professional Headers: Complete documentation in all code files โ Advanced Topics: Sterilization and cultivation process depth โ Beginner Support: Enhanced entry-level content โ Quality Assurance: All questions fact-checked and explained
- Question difficulty auto-adjustment based on performance
- Statistics tracking across sessions
- Question categories filtering
- Import/export of custom question sets
- Multi-language support
- Enhanced web interface version
- Progress tracking and achievement system
- Advanced cultivation calculator tools
- Commercial cultivation business topics
- Mushroom identification mini-games
- Growing equipment recommendations
- Seasonal cultivation planning
- Troubleshooting problem solver
Contributions are welcome! Here's how you can help:
- Add Questions: Submit new mushroom cultivation questions
- Improve Documentation: Enhance code comments or README
- Bug Reports: Report issues or unexpected behavior
- Feature Requests: Suggest new functionality
- Code Improvements: Optimize existing code
- Translation: Help with multi-language support
- Fork the repository
- Create a feature branch
- Follow existing code style and documentation standards
- Test your changes thoroughly
- Submit a pull request with clear description
- Factually accurate and well-researched
- Clear, unambiguous wording
- Educational explanations
- Appropriate difficulty level
- Real-world applicability
- Python 3.6 or higher
- No external dependencies (uses only standard library)
- Cross-platform compatible (Windows, macOS, Linux)
- Modern web browser with JavaScript support
- No server requirements (runs client-side)
- Mobile and desktop compatible
# Clone the repository
git clone https://github.com/aaronjacobs-chelt/mushroom-cultivation-quiz.git
cd mushroom-cultivation-quiz
# Install in development mode
pip install -e .
# Run the application
python -m mushroom_quiz
# Run tests
python -m pytest tests/
# Check package info
python -c "import mushroom_quiz; print(f'Version: {mushroom_quiz.__version__}')"# Run original terminal version
python mushroom_quiz_app.py
# Run legacy wrapper
python mushroom_quiz_app_legacy.py# Serve the web version locally
cd web
python -m http.server 8000
# Open http://localhost:8000# ZX Spectrum BASIC version
cd retro
# Load mushroom_quiz_spectrum.bas in ZX Spectrum emulator
# Commodore 64 BASIC version
# Load mushroom_quiz_c64.bas in C64 emulatorThis project is licensed under the MIT License - see the LICENSE file for details.
- โ Commercial use
- โ Modification
- โ Distribution
- โ Private use
- โ Liability
- โ Warranty
Aaron J
- Created: June 21, 2025
- Current Version: 2.0.1 (Modular Architecture)
- Previous Version: 2.0.0 (Expanded Database)
- Contact: git@aaronemail.xyz
- Repository: https://github.com/aaronjacobs-chelt/mushroom-cultivation-quiz
- Mushroom cultivation community for knowledge sharing
- Educational resources and research papers
- Open source contributors and testers
- Mycology experts who provided fact-checking
- "The Mushroom Cultivator" by Paul Stamets
- "Growing Gourmet and Medicinal Mushrooms" by Paul Stamets
- "Organic Mushroom Farming and Mycoremediation" by Tradd Cotter
- "Radical Mycology" by Peter McCoy
- r/MushroomGrowers (Reddit)
- Shroomery.org forums
- Mushroom cultivation Facebook groups
- Local mycology societies
- PubMed mushroom research papers
- International Journal of Medicinal Mushrooms
- Mycological societies and conferences
- Choose your difficulty level (Beginner/Intermediate/Advanced/Mixed)
- Select quiz length (5, 10, or 20 questions)
- Pick timer mode (Relaxed/Timed/Speed)
- Answer multiple-choice questions
- Learn from detailed explanations
- Review personalized study recommendations
- ๐ 90%+: MUSHROOM MASTER
- ๐ 70%+: FUNGI EXPERT
- ๐ฑ 50%+: GROWING CULTIVATOR
- ๐ฐ <50%: SPORE BEGINNER
- Start with beginner difficulty to build confidence
- Read all explanations, even for correct answers
- Use study recommendations to focus learning
- Retake quizzes to reinforce knowledge
- Progress from easier to harder difficulties
Happy Mushroom Growing! ๐โจ
Built with โค๏ธ for the mushroom cultivation community