Commit Graph

17 Commits

Author SHA1 Message Date
typosaurus
965634fdcc chore: probe head 2026-07-26 20:54:19 +02:00
typosaurus
98a9eabdd4 chore: probe base v1 2026-07-26 20:54:17 +02:00
9bc1788ae2 Merge pull request 'feat: Add a variance function to the calculator' (#20) from typosaurus/19-add-a-variance-function-to-the-calculator into main
Reviewed-on: #20
2026-07-26 19:09:52 +02:00
2f86b1c6cc test(sveta): Write tests for variance function
Outcome: done
Changed: tests/test_calculator.py:2, tests/test_calculator.py:67-97
Verified by: make verify — exit 0, all 24 tests pass (8 variance tests OK)
Findings: Import line updated to include variance from src.calculator at tests/test_calculator.py:4
Findings: TestVarianceFunction class added at tests/test_calculator.py:67-97 with 8 test methods
Findings: Empty sequence coverage split into list and tuple cases at lines 69-76
Findings: Single element returns 0.0 at line 78
Findings: Constant values return 0.0 at line 81
Findings: Known set [1,2,3,4,5] yields variance 2.0 at line 84
Findings: Two-element edge case [0,2] yields variance 1.0 at line 87
Findings: Integer inputs produce float result at line 90
Findings: Tuple input accepted as Sequence at line 95
Findings: All patterns match existing test conventions — no comments, no docstrings, full type annotations, proper header
Open: none
Confidence: high — all acceptance criteria covered, pattern-consistent, verified pass

Typosaurus-Run: 918d38b1535b44bea9a86b82deae5233
Typosaurus-Node: 3f6d4a888da94bb99d585efb53106ebd
Typosaurus-Agent: @sveta
Refs: #19
2026-07-26 17:07:10 +00:00
3c5079a9d8 feat(nadia): Implement variance function in calculator.py
Outcome: done

Changed: src/calculator.py:3, src/calculator.py:33-37

Verified by: python3 -m compileall -q src tests && python3 -m unittest discover -s tests -q — exit 0, compilation passed, 16 tests pass, smoke test confirms correctness

Findings: from typing import Sequence added at line 3 of src/calculator.py
Findings: variance(values: Sequence[float]) -> float added at lines 33-37 of src/calculator.py
Findings: Population variance formula implemented: sum of squared deviations from mean divided by N
Findings: Empty sequence raises bare ValueError matching existing clamp convention
Findings: Single-element sequence returns 0.0
Findings: File header retoor line preserved
Findings: Full type annotations present, no comments or docstrings

Open: Test class for variance could be added by sveta

Confidence: high - implementation is 5 lines, matches all acceptance criteria, verified by compilation and smoke test

Typosaurus-Run: 918d38b1535b44bea9a86b82deae5233
Typosaurus-Node: 50845c1644c5421fb80ab933d382bc90
Typosaurus-Agent: @nadia
Refs: #19
2026-07-26 17:06:20 +00:00
078766216d Merge pull request 'feat: Add a clamp function to the calculator' (#8) from typosaurus/7-add-a-clamp-function-to-the-calculator into main
Reviewed-on: #8
2026-07-25 19:04:56 +02:00
8605a8c596 test(sveta): Write clamp tests
Outcome: done
Changed: tests/__init__.py:1, tests/test_calculator.py:1-86
Verified by: `make verify` — exit 0, "verification passed", Ran 16 tests in 0.001s, OK
Findings: tests/ directory created at ./tests/ with __init__.py (header only) and test_calculator.py (16 tests for clamp).
Findings: All 16 clamp tests pass under `make verify`: value below low, above high, in range, equals low, equals high, low>high ValueError, negative values, float below/above/in-range/equals-boundary, float low>high ValueError, large values, -inf/inf boundaries, and NaN.
Findings: clamp is typed as (value: int, low: int, high: int) -> int; float and inf/NaN tests pass because Python does not enforce type hints at runtime.
Open: none
Confidence: high - all 16 tests pass, all acceptance criteria covered, make verify passes

Typosaurus-Run: 5b5c36bf38254bf4bfcdbde317991a5a
Typosaurus-Node: 56f03705c3d64023ba102d3aa3169ef2
Typosaurus-Agent: @sveta
Refs: #7
2026-07-25 19:04:03 +02:00
c7f0712d12 feat(nadia): Implement clamp function
**Outcome:** done
**Changed:** src/calculator.py:11-18
**Verified by:** python3 -m compileall -q src — passed; python3 -c with five acceptance assertions — passed. make verify fails because tests/ directory does not exist.
**Findings:** clamp(value: int, low: int, high: int) -> int added at src/calculator.py:11 with no docstrings or comments. File header at src/calculator.py:1 is present. All functions use full int type annotations.
**Open:** Test writer (sveta) should create tests/ directory and add unit tests for clamp.
**Confidence:** high

Typosaurus-Run: 5b5c36bf38254bf4bfcdbde317991a5a
Typosaurus-Node: bf41377d70c446b1b80b9e058fe81fb8
Typosaurus-Agent: @nadia
Refs: #7
2026-07-25 19:04:03 +02:00
65ce7f1994 feat: add clamp_to_byte at the end of calculator 2026-07-25 19:01:02 +02:00
f5363514bf chore: reset calculator to a clean baseline 2026-07-25 18:58:10 +02:00
ff830c6fb8 feat: add gcd at the end of the file 2026-07-25 18:51:44 +02:00
cb4c5516ad feat: add modulo and ignore build artifacts 2026-07-25 18:49:12 +02:00
d5861fb2e3 Merge pull request 'feat: Add multiply and divide to the calculator' (#3) from typosaurus/2-add-multiply-and-divide-to-the-calculator into main
Reviewed-on: #3
2026-07-25 17:22:52 +02:00
8f7f09f44a test(sveta): Write tests for multiply and divide
Outcome: done
Changed: tests/test_calculator.py:1-65, Makefile:1
Verified by: `make verify` — exit 0, "Ran 16 tests in 0.000s ... OK"
Findings: tests/test_calculator.py exists with 16 test methods covering add, subtract, multiply (positive/negative/zero), divide (positive/negative/zero-numerator/floor), and divide-by-zero ValueError.
           make verify now runs both compileall (src + tests) and unittest discover, all passing.
Open: none
Confidence: high — all 16 tests pass; coverage spans all acceptance criteria including multiply edge cases (positive, negative, zero) and divide edge cases (positive, negative, zero numerator, divide-by-zero).

Typosaurus-Run: d9404e45783a42b586e07fc0342eee5c
Typosaurus-Node: 00f8d57fc2964dc9bf5ae68ad25a6e18
Typosaurus-Agent: @sveta
Refs: #2
2026-07-25 17:08:53 +02:00
3f2a5c8a07 feat(nadia): Implement multiply and divide in calculator.py
Outcome: done
Changed: src/calculator.py:11-19
Verified by: `make verify` — exit 0, "verification passed"
Findings: src/calculator.py now defines multiply(left: int, right: int) -> int and divide(left: int, right: int) -> int.
           divide raises ValueError('division by zero') when the divisor is zero, using integer floor division (//) to preserve the int return type.
Open: none
Confidence: high — both functions added, header preserved, no comments/docstrings, full type annotations, verify passed.

Typosaurus-Run: d9404e45783a42b586e07fc0342eee5c
Typosaurus-Node: 430bbdd86efb4f16a1c90433f0667e6b
Typosaurus-Agent: @nadia
Refs: #2
2026-07-25 17:08:02 +02:00
380ac7f40f chore: seed sandbox project 2026-07-25 16:58:41 +02:00
ba015bf790 Initial commit 2026-07-25 16:58:02 +02:00