Skip to content

Say "1 hour", "1 fish is", "1 hand" and "1 day" at the docks - #275

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/docks-count-of-one
Nov 12, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/docks-count-of-one

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

Four strings in src/location/docks.py used the plural form when the count was exactly 1. Each one now uses the same inline conditional as #261:

  • The catch report said "over 1 hours" whenever the 1-10 trip roll came up 1, which is about one cast in ten. It now says "over 1 hour".
  • After an export run left one fish behind, the note said "1 fish are still in the hold." It now says "1 fish is".
  • The voyage provisioning header said "1 hands aboard" for a boat with one hand. It now says "1 hand aboard".
  • A voyage that foundered on its first leg reported "1 days out of N." It now says "1 day out of N."

The second count in the provisioning header (plan["legs"]) is left as it was, because every voyage plan has 4, 7 or 11 legs.

Closes #274

Test plan

  • Four new tests in tests/location/test_docks.py, one per string at a count of 1. With the src/ change stashed, all four failed; with it restored, all four passed.
  • The plural cases are pinned as well: an assertion was added to test_fish_always_lands_at_least_one_fish ("over 3 hours!"), test_provisioning_says_when_each_option_runs_out ("3 hands aboard for 11 days.") and test_voyageReport_reads_as_a_disaster_when_she_founders ("3 days out of 11."). The existing "40 fish are still in the hold" assertion is unchanged.
  • Full suite run locally with the dummy SDL drivers: 1116 passed.
  • black --check passes on both changed files.
  • CI green on the PR head.

Docs

  • The README's sample catch line ("over 6 hours") is still accurate.
  • No persisted fields were touched, so no schema changes were needed.

Deferred issues

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

The catch report, the export run's leftover note, the voyage
provisioning header and the foundering report all printed the plural
for a count of one - "over 1 hours" turned up on about one cast in ten.

Closes #274

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (one pass, anchored on green CI for head feature/docks-count-of-one, where the test and docker jobs both passed):

  • Scope: PASS. Only src/location/docks.py (four strings) and tests/location/test_docks.py are changed, and both are needed for Docks strings say "1 hours", "1 fish are", "1 hands" and "1 days" #274.
  • Tests-new: PASS. No new public methods were added. Each of the four changed strings has a new count-of-one test.
  • Tests-fix: PASS. With src/location/docks.py stashed, the four new tests failed (4 failed, 137 passed in test_docks.py). After stash pop, the full suite passed with 1116 tests.
  • Sibling structure: PASS. The new tests follow the # prepare / # call / # check layout and reuse createDocks, createExportingDocks, createSailingDocks and voyageChooser.
  • Sibling renames: PASS. Nothing was renamed.
  • Docs: PASS. The README's sample line You caught 7 Minnow over 6 hours! is still accurate. No schema fields and no PLANNING goals are affected.
  • Issue resolution: PASS. All four strings named in Docks strings say "1 hours", "1 fish are", "1 hands" and "1 days" #274 were changed.
  • CI: PASS. Both checks are green on the PR head.
  • Schema-sync: PASS (not applicable). No persisted fields were touched.
  • Money-format: PASS (not applicable). No money displays were touched.
  • Deterministic-tests: PASS. The one-hour test patches random.randint with side_effect=[1, 5]. The export and provisioning tests don't roll, and the report test passes a fixed summary.
  • Headless-pygame: PASS (not applicable). No pygame code was touched.
  • camelCase: PASS. No new identifiers were added outside the test_* functions.

Notes:

  • tests/location/test_docks.py, in test_voyageReport_says_day_for_a_foundering_on_the_first_leg: the test passes a hand-built summary with legsSailed: 1 rather than driving a real voyage to a leg-one foundering. Reachability was confirmed from source instead. damage() (src/business/adventures.py:169) sets foundering at hull 0 during resolveChoice, and advanceLeg then always runs (src/location/docks.py:934), so legsSailed is at least 1.
  • An observation outside this diff, filed separately: a voyage that founders because no crew is left (src/business/adventures.py:607-609) is reported as "The hull gives at last", and finishVoyage sets the hull to 92 damage, even when the hull was sound.

One self-review pass is complete, with no findings to address in the diff.

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 75ab477 into main Nov 12, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the feature/docks-count-of-one branch November 12, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docks strings say "1 hours", "1 fish are", "1 hands" and "1 days"

1 participant