feat(cli): skip __init__.py for config-based adk create - #6754
Open
a2105z wants to merge 1 commit into
Open
Conversation
Config agents load from root_agent.yaml, matching existing samples that omit an empty package marker from generated scaffolding.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
adk create --type=configno longer writes an empty__init__.py.Config agents are loaded from
root_agent.yaml(after the Python module/package probes missroot_agent). Existing config samples and the YAML agent-loader fixtures already omit__init__.py, so generated projects now match that layout.Also updates the config success message and CLI unit expectations.
On the package-resolution note in #6753: an empty
__init__.pydid not exposeroot_agenteither, so the loader still fell through to YAML. Withagents_dirprepended onsys.path, the local agent directory remains the first candidate; this change aligns scaffolding with samples rather than relying on an empty package marker.Fixes #6753
Test plan
adk create --type=configemitted.env,.gitignore,__init__.py,root_agent.yaml.env,.gitignore,root_agent.yamlonlyuv run pytest tests/unittests/cli/utils/test_cli_create.py -q→ 36 passed__init__.py+agent.py