8000 Move fields from libs into a dedicated folder by ohdearquant · Pull Request #587 · khive-ai/lionagi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move fields from libs into a dedicated folder #587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 24, 2025
Merged

Conversation

ohdearquant
Copy link
Collaborator
@ohdearquant ohdearquant commented Mar 24, 2025

Pull Request Description: Move Fields Out

Overview

This PR relocates all field definitions from the lionagi/libs/fields directory to a dedicated lionagi/fields package. This change cleans up the project structure, streamlines imports, and reduces redundancy by centralizing all field-related models and definitions in one place.

Key Changes

  • Directory Restructuring:

    • Moved files from lionagi/libs/fields/ to lionagi/fields/:
      • action.py
      • base.py
      • file.py
      • instruct.py
      • reason.py
    • Deleted the old lionagi/libs/fields/__init__.py file.
  • Import Path Updates:

    • Updated import statements across the codebase (operations, protocols, tests, etc.) to reference the new lionagi/fields package.
    • Ensured backward compatibility by re-exporting relevant models in the new lionagi/fields/__init__.py.
  • Code Clean-up:

    • Removed redundant or unused definitions.
    • Streamlined the field model configurations, ensuring consistent usage of Pydantic for schema validation.

Motivation

  • Improved Organization:

    • Separating field models into their own package makes the project structure clearer and more maintainable.
  • Consistency and Clarity:

    • Consolidating field definitions helps in reducing redundancy and potential discrepancies between similar definitions across different modules.
  • Future Enhancements:

    • This refactor lays the groundwork for further improvements and modularization, making it easier to manage and extend the codebase.

Testing and Impact

  • Testing:

    • All tests have been executed and verified to pass, ensuring the updated import paths and refactored models work as expected.
  • Developer Impact:

    • The new structure simplifies the process of updating or extending field definitions.
    • Reduced coupling in the codebase improves readability and future maintenance.

@ohdearquant ohdearquant merged commit 2c0ebb9 into main Mar 24, 2025
4 checks passed
@ohdearquant ohdearquant changed the title Move fields out Move fields from libs into a dedicated folder Mar 24, 2025
@ohdearquant ohdearquant deleted the move-fields-out branch May 1, 2025 23:51
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
0