Skip to content

Implement File Reference in Assertions #6

@kdunee

Description

@kdunee

Why:

  • Currently, IntentGuard only supports Python code objects (methods, classes, etc.) as the target of assertions.
  • Users need a way to apply assertions to entire files, especially for broader code quality checks or when analyzing non-Python files.
  • This feature will make IntentGuard more versatile and applicable to a wider range of use cases.

What:

  • Extend the assert_code function to accept a file path as an argument.
  • Modify the prompt engineering logic to handle file-level analysis, considering different file types (e.g., Python, JSON, YAML) and potentially large file sizes.
  • Update documentation and examples to include file reference usage.
  • Add unit tests to cover the new functionality, including tests for various file types and sizes.

Acceptance Criteria:

  • Users can provide a file path to the assert_code function.
  • IntentGuard can successfully analyze the provided file and apply the assertion.
  • The system handles different file types (e.g., Python, JSON, YAML) appropriately.
  • Documentation and examples are updated to reflect the new feature.
  • Unit tests cover the file reference functionality and ensure correctness for various file types and sizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions