weavel-ai / Ape

Your first AI prompt engineer
https://docs.weavel.ai/sdk-reference/ape-common
MIT License
331 stars 13 forks source link

feat: setup monorepo, separate packages (common/core) #23

Closed aschung01 closed 1 week ago

aschung01 commented 1 week ago

Description

This pull request sets up a monorepo structure and separates packages into common and core components. The main changes include:

  1. Restructuring the project layout:

    • Moving common functionality to libs/ape-common/ape/common/
    • Removing the main ape/ directory and its contents
  2. Refactoring and updating imports:

    • Updating import statements to reflect the new package structure
    • Renaming some classes and functions for consistency
  3. Modifying the GitHub Actions workflow:

    • Updating the publish workflow to support multiple packages
    • Adding logic to extract package directory from release title
  4. Introducing new modules:

    • Adding generate module with BaseGenerate and Generate classes
    • Creating metric_prompts module for managing metric-related prompts
  5. Refactoring existing modules:

    • Updating BaseMetric, GlobalMetric, and specific metric implementations
    • Modifying Evaluate class to work with the new structure

These changes aim to improve the project's modularity, making it easier to maintain and extend different components independently.

Changes that Break Backward Compatibility

This PR introduces several breaking changes:

  1. Package structure: The ape package has been split into ape-common and potentially other packages, requiring updates to import statements in existing code.

  2. Class and function signatures: Some classes and functions have been modified, potentially requiring updates to any code that uses them. For example:

    • BaseMetric.compute() method signature has changed
    • Evaluate class initialization and usage may need to be updated
  3. Configuration: The EvaluationConfig class has been moved and may have different import paths.

  4. Prompt handling: The way prompts are loaded and used has changed with the introduction of ApeMetricPrompts.

Users of the library will need to update their code to accommodate these changes.

Documentation

N/A

Created with Palmier

aschung01 commented 1 week ago

@palmier-bot review