Skip to content

Add AI tools instructions#18

Merged
ZequnZ merged 4 commits intomainfrom
add-instructions
Sep 9, 2025
Merged

Add AI tools instructions#18
ZequnZ merged 4 commits intomainfrom
add-instructions

Conversation

@ZequnZ
Copy link
Owner

@ZequnZ ZequnZ commented Sep 9, 2025

Summary

This PR adds comprehensive AI coding instructions and development guidelines to enhance the Python project template's developer experience. It introduces standardized coding practices, AI assistant configurations, and renames a configuration file for better clarity.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 📚 Documentation update
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🔧 Refactoring (no functional changes)
  • 🧪 Test improvements
  • 🚀 Performance improvements
  • 🔒 Security improvements

Changes Made

New Files:

  • .cursor/rules/python_guidelines.mdc - Cursor AI editor rules with comprehensive Python coding standards in MDC format
  • .cursorrules - Main Cursor AI editor configuration file with Python best practices
  • .github/ISSUE_TEMPLATE/instructions/python.instructions.md - GitHub issue template with Python coding conventions
  • .github/copilot-instructions.md - GitHub Copilot specific instructions for this Python project template
  • .github/prompts/create-pr-description.prompt.md - Automated PR description generation template with workflow instructions

Modified Files:

  • File renamed: src/configuration/config_test.pysrc/configuration/config_example.py (100% match, improved naming convention)

Deleted Files:

None

Technical Details

This PR establishes a comprehensive development guidelines framework that includes:

  1. Multi-Platform AI Support: Instructions for Cursor AI, GitHub Copilot, and general AI assistants
  2. Python Best Practices:
    • Python 3.12+ features and syntax requirements
    • Type hints and comprehensive documentation standards
    • Error handling and edge case management
    • Modern package management with uv
  3. Code Quality Standards:
    • PEP 8 compliance with 88-character line limits
    • Ruff for linting and formatting
    • pytest testing patterns and markers
    • Docstring conventions (PEP 257)
  4. Project-Specific Guidelines:
    • Pydantic Settings configuration patterns
    • Docker development practices
    • Task runner integration with Taskfile.yml
    • Pre-commit hook workflows

The renamed configuration file (config_test.pyconfig_example.py) better reflects its purpose as an example/template configuration rather than a test file.

Testing

  • Manual testing performed
  • Existing tests still pass
  • Unit tests added/updated
  • Integration tests added/updated

Test Results: All existing tests pass (5/5) - no functional changes affect the codebase logic.

Impact Assessment

Breaking Changes:

None - this is purely additive documentation and configuration

Dependencies:

No new dependencies introduced

Performance Impact:

No performance implications - only documentation and configuration files added

Screenshots/Examples

The new instruction files provide consistent coding standards across different AI platforms:

Cursor AI Rules Example:

def calculate_area(radius: float) -> float:
    """
    Calculate the area of a circle given the radius.
    
    Args:
        radius: The radius of the circle
        
    Returns:
        The area of the circle, calculated as π * radius^2
        
    Raises:
        ValueError: If radius is negative
    """
    if radius < 0:
        raise ValueError("Radius cannot be negative")
    import math
    return math.pi * radius ** 2

@ZequnZ ZequnZ merged commit 24e0113 into main Sep 9, 2025
2 checks passed
@ZequnZ ZequnZ deleted the add-instructions branch September 9, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant