Land milestones 002 to 004 on main #34

Merged
Tirsvad merged 22 commits from mil-004-random-walk-and-spirograph into main 2026-10-07 18:47:25 +02:00
Owner

Land milestones 002 to 004 on main

Pull requests #30 to #33 were stacked. #30 merged into main, but #31, #32 and #33 each merged into the branch below them, so main holds only milestone 001: 2 of the 12 package files and 13 of the 18 review records. This pull request brings the rest. Its head, mil-004-random-walk-and-spirograph, has the same content as mil-003-shapes-and-random-color after #33.

What it brings

  • Milestone 002 (#31): the Pen protocol, the window helpers, the recording fake turtle, draw_square, draw_dashed_line and the turtle-challenges command with square and dashed-line.
  • Milestone 003 (#32): random_color, the color palette, draw_shape, draw_shapes and the shapes command.
  • Milestone 004 (#33): random_walk, draw_spirograph, the random-walk and spirograph commands with --gap, and the final README run instructions.
  • Documents: the code reviews RC-014 to RC-017 (all Go), the check of the Business Case success criteria RC-018 (Go-with-conditions), the traceability matrix rows, and the acceptance of the project plan PP-001.

Verification

The code is unchanged since commit 575df4d. CI passed on this head, 45c0cf8 (ruff, mypy, 95 tests and the Doxygen build, with warnings as errors), and the same steps passed in a fresh clone under PowerShell (RC-018). This pull request runs CI again against main.

Issues

This pull request closes nothing: the issues of milestones 001 to 004 were closed when #30 to #33 were merged. #28 (verify the Business Case success criteria) stays open until the conditions of RC-018 are met, in particular the README clone from GitHub once main is there.

Refs #28

## Land milestones 002 to 004 on main Pull requests #30 to #33 were stacked. #30 merged into `main`, but #31, #32 and #33 each merged into the branch below them, so `main` holds only milestone 001: 2 of the 12 package files and 13 of the 18 review records. This pull request brings the rest. Its head, `mil-004-random-walk-and-spirograph`, has the same content as `mil-003-shapes-and-random-color` after #33. ### What it brings - Milestone 002 (#31): the `Pen` protocol, the window helpers, the recording fake turtle, `draw_square`, `draw_dashed_line` and the `turtle-challenges` command with `square` and `dashed-line`. - Milestone 003 (#32): `random_color`, the color palette, `draw_shape`, `draw_shapes` and the `shapes` command. - Milestone 004 (#33): `random_walk`, `draw_spirograph`, the `random-walk` and `spirograph` commands with `--gap`, and the final README run instructions. - Documents: the code reviews `RC-014` to `RC-017` (all Go), the check of the Business Case success criteria `RC-018` (Go-with-conditions), the traceability matrix rows, and the acceptance of the project plan `PP-001`. ### Verification The code is unchanged since commit `575df4d`. CI passed on this head, `45c0cf8` (ruff, mypy, 95 tests and the Doxygen build, with warnings as errors), and the same steps passed in a fresh clone under PowerShell (`RC-018`). This pull request runs CI again against `main`. ### Issues This pull request closes nothing: the issues of milestones 001 to 004 were closed when #30 to #33 were merged. #28 (verify the Business Case success criteria) stays open until the conditions of `RC-018` are met, in particular the README clone from GitHub once `main` is there. Refs #28
Tirsvad added 22 commits 2026-10-07 18:45:09 +02:00
The drawing functions take a Pen, the part of turtle.Turtle they use, so a test can
pass a fake that records every call. window.py is the only module that imports
turtle, and it does so inside the functions so that importing the package needs no Tk.

Task: MIL-002#1
Task: MIL-002#2
Challenge 1 draws four sides and turns right 90 degrees after each. Challenge 2 puts
the pen down for a dash and up for a gap and leaves it down at the end. Lengths and
counts come from constants.py; invalid values raise ValueError.

Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
Add the command line entry point
CI / checks (pull_request) Successful in 1m13s
b3153b9dc1
python -m turtle_challenges <challenge> and the turtle-challenges command open a
window, run the named challenge and wait for a click. square and dashed-line are
registered; a missing Tk is reported with a hint instead of a traceback.

Task: MIL-002#6
random_color returns an immutable (red, green, blue) tuple of integers from 0 to 255
and random_palette_color picks a named color. Both take an optional random.Random
so that tests can seed them.

Task: MIL-003#1
Task: MIL-003#2
draw_shape turns 360 divided by the number of sides after each side and rejects
fewer than 3 sides. draw_shapes draws a triangle up to a decagon, each in a color
from the palette.

Task: MIL-003#3
Task: MIL-003#4
Task: MIL-003#5
Add the shapes challenge to the command line
CI / checks (pull_request) Successful in 1m7s
c695c47929
turtle-challenges shapes draws the polygons. The argument parsing tests already
cover every registered name.

Task: MIL-003#6
200 steps of equal length, each in a random heading of 0, 90, 180 or 270 degrees and
a random RGB color, with a thick line and the fastest speed.

Task: MIL-004#1
Draws int(360 / size_of_gap) circles, each in a random RGB color, turning the heading
by the gap after each. A gap that is not positive raises ValueError, and the integer
count avoids the TypeError that range raises for a float.

Task: MIL-004#2
Task: MIL-004#3
turtle-challenges random-walk and turtle-challenges spirograph, the latter with
--gap for the degrees between two circles.

Task: MIL-004#4
The Run section now covers all five challenges, the --gap option and how to call the
functions from other code.

Task: MIL-004#5
S01, the Product Owner, accepted PP-001 on 2026-10-08: the Version History gets
a new Accepted row and the Reviews open issue says so. The Gateway Schedule now
links the four milestones that were created on the Gitea host (issues #1 to #29).
Resolve pending commit links
CI / checks (pull_request) Successful in 1m1s
795b9dba39
Replace pending in the Version History of the project plan with the link to the
commit that accepted it.
RC-014 to RC-017 review the Python code each milestone added or changed and all
four end in Go. S01 accepted the imports inside create_window and create_pen as a
documented exception, the name tim, N-A for criterion 10 (the project has no
design class diagram) and the lower-bounded development tools. The traceability
matrix lists the code of each milestone.

Closes #8
Closes #15
Closes #22
Closes #29
Resolve pending commit links
CI / checks (pull_request) Successful in 1m4s
eb73bb33e4
Replace pending in the Version History of the traceability matrix and of the four
code review records with the link to the commit that added them.
The Reviews open issue now records the code reviews of the four milestones against
QC-PY-001 (RC-014 to RC-017, all Go). S01, the Product Owner, accepted the new
version on 2026-10-08, so the Version History gets a new Accepted row and the
previous one becomes Deprecated.
Resolve pending commit links
CI / checks (pull_request) Successful in 59s
575df4d07f
Replace pending in the Version History of the project plan with the link to the
commit that accepted the new version.
RC-018 checks the seven success criteria of BC-001 against the delivered repository
with a fresh clone, the README steps under PowerShell, the real command, the host's
CI runs and settings, and the pull requests. Criteria 1 to 4, 6 and 7 are met.
Criterion 5 is not met as written yet: the README clones the GitHub repository,
which holds only the initial commit until the pull requests are merged. The proposed
verdict is Go-with-conditions and S01 decides.

Refs #28
Resolve pending commit links
CI / checks (pull_request) Successful in 1m2s
665301689d
Replace pending in the Version History of RC-018 with the link to the commit that
added it.
A new row for the check of the success criteria of BC-001 against the delivered
repository, for the gate of MIL-004. Its record RC-018 is a draft with the verdict
Pending, so the row says draft, no verdict.

Refs #28
Resolve pending commit links
CI / checks (pull_request) Successful in 1m3s
4cb75dff77
Replace pending in the Version History of the traceability matrix with the link to
the commit that added the RC-018 row.
S01 decided the check of the Business Case success criteria on 2026-10-08. Six of the
seven criteria are met; criterion 5 is not met until the code is on main and on
GitHub, so the first three action items of RC-018 are the conditions. The
traceability matrix row follows the verdict.

Refs #28
Resolve pending commit links
CI / checks (pull_request) Successful in 1m2s
45c0cf8acf
Replace pending in the Version History of RC-018 and of the traceability matrix with
the link to the commit that recorded the verdict.
Tirsvad merged commit daee0f5c98 into main 2026-10-07 18:47:25 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100-days-of-code/018-turtle#34