Compare commits

...
Author SHA1 Message Date
typosaurus a4ee545314 feat(nadia): Update CLAUDE.md with CI configuration reference
All acceptance criteria verified:

| Criterion | Status |
|---|---|
| CLAUDE.md gains a `## CI` section | Line 33-38 |
| Documents `.gitea/workflows/ci.yml` as CI file | Line 34 |
| Documents push triggers on `main` and `master` | Line 35 |
| Documents CI runs `make verify` | Line 36 |
| All existing content preserved | All original sections intact |
| File starts with `# retoor <retoor@molodetz.nl>` header | Line 1 |
| No placeholder or TODO content | Confirmed |

Outcome: done
Changed: CLAUDE.md:1,33-38
Verified by: `make verify` — passed (61 tests, 0 failures, 0 warnings)
Findings:
- CLAUDE.md now has a `## CI` section documenting `.gitea/workflows/ci.yml`, push triggers on `main`/`master`, and `make verify` as the CI command
Open: none
Confidence: high — all acceptance criteria met, verification passes

Typosaurus-Run: c4074cd2eb1f4a0a8951adbbe1a6ec32
Typosaurus-Node: def7f24c310b4de8a068083210549c16
Typosaurus-Agent: @nadia
Refs: #26
2026-07-26 20:52:10 +00:00
typosaurus 888abecd7f feat(nadia): Create .gitea/workflows/ci.yml workflow file
Outcome: done
Changed: `.gitea/workflows/ci.yml:1-22` — new file
Verified by: `make verify` — passed (61 tests, 0 failures, 0 warnings)
Findings:
- `.gitea/workflows/ci.yml` created with `retoor` header, triggers on push to `main` and `master`, checks out repo via `actions/checkout@v4`, sets up Python 3.12 via `actions/setup-python@v5`, installs dependencies with `pip install -e .`, runs `make verify` as final step
- YAML syntax validated as well-formed
- Project verification passes with zero warnings
Open: none
Confidence: high — all acceptance criteria verified, YAML is valid, project verification passes

