Skip to content

Commit a0bac80

Browse files
Copilotg3force
andcommitted
Three independent projects + LITELLM env vars for MSAF OpenAI client
Co-authored-by: g3force <779094+g3force@users.noreply.github.com>
1 parent 05b124d commit a0bac80

12 files changed

Lines changed: 3712 additions & 3653 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
pip-install: "pre-commit"
3232

3333
- name: Install dependencies
34-
run: uv sync --all-packages
34+
run: make build
3535

3636
- name: Configure precommit
3737
run: pre-commit install

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ all: build
44

55
.PHONY: build
66
build:
7-
uv sync --all-packages
7+
cd adk && uv sync
88
cd msaf && uv sync
99

1010

1111
.PHONY: test
1212
test: build
13-
uv run pytest
13+
cd adk && uv run pytest
1414
cd msaf && uv run pytest
1515

1616

1717
.PHONY: check
1818
check: build
19-
uv run ruff check
20-
uv run mypy .
21-
uv run bandit -c pyproject.toml -r .
19+
cd adk && uv run ruff check
20+
cd adk && uv run mypy .
21+
cd adk && uv run bandit -c pyproject.toml -r .
2222
cd msaf && uv run ruff check
2323
cd msaf && uv run mypy .
2424
cd msaf && uv run bandit -c pyproject.toml -r .
@@ -27,7 +27,7 @@ check: build
2727

2828
.PHONY: check-fix
2929
check-fix: build
30-
uv run ruff format
31-
uv run ruff check --fix
30+
cd adk && uv run ruff format
31+
cd adk && uv run ruff check --fix
3232
cd msaf && uv run ruff format
3333
cd msaf && uv run ruff check --fix

adk/pyproject.toml

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "agentic-layer-sdk-adk"
33
version = "0.1.0"
44
readme = "README.md"
5-
requires-python = ">=3.12"
5+
requires-python = ">=3.14,<3.15"
66
dependencies = [
77
"agentic-layer-sdk-shared",
88
"google-adk[a2a]",
@@ -11,6 +11,21 @@ dependencies = [
1111
"httpx-retries>=0.4.5",
1212
]
1313

14+
[dependency-groups]
15+
dev = [
16+
"mypy[reports]>=1.12.0,<2",
17+
"ruff>=0.11.2",
18+
"bandit[toml]>=1.7.8",
19+
"pip-audit>=2.5,<3",
20+
"pytest>=9.0.1,<10",
21+
"pytest-cov>=7,<8",
22+
"types-protobuf>=6.30.2.20250822",
23+
"pytest-asyncio>=1.3.0",
24+
"asgi-lifespan>=2.1.0",
25+
"respx>=0.22.0",
26+
"fastmcp>=3.0.0rc2",
27+
]
28+
1429
[build-system]
1530
requires = ["hatchling"]
1631
build-backend = "hatchling.build"
@@ -19,4 +34,57 @@ build-backend = "hatchling.build"
1934
packages = ["agenticlayer"]
2035

2136
[tool.uv.sources]
22-
agentic-layer-sdk-shared = { workspace = true }
37+
agentic-layer-sdk-shared = { path = "../shared" }
38+
39+
40+
[tool.pytest.ini_options]
41+
minversion = "7.0"
42+
testpaths = "tests"
43+
pythonpath = ["."]
44+
addopts = """\
45+
--strict-config \
46+
--cov agenticlayer \
47+
--cov agenticlayer_shared \
48+
--cov-report html \
49+
--import-mode=importlib \
50+
--show-capture=no \
51+
"""
52+
filterwarnings = [
53+
# https://github.com/boto/boto3/issues/3889
54+
"ignore::UserWarning:google.adk.*",
55+
"ignore::DeprecationWarning:google.*",
56+
"ignore::DeprecationWarning:litellm.*",
57+
"ignore::DeprecationWarning:a2a.*",
58+
"ignore::UserWarning:agenticlayer.*",
59+
# google-adk uses the deprecated streamablehttp_client from mcp; suppress until upstream fixes it
60+
"ignore:Use `streamable_http_client` instead.:DeprecationWarning",
61+
]
62+
63+
64+
[tool.ruff]
65+
# Allow lines to be as long as 120.
66+
line-length = 120
67+
68+
[tool.ruff.lint]
69+
# https://docs.astral.sh/ruff/rules/
70+
# I001 --> enable import sorting rules
71+
# Q --> enable flake8-quotes rules for consistent quote style
72+
# N --> pep8-naming for proper naming conventions
73+
# PT --> flake8-pytest-style for pytest best practices
74+
# TID251 --> banned relative imports
75+
# DTZ --> datetime timezone awareness
76+
extend-select = ["Q", "N", "I001", "PT", "TID251", "DTZ"]
77+
78+
79+
[tool.bandit]
80+
exclude_dirs = [".venv"]
81+
82+
[tool.bandit.assert_used]
83+
skips = ["**/tests/*"]
84+
85+
86+
[tool.mypy]
87+
strict = true
88+
explicit_package_bases = true
89+
mypy_path = [".", "../shared"]
90+
namespace_packages = true

adk/tests/fixtures/app_factory.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
from typing import Any
66

77
import pytest_asyncio
8-
from agenticlayer.agent import AgentFactory
9-
from agenticlayer.agent_to_a2a import to_a2a
10-
from agenticlayer.config import McpTool, SubAgent
118
from asgi_lifespan import LifespanManager
129
from google.adk.agents import LlmAgent
1310
from httpx_retries import Retry
1411

12+
from agenticlayer.agent import AgentFactory
13+
from agenticlayer.agent_to_a2a import to_a2a
14+
from agenticlayer.config import McpTool, SubAgent
15+
1516

1617
@pytest_asyncio.fixture
1718
def app_factory() -> Any:

adk/tests/test_agent_integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
import pytest
77
import respx
88
from a2a.client.errors import A2AClientHTTPError
9-
from agenticlayer.agent import AgentFactory
10-
from agenticlayer.agent_to_a2a import to_a2a
11-
from agenticlayer.config import InteractionType, McpTool, SubAgent
12-
from agenticlayer.loguru_config import setup_logging
139
from asgi_lifespan import LifespanManager
1410
from fastmcp import Context, FastMCP
1511
from httpx_retries import Retry
1612
from pydantic import AnyHttpUrl
1713
from starlette.testclient import TestClient
1814

15+
from agenticlayer.agent import AgentFactory
16+
from agenticlayer.agent_to_a2a import to_a2a
17+
from agenticlayer.config import InteractionType, McpTool, SubAgent
18+
from agenticlayer.loguru_config import setup_logging
1919
from tests.fixtures.mock_llm import LLMMockController
2020
from tests.utils.helpers import (
2121
create_asgi_request_handler,

adk/tests/test_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Unit tests for config parsing functions."""
22

33
import pytest
4+
45
from agenticlayer.config import InteractionType, parse_sub_agents, parse_tools
56

67

0 commit comments

Comments
 (0)