Skip to content

Conversation

@syedfakher27
Copy link
Collaborator

…o app

Python needs modules to be organized in their own folders (packages) to import them correctly. By putting your files in a adk_middleware folder, Python can now recognize it as a proper package and allow you to import from it using:
from adk_middleware import ADKAgent, AgentRegistry, add_adk_fastapi_endpoint

…o app

Python needs modules to be organized in their own folders (packages) to import them correctly. By putting your files in a adk_middleware folder, Python can now recognize it as a proper package and allow you to import from it using:
from adk_middleware import ADKAgent, AgentRegistry, add_adk_fastapi_endpoint
@contextablemark
Copy link
Member

contextablemark commented Jul 7, 2025

Thanks... I'll admit that I'm not an experienced Python developer so your advice on restructuring the package is helpful.

However, the new structure breaks all of the tests - I would expect all of the tests to pass before submitting the PR (and I don't have CI/CD set up yet to do that automatically). And I also realize that my tests (while set up to run using pytest) probably have a non-standard setup. I run them with :

source test_env/bin/activate && PYTHONPATH=src pytest tests/ (separate venv in test_env).

So at a bare minimum, I would expect :

  1. Update all test imports to use new adk_middleware package:

Change from:

from adk_agent import ADKAgent
from session_manager import SessionManager

To:

from adk_middleware. import ADKAgent
from adk_middleware import SessionManager

  1. Manually run full test suite to ensure no functionality is broken
  2. Update documentation to show new import patterns in the existing examples.

Thanks,
Mark

@syedfakher27
Copy link
Collaborator Author

fixed all the test cases and all are passed as well additionally you don't need to set PYTHONPATH=src now because now adk_middleware is acting as python module

@contextablemark
Copy link
Member

Great! Thanks for the contribution!

  • Mark

@contextablemark contextablemark merged commit 41dd2c1 into Contextable:adk-middleware Jul 7, 2025
contextablemark pushed a commit that referenced this pull request Sep 20, 2025
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.

2 participants