From 5ab97251e1d5175fa4e5adcc2018bdfcad8f26cb Mon Sep 17 00:00:00 2001 From: ericek111 Date: Mon, 31 Aug 2026 10:13:25 +0000 Subject: [PATCH] Say what happens instead of making files do things A file is written to; it does not write, score or name anything. Five comments and doc lines said otherwise, two of them older than today. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD --- docs/unfinished.md | 12 ++++++------ src/Nonemm.Contests/Rules/FieldDayRegionOne.cs | 6 +++--- src/Nonemm.Core/Country/PrefixRule.cs | 2 +- src/Nonemm.Core/StationInfo.cs | 2 +- tests/Nonemm.Contests.Tests/UdcScoringTests.cs | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/unfinished.md b/docs/unfinished.md index 38c9927..ed990d6 100644 --- a/docs/unfinished.md +++ b/docs/unfinished.md @@ -137,15 +137,15 @@ What still differs, and why: like it was never scored. The rules here follow the class: 5 points for a portable station, 2 for one in Region 1 at home and 3 from outside it. - **SA 10 and OK/OM DX on SSB** are not written in code at all: both are - published as `.udc` files, and the files score the station's logs to the - contact. N1MM's OK/OM DX class is the CW running only and says so; the SSB + published as `.udc` files, and with those files in the user-defined contests + folder the station's logs score to the contact. N1MM's OK/OM DX class is the CW running only and says so; the SSB running has different rules and its own pair of files, one for each side of the contest. - **A `.udc` section multiplier** is counted for any exchange that is not all - digits. N1MM checks it against the section list the file names in - `MultWindowType`, and those lists are not held here, so a US state sent into - an OK/OM DX log counts here and not in N1MM. Three contacts across the two - logs. + digits. N1MM checks it against the section list given in the file's + `MultWindowType` setting, and those lists are not held here, so a US state + sent into an OK/OM DX log counts as a multiplier here and not in N1MM. Three + contacts across the two logs. - **The BARTG Sprint** stores the time of the contact in the exchange column, which N1MM fills in by itself. Nothing here fills it in yet, so a log written here carries the serial number alone. diff --git a/src/Nonemm.Contests/Rules/FieldDayRegionOne.cs b/src/Nonemm.Contests/Rules/FieldDayRegionOne.cs index 683ea06..3064d62 100644 --- a/src/Nonemm.Contests/Rules/FieldDayRegionOne.cs +++ b/src/Nonemm.Contests/Rules/FieldDayRegionOne.cs @@ -65,8 +65,8 @@ public sealed class FieldDayRegionOne : Contest || call.Text.EndsWith("/M", StringComparison.OrdinalIgnoreCase) || call.Text.EndsWith("/A", StringComparison.OrdinalIgnoreCase); - /// Region 1 is Europe, Africa and the Middle East; the country file names - /// the first two, and Asia is split between regions, which the continent - /// alone cannot say. + /// Region 1 is Europe, Africa and the Middle East. The country file has a + /// continent for the first two; the Middle East is inside Asia, which is + /// split between regions, and the continent alone does not separate them. private static bool IsRegionOne(string continent) => continent is "EU" or "AF"; } diff --git a/src/Nonemm.Core/Country/PrefixRule.cs b/src/Nonemm.Core/Country/PrefixRule.cs index dc92853..7c8596d 100644 --- a/src/Nonemm.Core/Country/PrefixRule.cs +++ b/src/Nonemm.Core/Country/PrefixRule.cs @@ -3,7 +3,7 @@ using System.Globalization; namespace Nonemm.Core.Country; /// One alias from the country file: a prefix or whole call, plus the overrides -/// the file writes after it, such as `K5(4)[7]` for a different zone. +/// the file holds after it, such as `K5(4)[7]` for a different zone. public sealed class PrefixRule { private readonly DxccEntity entity; diff --git a/src/Nonemm.Core/StationInfo.cs b/src/Nonemm.Core/StationInfo.cs index 5f0e864..1bf245e 100644 --- a/src/Nonemm.Core/StationInfo.cs +++ b/src/Nonemm.Core/StationInfo.cs @@ -12,7 +12,7 @@ public sealed record StationInfo public string Continent { get; init; } = ""; - /// The primary prefix of the entity operated from, as the country file names it. + /// The primary prefix of the entity operated from, as spelled in the country file. public string CountryPrefix { get; init; } = ""; public string State { get; init; } = ""; diff --git a/tests/Nonemm.Contests.Tests/UdcScoringTests.cs b/tests/Nonemm.Contests.Tests/UdcScoringTests.cs index b7742b0..70d60c6 100644 --- a/tests/Nonemm.Contests.Tests/UdcScoringTests.cs +++ b/tests/Nonemm.Contests.Tests/UdcScoringTests.cs @@ -275,8 +275,8 @@ public class UdcScoringTests Assert.Single(LogFor(contest).Judge(TestLog.Contact("OM3XYZ", section: "NOV")).NewMultipliers); } - /// `Country` is what a published file writes where the editor writes - /// `CountryPrefix`. + /// Published files hold `Country` in this key; the UDC editor puts + /// `CountryPrefix` there. [Fact] public void CountryIsTheSameSourceAsCountryPrefix() => Assert.Equal(