julep-ai / julep

Build AI agents and workflows with a simple API. Supabase for AI agents
https://julep.ai
Apache License 2.0
883 stars 69 forks source link

Improve docstrings + minor code refactor #545

Open lhy-hoyin opened 1 day ago

lhy-hoyin commented 1 day ago

This PR includes:


[!IMPORTANT] Improved docstrings, switched to relative imports, and used a constant for EMBEDDING_SIZE for better code clarity and consistency.

  • Docstrings:
    • Improved and formatted docstrings across multiple files for clarity and consistency.
    • Added detailed attribute descriptions in exception classes like AgentNotFoundError and UserNotFoundError.
  • Imports:
    • Updated absolute imports to relative imports in files like truncation.py, worker.py, and messages.py for consistency.

This description was created by Ellipsis for c27aebf2cdfb27a2f94306001140974ad2bb3659. It will automatically update as commits are pushed.

creatorrr commented 1 day ago

This change needs a fix @lhy-hoyin . See the lint-and-type-check github action. It's throwing an error:

  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/runner/work/julep/julep/agents-api/tests/test_activities.py", line 10, in <module>
    from tests.fixtures import cozo_client, test_developer_id, test_doc
  File "/home/runner/work/julep/julep/agents-api/tests/fixtures.py", line 39, in <module>
    from tests.utils import patch_embed_acompletion as patch_embed_acompletion_ctx
  File "/home/runner/work/julep/julep/agents-api/tests/utils.py", line 12, in <module>
    from tests.fixtures import EMBEDDING_SIZE
ImportError: cannot import name 'EMBEDDING_SIZE' from partially initialized module 'tests.fixtures' (most likely due to a circular import) (/home/runner/work/julep/julep/agents-api/tests/fixtures.py)
lhy-hoyin commented 22 hours ago

Hi @creatorrr , I have implemented a fix for the issue. Please assist to trigger GitHub Actions checks.