Skip to content

Commit 13bc6bf

Browse files
authored
Refactor package structure and update dependencies (#9)
* Add structure to package and refactor modules * Update code dependencies * Upgrade pre-commit hooks and dependencies * Update uv version to 0.9.22 in code checks workflow * Update coverage source path in pyproject.toml * Fix CI: Remove pytest and doctest from pre-commit skip list * Update uv version to 0.9.22 in workflows and adjust test path * Refactor unit tests: Update pytest test path and ensure dev dependencies are defined * Add dependency groups for development dependencies in pyproject.toml and uv.lock * Add vulnerability ignore rule for pip-audit (nbconvert v7.16.6) in code checks workflow
1 parent 64877d6 commit 13bc6bf

File tree

10 files changed

+2675
-2720
lines changed

10 files changed

+2675
-2720
lines changed

.github/workflows/code_checks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
3636
with:
3737
# Install a specific version of uv.
38-
version: "0.9.7"
38+
version: "0.9.22"
3939
enable-cache: true
4040

4141
- name: "Set up Python"
@@ -54,3 +54,5 @@ jobs:
5454
uses: pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266
5555
with:
5656
virtual-environment: .venv/
57+
ignore-vulns: |
58+
GHSA-xm59-rqc7-hhvf

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
2323
with:
2424
# Install a specific version of uv.
25-
version: "0.9.7"
25+
version: "0.9.22"
2626
enable-cache: true
2727

2828
- name: "Set up Python"

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
4444
with:
4545
# Install a specific version of uv.
46-
version: "0.9.7"
46+
version: "0.9.22"
4747
enable-cache: true
4848

4949
- name: "Set up Python"

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0 # Use the ref you want to point at
3+
rev: v6.0.0 # Use the ref you want to point at
44
hooks:
55
- id: trailing-whitespace
66
- id: check-ast
@@ -11,7 +11,7 @@ repos:
1111
- id: end-of-file-fixer
1212
- id: mixed-line-ending
1313
args: [--fix=lf]
14-
- id: check-byte-order-marker
14+
- id: fix-byte-order-marker
1515
- id: check-merge-conflict
1616
- id: check-symlinks
1717
- id: detect-private-key
@@ -20,12 +20,12 @@ repos:
2020
- id: check-toml
2121

2222
- repo: https://github.com/astral-sh/uv-pre-commit
23-
rev: 0.6.12
23+
rev: 0.9.22
2424
hooks:
2525
- id: uv-lock
2626

2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: 'v0.11.4'
28+
rev: v0.14.10
2929
hooks:
3030
- id: ruff
3131
args: [--fix, --exit-non-zero-on-fix]
@@ -34,7 +34,7 @@ repos:
3434
types_or: [python, jupyter]
3535

3636
- repo: https://github.com/pre-commit/mirrors-mypy
37-
rev: v1.15.0
37+
rev: v1.19.1
3838
hooks:
3939
- id: mypy
4040
entry: python3 -m mypy --config-file pyproject.toml
@@ -57,5 +57,5 @@ ci:
5757
autoupdate_branch: ''
5858
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
5959
autoupdate_schedule: weekly
60-
skip: [pytest,doctest,mypy]
60+
skip: [mypy]
6161
submodules: false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Example implementation for an example topic."""
22

3-
from aieng.topic.impl.example_impl import example_impl
3+
from aieng.agent_evals.impl.example_impl import example_impl
44

55

66
__all__ = ["example_impl"]
File renamed without changes.

aieng-eval-agents/pyproject.toml

Lines changed: 13 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,26 @@
1-
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
4-
5-
[dependency-groups]
6-
dev = [
7-
"codecov>=2.1.13",
8-
"mypy>=1.14.1",
9-
"nbqa>=1.9.1",
10-
"pip-audit>=2.7.3",
11-
"pre-commit>=4.1.0",
12-
"pytest>=8.3.4",
13-
"pytest-asyncio>=0.25.2",
14-
"pytest-cov>=6.0.0",
15-
"pytest-mock>=3.14.0",
16-
"ruff>=0.9.2",
17-
]
18-
191
[project]
202
name = "aieng-eval-agents"
213
version = "0.1.0"
224
description = "Agentic AI Evaluation reference implementation from Vector Institute AI Engineering"
235
authors = [{name = "Vector AI Engineering", email = "[email protected]"}]
24-
requires-python = ">=3.11,<4.0"
6+
requires-python = ">=3.12,<4.0"
257
readme = "README.md"
268
license = "MIT"
27-
dependencies = []
9+
dependencies = [
10+
"kagglehub>=0.3.13",
11+
]
12+
13+
[dependency-groups]
14+
dev = [
15+
"pytest>=8.3.5",
16+
]
17+
18+
[build-system]
19+
requires = ["hatchling"]
20+
build-backend = "hatchling.build"
2821

2922
[tool.hatch.build.targets.sdist]
3023
include = ["aieng/"]
3124

3225
[tool.hatch.build.targets.wheel]
3326
include = ["aieng/"]
34-
35-
[tool.mypy]
36-
ignore_missing_imports = true
37-
install_types = true
38-
pretty = true
39-
namespace_packages = true
40-
explicit_package_bases = true
41-
non_interactive = true
42-
warn_unused_configs = true
43-
allow_any_generics = false
44-
allow_subclassing_any = false
45-
allow_untyped_calls = false
46-
allow_untyped_defs = false
47-
allow_incomplete_defs = false
48-
check_untyped_defs = true
49-
allow_untyped_decorators = false
50-
warn_redundant_casts = true
51-
warn_unused_ignores = true
52-
warn_return_any = true
53-
implicit_reexport = false
54-
strict_equality = true
55-
extra_checks = true
56-
57-
[tool.ruff]
58-
include = ["*.py", "pyproject.toml", "*.ipynb"]
59-
line-length = 88
60-
61-
[tool.ruff.format]
62-
quote-style = "double"
63-
indent-style = "space"
64-
docstring-code-format = true
65-
66-
[tool.ruff.lint]
67-
select = [
68-
"A", # flake8-builtins
69-
"B", # flake8-bugbear
70-
"COM", # flake8-commas
71-
"C4", # flake8-comprehensions
72-
"RET", # flake8-return
73-
"SIM", # flake8-simplify
74-
"ICN", # flake8-import-conventions
75-
"Q", # flake8-quotes
76-
"RSE", # flake8-raise
77-
"D", # pydocstyle
78-
"E", # pycodestyle
79-
"F", # pyflakes
80-
"I", # isort
81-
"W", # pycodestyle
82-
"N", # pep8-naming
83-
"ERA", # eradicate
84-
"PL", # pylint
85-
]
86-
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL"]
87-
ignore = [
88-
"B905", # `zip()` without an explicit `strict=` parameter
89-
"E501", # line too long
90-
"D203", # 1 blank line required before class docstring
91-
"D213", # Multi-line docstring summary should start at the second line
92-
"PLR2004", # Replace magic number with named constant
93-
"PLR0913", # Too many arguments
94-
"COM812", # Missing trailing comma
95-
]
96-
97-
# Ignore import violations in all `__init__.py` files.
98-
[tool.ruff.lint.per-file-ignores]
99-
"__init__.py" = ["E402", "F401", "F403", "F811"]
100-
101-
[tool.ruff.lint.pep8-naming]
102-
ignore-names = ["X*", "setUp"]
103-
104-
[tool.ruff.lint.isort]
105-
lines-after-imports = 2
106-
107-
[tool.ruff.lint.pydocstyle]
108-
convention = "numpy"
109-
110-
[tool.ruff.lint.pycodestyle]
111-
max-doc-length = 88
112-
113-
[tool.pytest.ini_options]
114-
markers = [
115-
"integration_test: marks tests as integration tests",
116-
]

aieng-eval-agents/tests/aieng/topic/impl/test_example_impl.py renamed to aieng-eval-agents/tests/aieng/agent_evals/impl/test_example_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Test example implementation."""
22

3-
from aieng.topic.impl import example_impl
3+
from aieng.agent_evals.impl import example_impl
44

55

66
def test_example_impl():

pyproject.toml

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,58 @@ name = "agentic-ai-evaluation-bootcamp-202602"
33
version = "0.1.0"
44
description = "Vector Institute Agentic AI Evaluation Bootcamp 202602"
55
readme = "README.md"
6-
authors = [ {name = "Vector AI Engineering", email = "[email protected]"}]
6+
authors = [ {name = "Vector AI Engineering", email = "[email protected]"} ]
77
license = "Apache-2.0"
8-
requires-python = ">=3.12"
8+
requires-python = ">=3.12,<4.0"
99
dependencies = [
10-
"aiohttp>=3.12.14",
10+
"aieng-eval-agents>=0.1.0",
11+
"aiohttp>=3.13.3",
1112
"beautifulsoup4>=4.13.4",
1213
"datasets>=3.6.0",
13-
"e2b-code-interpreter>=1.5.2",
14-
"gradio>=5.37.0",
15-
"langfuse>=3.1.3",
14+
"e2b-code-interpreter>=2.4.1",
15+
"gradio>=6.0.2",
16+
"langfuse>=3.10.3",
1617
"lxml>=6.0.0",
1718
"nest-asyncio>=1.6.0",
1819
"numpy<2.3.0",
19-
"openai>=1.93.1",
20-
"openai-agents>=0.1.0",
21-
"plotly>=6.2.0",
22-
"pydantic>=2.11.7",
23-
"pydantic-ai-slim[logfire]>=0.3.7",
24-
"pytest-asyncio>=0.25.2",
20+
"openai>=2.8.1",
21+
"openai-agents>=0.6.1",
22+
"plotly>=6.5.0",
23+
"pydantic>=2.12.4",
24+
"pydantic-ai-slim[logfire]>=1.26.0",
2525
"scikit-learn>=1.7.0",
26-
"weaviate-client>=4.15.4",
27-
"urllib3>=2.6.0",
26+
"weaviate-client>=4.18.3",
27+
"urllib3>=2.6.3",
2828
]
2929

30-
[build-system]
31-
requires = ["hatchling"]
32-
build-backend = "hatchling.build"
33-
34-
[tool.hatch.build.targets.wheel]
35-
packages = ["src"]
36-
3730
[dependency-groups]
3831
dev = [
39-
"aieng-platform-onboard>=0.3.6",
40-
"mypy>=1.14.1",
32+
"aieng-platform-onboard>=0.4.0",
33+
"mypy>=1.19.0",
4134
"codecov>=2.1.13",
42-
"ipykernel>=6.29.5",
43-
"ipython>=9.4.0",
35+
"ipykernel>=7.1.0",
36+
"ipython>=9.8.0",
4437
"ipywidgets>=8.1.7",
4538
"jupyter>=1.1.1",
4639
"jupyterlab>=4.4.8",
4740
"nbqa>=1.9.1",
48-
"pip-audit>=2.7.3",
49-
"pre-commit>=4.1.0",
41+
"pip-audit>=2.9.0",
42+
"pre-commit>=4.2.0",
5043
"pytest>=8.3.4",
51-
"pytest-asyncio>=0.25.2",
52-
"pytest-cov>=6.0.0",
44+
"pytest-asyncio>=0.26.0",
45+
"pytest-cov>=6.1.1",
5346
"pytest-mock>=3.14.0",
54-
"ruff>=0.12.2",
55-
"transformers>=4.54.1",
47+
"ruff>=0.14.7",
48+
"transformers>=4.57.3",
5649
]
5750
docs = [
5851
"jinja2>=3.1.6", # Pinning version to address vulnerability GHSA-cpwx-vrp4-4pq7
5952
"mkdocs>=1.6.0",
6053
"mkdocs-material>=9.6.15",
61-
"mkdocstrings>=0.24.1",
62-
"mkdocstrings-python>=1.16.12",
63-
"ipykernel>=6.29.5",
64-
"ipython>=9.4.0",
54+
"mkdocstrings>=1.0.0",
55+
"mkdocstrings-python>=2.0.1",
56+
"ipykernel>=7.1.0",
57+
"ipython>=9.8.0",
6558
]
6659
web-search = [
6760
"google-cloud-firestore>=2.21.0",
@@ -74,6 +67,14 @@ web-search = [
7467
[tool.uv]
7568
default-groups = ["dev", "docs"]
7669

70+
[tool.uv.workspace]
71+
members = [
72+
"aieng-eval-agents",
73+
]
74+
75+
[tool.uv.sources]
76+
aieng-eval-agents = { workspace = true }
77+
7778
[tool.ruff]
7879
include = ["*.py", "pyproject.toml", "*.ipynb"]
7980
line-length = 88
@@ -142,5 +143,5 @@ markers = [
142143

143144
[tool.coverage]
144145
[tool.coverage.run]
145-
source=["src/"]
146-
omit=["tests/*", "*__init__.py"]
146+
source=["aieng-eval-agents/aieng"]
147+
omit=["aieng-eval-agents/tests/*", "*__init__.py", "scripts/*"]

0 commit comments

Comments
 (0)