Skip to content

Commit a4bb522

Browse files
authored
Merge pull request #34 from VectorInstitute/add-build-system
Added build-system
2 parents 37ea2a5 + 20da543 commit a4bb522

File tree

7 files changed

+159
-130
lines changed

7 files changed

+159
-130
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ cp -v .env.example .env
5050
Run integration tests to validate that your API keys are set up correctly.
5151

5252
```bash
53-
PYTHONPATH="." uv run --env-file .env pytest -sv tests/tool_tests/test_integration.py
53+
uv run --env-file .env pytest -sv tests/tool_tests/test_integration.py
5454
```
5555

5656
## Reference Implementations
@@ -79,16 +79,16 @@ These warnings can be safely ignored, as they are the result of a bug in the ups
7979
Interactive knowledge base demo. Access the gradio interface in your browser to see if your knowledge base meets your expectations.
8080

8181
```bash
82-
PYTHONPATH="." uv run --env-file .env gradio src/1_basics/0_search_demo/app.py
82+
uv run --env-file .env gradio src/1_basics/0_search_demo/app.py
8383
```
8484

8585
Basic Reason-and-Act Agent- for demo purposes only.
8686

8787
As noted above, these are unnecessarily verbose for real applications.
8888

8989
```bash
90-
# PYTHONPATH="." uv run --env-file .env src/1_basics/1_react_rag/cli.py
91-
# PYTHONPATH="." uv run --env-file .env gradio src/1_basics/1_react_rag/app.py
90+
# uv run --env-file .env src/1_basics/1_react_rag/cli.py
91+
# uv run --env-file .env gradio src/1_basics/1_react_rag/app.py
9292
```
9393

9494

@@ -97,16 +97,16 @@ As noted above, these are unnecessarily verbose for real applications.
9797
Reason-and-Act Agent without the boilerplate- using the OpenAI Agent SDK.
9898

9999
```bash
100-
PYTHONPATH="." uv run --env-file .env src/2_frameworks/1_react_rag/cli.py
101-
PYTHONPATH="." uv run --env-file .env gradio src/2_frameworks/1_react_rag/langfuse_gradio.py
100+
uv run --env-file .env src/2_frameworks/1_react_rag/cli.py
101+
uv run --env-file .env gradio src/2_frameworks/1_react_rag/langfuse_gradio.py
102102
```
103103

104104
Multi-agent examples, also via the OpenAI Agent SDK.
105105

106106
```bash
107-
PYTHONPATH="." uv run --env-file .env gradio src/2_frameworks/2_multi_agent/efficient.py
107+
uv run --env-file .env gradio src/2_frameworks/2_multi_agent/efficient.py
108108
# Verbose option- greater control over the agent flow, but less flexible.
109-
# PYTHONPATH="." uv run --env-file .env gradio src/2_frameworks/2_multi_agent/verbose.py
109+
# uv run --env-file .env gradio src/2_frameworks/2_multi_agent/verbose.py
110110
```
111111

112112
Python Code Interpreter demo- using the OpenAI Agent SDK, E2B for secure code sandbox, and LangFuse for observability. Refer to [src/2_frameworks/3_code_interpreter/README.md](src/2_frameworks/3_code_interpreter/README.md) for details.

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description = "Vector Institute Agent Bootcamp 202507"
55
readme = "README.md"
66
authors = [ {name = "Vector AI Engineering", email = "ai_engineering@vectorinstitute.ai"}]
77
license = "Apache-2.0"
8-
repository = "https://github.com/VectorInstitute/agent-bootcamp"
98
requires-python = ">=3.12"
109
dependencies = [
1110
"aiohttp>=3.12.14",
@@ -27,6 +26,13 @@ dependencies = [
2726
"weaviate-client>=4.15.4",
2827
]
2928

29+
[build-system]
30+
requires = ["hatchling"]
31+
build-backend = "hatchling.build"
32+
33+
[tool.hatch.build.targets.wheel]
34+
packages = ["src"]
35+
3036
[dependency-groups]
3137
dev = [
3238
"aieng-platform-onboard>=0.3.5",

src/2_frameworks/3_code_interpreter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ Prerequisites:
88
Run:
99

1010
```bash
11-
PYTHONPATH="." uv run --env-file .env gradio src/2_frameworks/3_code_interpreter/app.py
11+
uv run --env-file .env gradio src/2_frameworks/3_code_interpreter/app.py
1212
```

src/utils/tools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ This module contains various tools for LLM agents.
44

55
```bash
66
# Tool for getting a list of recent news headlines from enwiki
7-
PYTHONPATH="." uv run --env-file .env python3 src/utils/tools/news_events.py
7+
uv run --env-file .env python3 src/utils/tools/news_events.py
88
```

tests/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
```bash
44
uv run pytest -sv tests/tool_tests/test_weaviate.py
55
uv run pytest -sv tests/tool_tests/test_code_interpreter.py
6-
PYTHONPATH="." uv run pytest -sv tests/tool_tests/test_integration.py
7-
6+
uv run pytest -sv tests/tool_tests/test_integration.py
87
```

tests/tool_tests/test_integration.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
"""Test cases for Weaviate integration."""
22

33
import json
4-
import sys
5-
from pathlib import Path
64
from typing import AsyncGenerator
75

6+
import pytest
7+
import pytest_asyncio
8+
from dotenv import load_dotenv
9+
from langfuse import get_client
10+
from openai import AsyncOpenAI
811

9-
# Add project root to path to allow imports from src
10-
project_root = Path(__file__).parent.parent.parent
11-
sys.path.insert(0, str(project_root))
12-
13-
import pytest # noqa: E402
14-
import pytest_asyncio # noqa: E402
15-
from dotenv import load_dotenv # noqa: E402
16-
from langfuse import get_client # noqa: E402
17-
from openai import AsyncOpenAI # noqa: E402
18-
19-
from src.utils import ( # noqa: E402
12+
from src.utils import (
2013
AsyncWeaviateKnowledgeBase,
2114
Configs,
2215
get_weaviate_async_client,
2316
pretty_print,
2417
)
25-
from src.utils.langfuse.otlp_env_setup import ( # noqa: E402
26-
set_up_langfuse_otlp_env_vars,
27-
)
18+
from src.utils.langfuse.otlp_env_setup import set_up_langfuse_otlp_env_vars
2819

2920

3021
load_dotenv(verbose=True)

0 commit comments

Comments
 (0)