Thank you for considering contributing to this 30-day Python learning project! To maintain consistency and quality, please follow these guidelines:
- Follow PEP 8 style guide
- Use descriptive variable/function names
# Good
def calculate_average(numbers):
# Avoid
def avg(lst):
-
Keep functions focused (single responsibility principle)
-
Limit functions to 15 lines maximum
-
Split large files into logical modules
For code:
- Use Python docstrings for all functions/classes
def convert_temperature(celsius):
"""
Convert Celsius to Fahrenheit
Args:
celsius (float): Temperature in Celsius
Returns:
float: Temperature in Fahrenheit
"""
return (celsius * 9/5) + 32
For Projects:
-
Update README.md in each folder with:
-
Purpose of the code
-
Usage examples
-
Dependencies
-
Learning objectives
-
-
Fork the repository
-
Create a feature branch:
git checkout -b feat/add-day7-exercises
-
Follow the project structure:
-
One concept per file
-
Group related files in day folders
-
Keep examples self-contained
-
-
Test your code:
-
All examples should run with
python filename.py
-
Include test cases where applicable
-
-
Commit with descriptive messages:
git commit -m "feat: add dictionary examples to Day 7"
-
Pull Request:
-
Reference related issues
-
Include before/after screenshots if UI changes
-
Describe your changes in detail
-
-
Monolithic code blocks
-
Uncommented complex logic
-
Duplicate code between files
-
Platform-specific solutions without alternatives
In-Code Comments
- Use
#
comments sparingly for non-obvious logic
# Using Sieve of Eratosthenes algorithm
def find_primes(n):
...
Project Documentation
-
Update both root and folder-level READMEs
-
Use consistent Markdown formatting
-
Add visual aids (code snippets, diagrams) where helpful
-
Use flake8 for code
linting
-
Run black for consistent
formatting
-
Verify documentation with
pydocstyle
Open an issue for:
-
Clarification requests
-
Feature suggestions
-
Reporting bugs
Let's build an accessible learning resource together! 🐍
- 📢 “Great things in programming are never done by one person. They’re done by a team of people.” – Inspired by Steve Jobs