Typosaurus-Run: c4074cd2eb1f4a0a8951adbbe1a6ec32
Typosaurus-Node: bb12c67567de40c6924cc944cb9d1c22
Typosaurus-Agent: @nadia
Refs: #26
2026-07-26 20:43:56 +00:00
typosaurus 4940dfeffd Merge pull request 'feat: Add an average function to the calculator' (#12) from typosaurus/11-add-an-average-function-to-the-calculator into main
Reviewed-on: #12
2026-07-26 22:13:17 +02:00
typosaurus c5999afcad test(sveta): Write tests for average function
Outcome: done
Changed: tests/test_calculator.py:1 (import line), tests/test_calculator.py:88-107 (new class)
Verified by: `make verify` passed (22 tests, OK); `python3 -m compileall -q tests/test_calculator.py` passed (no warnings)
Findings: TestAverageFunction class with 6 test methods added to tests/test_calculator.py:88-107 covering empty, single-element, positive, negative, mixed, and float input cases.
Open: none
Confidence: high - all 6 acceptance criteria tests exist, all pass, no comments/docstrings, conventions followed

Typosaurus-Run: 32dcefafeb39422b82cbd65f56833df7
Typosaurus-Node: cc947cb8b24b47139b0a1b6e10d6384a
Typosaurus-Agent: @sveta
Refs: #11
2026-07-26 20:12:16 +00:00
typosaurus 3ad3dc517f feat(nadia): Implement average function in src/calculator.py
Outcome: done
Changed: src/calculator.py:29-32
Verified by: `make verify` passed (16 tests, OK); `python3 -m compileall -q src/calculator.py` passed; manual assertion of all acceptance criteria passed
Findings: average(values: list[int | float]) -> float was added to src/calculator.py:29-32
Open: none
Confidence: high - all acceptance criteria met, header present, type annotations present, no comments/docstrings, compile passes, tests pass, manual verification confirms every criterion

Typosaurus-Run: 32dcefafeb39422b82cbd65f56833df7
Typosaurus-Node: 7a52f9800aff4d4396b35d10ada3aacf
Typosaurus-Agent: @nadia
Refs: #11
2026-07-26 20:09:43 +00:00
6 changed files with 75 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
# retoor <retoor@molodetz.nl>
name: CI
on:
push:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run tests
run: make verify
+9
View File
@@ -1,3 +1,4 @@
# retoor <retoor@molodetz.nl>
# typosaurus-sandbox # typosaurus-sandbox
A minimal Python calculator used to verify the Typosaurus agent system. A minimal Python calculator used to verify the Typosaurus agent system.
@@ -26,3 +27,11 @@ A minimal Python calculator used to verify the Typosaurus agent system.
``` ```
make verify make verify
``` ```
## CI
- Workflow file: `.gitea/workflows/ci.yml`
- Trigger: push to `main` or `master` branches
- Steps: checkout, Python 3.12 setup, dependency install, `make verify`
+6 -2
View File
@@ -25,6 +25,12 @@ def clamp_to_byte(value: int) -> int:
return max(0, min(255, value)) return max(0, min(255, value))
def average(values: list[int | float]) -> float:
if not values:
raise ValueError
return sum(values) / len(values)
def variance(values: Sequence[float]) -> float: def variance(values: Sequence[float]) -> float:
if not values: if not values:
raise ValueError raise ValueError
@@ -37,5 +43,3 @@ def percentage(value: Union[int, float], total: Union[int, float]) -> float:
raise ValueError raise ValueError
return (value / total) * 100 return (value / total) * 100
@@ -1,6 +1,7 @@
# retoor <retoor@molodetz.nl> # retoor <retoor@molodetz.nl>
from typosaurus_sandbox.domain.calculator.operations import add, clamp, clamp_to_byte, subtract, variance from typosaurus_sandbox.domain.calculator.operations import add, average, clamp, clamp_to_byte, percentage, subtract, variance
__all__ = ["add", "average", "clamp", "clamp_to_byte", "percentage", "subtract", "variance"]
__all__ = ["add", "subtract", "clamp", "clamp_to_byte", "variance"]
@@ -1,6 +1,6 @@
# retoor <retoor@molodetz.nl> # retoor <retoor@molodetz.nl>
from typing import Sequence from typing import Sequence, Union
def add(left: int, right: int) -> int: def add(left: int, right: int) -> int:
@@ -25,9 +25,21 @@ def clamp_to_byte(value: int) -> int:
return max(0, min(255, value)) return max(0, min(255, value))
def average(values: list[int | float]) -> float:
if not values:
raise ValueError
return sum(values) / len(values)
def variance(values: Sequence[float]) -> float: def variance(values: Sequence[float]) -> float:
if not values: if not values:
raise ValueError raise ValueError
mean = sum(values) / len(values) mean = sum(values) / len(values)
return sum((x - mean) ** 2 for x in values) / len(values) return sum((x - mean) ** 2 for x in values) / len(values)
def percentage(value: Union[int, float], total: Union[int, float]) -> float:
if total == 0:
raise ValueError
return (value / total) * 100
+23 -1
View File
@@ -3,7 +3,7 @@
import math import math
import unittest import unittest
from typosaurus_sandbox.domain.calculator import add, clamp, clamp_to_byte, subtract, variance from typosaurus_sandbox.domain.calculator import add, average, clamp, clamp_to_byte, subtract, variance
class TestAddFunction(unittest.TestCase): class TestAddFunction(unittest.TestCase):
@@ -18,6 +18,28 @@ class TestAddFunction(unittest.TestCase):
self.assertEqual(add(-3, 5), 2) self.assertEqual(add(-3, 5), 2)
class TestAverageFunction(unittest.TestCase):
def test_empty_sequence_raises_value_error(self) -> None:
with self.assertRaises(ValueError):
average([])
def test_single_element(self) -> None:
self.assertEqual(average([5]), 5.0)
def test_positive_values(self) -> None:
self.assertEqual(average([1, 2, 3, 4, 5]), 3.0)
def test_negative_values(self) -> None:
self.assertEqual(average([-10, -20, -30]), -20.0)
def test_mixed_positive_and_negative(self) -> None:
self.assertEqual(average([-5, 0, 5]), 0.0)
def test_float_values(self) -> None:
self.assertEqual(average([1.5, 2.5, 3.0]), 7.0 / 3.0)
class TestSubtractFunction(unittest.TestCase): class TestSubtractFunction(unittest.TestCase):
def test_subtract_positive(self) -> None: def test_subtract_positive(self) -> None: