Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .dockerignore

This file was deleted.

4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ indent_size = 4
[{Makefile,*.mk}]
indent_style = tab

# Dockerfiles.
[Dockerfile*]
indent_size = 4

# GitHub Actions workflows — 2 spaces.
[.github/**/*.{yml,yaml}]
indent_size = 2
Expand Down
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
# --- Build / packaging ----------------------------------------------------
Makefile text eol=lf
*.mk text eol=lf
Dockerfile* text eol=lf
docker-compose*.yml text eol=lf
.github/**/*.yml text eol=lf
.github/**/*.yaml text eol=lf

Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/docker.yml

This file was deleted.

21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test: ## Run unit tests.
test-race: test ## Alias for `test` (Python has no race detector).

cover: ## Run tests with coverage report.
$(PYTHON) -m pytest --cov=src --cov-report=term-missing --cov-report=html
$(PYTHON) -m pytest --cov=hawk --cov-report=term-missing --cov-report=html
@echo "Coverage report: htmlcov/index.html"

bench: ## Run benchmarks (requires pytest-benchmark).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<strong>Official Python client for the Hawk daemon API</strong>
</p>
<p align="center">
<a href="https://python.org/"><img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python"></a>
<a href="https://python.org/"><img src="https://img.shields.io/badge/Python-3.9+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License"></a>
<a href="https://github.com/GrayCodeAI/hawk-sdk-python/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/GrayCodeAI/hawk-sdk-python/ci.yml?style=flat-square&label=tests" alt="CI"></a>
</p>
Expand Down
11 changes: 0 additions & 11 deletions deploy/docker/docker-compose.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Python SDK for the Hawk Daemon API**

[![Python](https://img.shields.io/badge/Python-3.10+-3776AB?logo=python)](https://python.org/)
[![Python](https://img.shields.io/badge/Python-3.9+-3776AB?logo=python)](https://python.org/)
[![Type](https://img.shields.io/badge/Type-SDK-blue)]()

</div>
Expand Down
4 changes: 4 additions & 0 deletions tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class TestRunBenchmarkAsync:

async def test_single_task(self) -> None:
agent = AsyncMock()
agent.reset = MagicMock() # reset is sync; AsyncMock would leak a coroutine
resp = MagicMock()
resp.response = "ok"
resp.tokens_in = 10
Expand All @@ -251,6 +252,7 @@ async def test_single_task(self) -> None:

async def test_multiple_runs(self) -> None:
agent = AsyncMock()
agent.reset = MagicMock() # reset is sync; AsyncMock would leak a coroutine
resp = MagicMock()
resp.response = "ok"
resp.tokens_in = 10
Expand All @@ -264,6 +266,7 @@ async def test_multiple_runs(self) -> None:

async def test_validation_fail(self) -> None:
agent = AsyncMock()
agent.reset = MagicMock() # reset is sync; AsyncMock would leak a coroutine
resp = MagicMock()
resp.response = "no match"
resp.tokens_in = 10
Expand All @@ -283,6 +286,7 @@ async def test_validation_fail(self) -> None:

async def test_agent_exception(self) -> None:
agent = AsyncMock()
agent.reset = MagicMock() # reset is sync; AsyncMock would leak a coroutine
agent.chat.side_effect = RuntimeError("async crash")
tasks = [EvalTask(name="t1", prompt="hello")]
results = await run_benchmark_async(agent, tasks)
Expand Down
12 changes: 4 additions & 8 deletions tests/test_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import json
from unittest.mock import MagicMock
from unittest.mock import AsyncMock, MagicMock

import httpx
import pytest
Expand Down Expand Up @@ -149,7 +149,7 @@ async def _aiter_lines():
yield line

response.aiter_lines.return_value = _aiter_lines()
response.aclose = MagicMock(return_value=_async_noop())
response.aclose = AsyncMock()

reader = AsyncStreamReader(response)
events = []
Expand All @@ -175,7 +175,7 @@ async def _aiter_lines():
yield line

response.aiter_lines.return_value = _aiter_lines()
response.aclose = MagicMock(return_value=_async_noop())
response.aclose = AsyncMock()

reader = AsyncStreamReader(response)
events = []
Expand Down Expand Up @@ -203,13 +203,9 @@ async def _aiter_lines():
yield line

response.aiter_lines.return_value = _aiter_lines()
response.aclose = MagicMock(return_value=_async_noop())
response.aclose = AsyncMock()

reader = AsyncStreamReader(response)
text = await reader.collect_text()

assert text == "Async text"


async def _async_noop() -> None:
pass
Loading