Thank you for your interest in contributing to PyDex! This project is designed to be beginner-friendly and help people learn how to contribute to open source projects.
- Go to the PyDex repository
- Click the "Fork" button in the top right corner
- This creates a copy of the repository in your GitHub account
git clone https://github.com/SthembisoMfusi/PyDex.git
cd PyDex# Install dependencies
pip install -r requirements.txt
# Test that everything works
python pokedex.py pikachugit checkout -b my-new-featureBranch naming conventions:
feature/display-height-weight- for new featuresbugfix/error-handling- for bug fixesdocs/update-readme- for documentation changes
Look for issues labeled with:
good first issue- Perfect for beginnershackathon- Issues created specifically for this hackathonhelp wanted- Issues that need community help
- Write clean, readable code
- Add comments to explain complex logic
- Test your changes thoroughly
- Follow the existing code style
# Test with different Pokémon
python pokedex.py pikachu
python pokedex.py charizard
python pokedex.py ditto
# Test error cases
python pokedex.py fake-pokemon
python pokedex.pygit add .
git commit -m "Add descriptive commit message"Commit message guidelines:
- Use present tense: "Add feature" not "Added feature"
- Be descriptive: "Add height and weight display" not "Update code"
- Keep it under 50 characters for the subject line
git push origin my-new-feature- Go to your fork on GitHub
- Click "New Pull Request"
- Select your branch
- Fill out the pull request template
- Submit the pull request
- Be descriptive: "Add height and weight display for Pokémon"
- Include the issue number: "Add height and weight display (#123)"
- Explain what your changes do
- Reference the issue you're fixing: "Fixes #123"
- Include screenshots if applicable
- List any testing you did
## Description
This PR adds height and weight display to the Pokémon information output.
## Changes
- Added height and weight fields to the display output
- Height is displayed in decimeters, weight in hectograms (as per PokéAPI)
- Added proper formatting for the new fields
## Testing
- Tested with multiple Pokémon (Pikachu, Charizard, Snorlax)
- Verified output formatting looks correct
- Tested error handling for invalid Pokémon names
Fixes #123- Follow PEP 8 guidelines
- Use meaningful variable names
- Add docstrings for functions
- Keep lines under 80 characters when possible
def fetch_pokemon_data(pokemon_name):
"""
Fetch Pokémon data from the PokéAPI.
Args:
pokemon_name (str): The name of the Pokémon to look up
Returns:
dict: The Pokémon data from the API
Raises:
requests.exceptions.RequestException: If the API request fails
"""
api_url = f"https://pokeapi.co/api/v2/pokemon/{pokemon_name}"
response = requests.get(api_url)
response.raise_for_status()
return response.json()- Check existing issues - Someone might have asked the same question
- Ask in the issue - Comment on the issue you're working on
- Create a new issue - If you can't find an existing one
- Join our discussions - Use GitHub Discussions for general questions
"I can't find the issue I want to work on"
- Look for issues labeled
good first issue - Check if the issue is assigned to someone else
- Ask in the issue comments if it's still available
"My code doesn't work"
- Make sure you've installed the requirements:
pip install -r requirements.txt - Check for typos in Pokémon names (they're case-insensitive)
- Test with a simple Pokémon like "pikachu" first
"I don't understand the code"
- Start with the simplest issues (like adding height/weight display)
- Read the existing code to understand the structure
- Ask questions in the issue comments
Contributors will be recognized in:
- The project's README.md
- Release notes
- GitHub's contributor graph
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold this code.
If you have any questions about contributing, please:
- Check this document first
- Look at existing issues and discussions
- Create a new issue with the "question" label
- Join our community discussions
Happy contributing! 🎉