Skip to content

Commit fb30c07

Browse files
Refactor project structure to follow Python conventions (#382)
* refactor: reorganize project structure to follow Python conventions Moved all source code from src/ to agent_starter_pack/ and consolidated agents/ directory under the main package. This aligns with Python package standards and simplifies the project structure. Changes: - Moved src/ → agent_starter_pack/ - Moved agents/ → agent_starter_pack/agents/ - Updated all Python imports from src. to agent_starter_pack. - Updated pyproject.toml package configuration - Updated CI/CD paths in .cloudbuild and .github workflows - Updated Makefile, documentation, and test files - Verified all tests and linting pass * fix: update path references in template.py for new directory structure Fixed remaining hardcoded paths that were still referencing the old src/ and agents/ directory locations. Updated all path constructions to use the new agent_starter_pack/ structure. * Update tests/cli/commands/test_setup_cicd.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fi * fix --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 401babc commit fb30c07

File tree

197 files changed

+6906
-6880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+6906
-6880
lines changed

.cloudbuild/ci/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ steps:
3232
set -e
3333
uv run ruff check . --config pyproject.toml --diff
3434
uv run ruff format . --check --config pyproject.toml --diff
35-
uv run mypy --config-file pyproject.toml ./src/cli ./tests ./src/frontends/streamlit
35+
uv run mypy --config-file pyproject.toml ./agent_starter_pack/cli ./tests ./agent_starter_pack/frontends/streamlit
3636
3737
logsBucket: gs://${PROJECT_ID}-logs-data/build-logs
3838
options:

.cloudbuild/terraform/build_triggers.tf

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,33 @@ locals {
2323
]
2424

2525
common_included_files = [
26-
"agents/**",
27-
"src/cli/**",
26+
"agent_starter_pack/agents/**",
27+
"agent_starter_pack/cli/**",
2828
"tests/**",
29-
"src/data_ingestion/**",
30-
"src/frontends/streamlit/**",
29+
"agent_starter_pack/data_ingestion/**",
30+
"agent_starter_pack/frontends/streamlit/**",
3131
"pyproject.toml",
3232
"uv.lock",
3333
".cloudbuild/**",
3434
]
3535

3636
lint_templated_agents_included_files = [
37-
"src/cli/**",
38-
"src/base_template/**",
39-
"src/data_ingestion/**",
40-
"src/deployment_targets/**",
37+
"agent_starter_pack/cli/**",
38+
"agent_starter_pack/base_template/**",
39+
"agent_starter_pack/data_ingestion/**",
40+
"agent_starter_pack/deployment_targets/**",
4141
"tests/integration/test_template_linting.py",
4242
"tests/integration/test_templated_patterns.py",
43-
"src/resources/locks/**",
43+
"agent_starter_pack/resources/locks/**",
4444
"pyproject.toml",
4545
"uv.lock",
4646
".cloudbuild/**",
4747
]
4848

4949
makefile_usability_included_files = [
50-
"src/cli/**",
51-
"src/base_template/**",
52-
"src/deployment_targets/**",
50+
"agent_starter_pack/cli/**",
51+
"agent_starter_pack/base_template/**",
52+
"agent_starter_pack/deployment_targets/**",
5353
"tests/integration/test_makefile_usability.py",
5454
"pyproject.toml",
5555
"uv.lock",
@@ -111,14 +111,14 @@ locals {
111111
agent_testing_included_files = { for combo in local.agent_testing_combinations :
112112
combo.name => [
113113
# Only include files for the specific agent being tested
114-
"agents/${split(",", combo.value)[0]}/**",
114+
"agent_starter_pack/agents/${split(",", combo.value)[0]}/**",
115115
# Common files that affect all agents
116-
"src/cli/**",
117-
"src/base_template/**",
118-
"src/deployment_targets/**",
116+
"agent_starter_pack/cli/**",
117+
"agent_starter_pack/base_template/**",
118+
"agent_starter_pack/deployment_targets/**",
119119
"tests/integration/test_template_linting.py",
120120
"tests/integration/test_templated_patterns.py",
121-
"src/resources/locks/**",
121+
"agent_starter_pack/resources/locks/**",
122122
"pyproject.toml",
123123
"uv.lock",
124124
]
@@ -186,25 +186,25 @@ agent_testing_included_files = { for combo in local.agent_testing_combinations :
186186

187187
e2e_agent_deployment_included_files = { for combo in local.e2e_agent_deployment_combinations :
188188
combo.name => combo.name == "adk_base-cloud_run-alloydb" ? [
189-
"src/deployment_targets/cloud_run/**",
189+
"agent_starter_pack/deployment_targets/cloud_run/**",
190190
"pyproject.toml",
191191
] : substr(combo.name, 0, 11) == "agentic_rag" ? [
192-
"agents/agentic_rag/**",
193-
"src/data_ingestion/**",
192+
"agent_starter_pack/agents/agentic_rag/**",
193+
"agent_starter_pack/data_ingestion/**",
194194
"pyproject.toml",
195195
] : substr(combo.name, 0, 8) == "adk_live" ? [
196-
"agents/adk_live/**",
196+
"agent_starter_pack/agents/adk_live/**",
197197
"pyproject.toml",
198198
] : [
199199
# Only include files for the specific agent being tested
200-
"agents/${split(",", combo.value)[0]}/**",
200+
"agent_starter_pack/agents/${split(",", combo.value)[0]}/**",
201201
# Common files that affect all agents
202-
"src/cli/**",
203-
"src/base_template/**",
204-
"src/data_ingestion/**",
205-
"src/deployment_targets/**",
202+
"agent_starter_pack/cli/**",
203+
"agent_starter_pack/base_template/**",
204+
"agent_starter_pack/data_ingestion/**",
205+
"agent_starter_pack/deployment_targets/**",
206206
"tests/cicd/test_e2e_deployment.py",
207-
"src/resources/locks/**",
207+
"agent_starter_pack/resources/locks/**",
208208
"pyproject.toml",
209209
"uv.lock",
210210
".cloudbuild"
@@ -426,10 +426,10 @@ resource "google_cloudbuild_trigger" "pr_test_pipeline_parity" {
426426
filename = ".cloudbuild/ci/test_pipeline_parity.yaml"
427427
included_files = [
428428
"tests/integration/test_pipeline_parity.py",
429-
"src/cli/**",
429+
"agent_starter_pack/cli/**",
430430
".cloudbuild/**",
431-
"src/base_template/**/.github/**",
432-
"src/base_template/**/.cloudbuild/**",
431+
"agent_starter_pack/base_template/**/.github/**",
432+
"agent_starter_pack/base_template/**/.cloudbuild/**",
433433
"pyproject.toml",
434434
"uv.lock",
435435
]

GEMINI.md

Lines changed: 11 additions & 11 deletions

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ test-e2e:
88
set -a && . tests/cicd/.env && set +a && uv run pytest tests/cicd/test_e2e_deployment.py -v
99

1010
generate-lock:
11-
uv run src/utils/generate_locks.py
11+
uv run python -m agent_starter_pack.utils.generate_locks
1212

1313
lint:
1414
uv sync --dev --extra lint
1515
uv run ruff check . --config pyproject.toml --diff
1616
uv run ruff format . --check --config pyproject.toml --diff
17-
uv run mypy --config-file pyproject.toml ./src/cli ./tests ./src/frontends/streamlit
17+
uv run mypy --config-file pyproject.toml ./agent_starter_pack/cli ./tests ./agent_starter_pack/frontends/streamlit
1818

1919
lint-templated-agents:
2020
uv run tests/integration/test_template_linting.py

README.md

Lines changed: 1 addition & 1 deletion

agents/adk_base/.template/templateconfig.yaml renamed to agent_starter_pack/agents/adk_base/.template/templateconfig.yaml

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)