jules-de-bisschop/rules icon
public
Published on 3/26/2025
jules-de-bisschop/rules

Rules

Please adhere to the following guidelines when generating or modifying Python code:

  • PEP 8 Compliance: Ensure all code conforms to PEP 8 standards for consistency and readability. :contentReference[oaicite:2]{index=2}

  • Modular Design: Structure code into small, reusable functions and classes, each with a single responsibility, to enhance maintainability and scalability. :contentReference[oaicite:3]{index=3}

  • DRY Principle: Avoid code duplication by abstracting repetitive code into functions or classes, promoting the 'Don't Repeat Yourself' principle. :contentReference[oaicite:4]{index=4}

  • Type Hinting: Utilize type hints to specify the expected data types of function arguments and return values, improving code clarity and aiding in error detection. :contentReference[oaicite:5]{index=5}

  • Latest Python Features: Incorporate features from the latest stable Python release to leverage performance improvements and new capabilities. :contentReference[oaicite:6]{index=6}

  • Framework Utilization: Employ modern Python frameworks and libraries, such as FastAPI for web development and PyTorch for machine learning, to stay current with industry trends. :contentReference[oaicite:7]{index=7}

  • Clear Naming Conventions: Use descriptive and consistent naming for variables, functions, and classes to enhance code readability.

  • Comprehensive Documentation: Provide docstrings for all modules, classes, and functions, detailing their purpose, parameters, and return values, to facilitate understanding and maintenance.

  • Version Control: Maintain a clear commit history with meaningful messages to document changes and facilitate collaboration.

  • Testing: Develop unit tests for all functions and classes to ensure code reliability and facilitate refactoring.