Thank you for your interest in contributing! This document provides guidelines for contributing to this repository.
If you find a bug or have a suggestion:
- Check if the issue already exists
- Create a new issue with a clear description
- Include code examples if applicable
-
Fork the Repository
git clone https://github.com/brutal-45/python-learning-repo.git
-
Create a Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow PEP 8 style guidelines
- Add docstrings to all functions
- Include example usage
- Add comments for complex logic
-
Test Your Code
python -m pytest tests/
-
Commit Your Changes
git commit -m "Description of your changes" -
Push and Create Pull Request
git push origin feature/your-feature-name
- Follow PEP 8 style guide
- Use 4 spaces for indentation
- Maximum line length: 88 characters
- Use meaningful variable and function names
- All modules should have docstrings
- All functions should have docstrings with:
- Brief description
- Args section
- Returns section
- Examples (optional but encouraged)
def calculate_average(numbers: list) -> float:
"""
Calculate the average of a list of numbers.
Args:
numbers: List of numeric values
Returns:
The arithmetic mean of the numbers
Raises:
ValueError: If the list is empty
Example:
>>> calculate_average([1, 2, 3, 4, 5])
3.0
"""
if not numbers:
raise ValueError("Cannot calculate average of empty list")
return sum(numbers) / len(numbers)When adding new content, follow this structure:
python-learning-repo/
├── 01-basics/ # Beginner basics
├── 02-data-types/ # Data types
├── 03-control-flow/ # Control flow
├── 04-functions/ # Functions
├── 05-modules/ # Modules
├── 06-oop/ # Object-oriented programming
├── 07-file-handling/ # File operations
├── 08-error-handling/ # Error handling
├── 09-advanced-features/# Advanced features
├── 10-concurrency/ # Concurrency
├── projects/ # Practice projects
├── exercises/ # Practice problems
├── solutions/ # Exercise solutions
└── resources/ # Additional resources
- Add new examples to existing modules
- Create new modules for missing topics
- Ensure examples are well-commented
- Fix typos and improve clarity
- Add missing documentation
- Translate documentation
- Create new practice problems
- Provide complete solutions
- Include difficulty levels
- Add practical projects
- Include setup instructions
- Provide solution code
Feel free to open an issue for any questions about contributing!
Thank you for helping make this a great learning resource! 🐍