Write a season for the 75 trails that had none: 69 estimates and 6 set from pages that differ

This commit is contained in:
swaits committed 2026-11-20 13:06:59 -07:00
1 parent 40f4cd43c4
commit 191b5cfc4f
79 files changed
+1468 -88

No files matched your search

+8 -7
View File
@@ -41,7 +41,10 @@ class SeasonFitFileTest(unittest.TestCase):
self.assertEqual(fit["rule_version"], E.RULE_VERSION)
self.assertEqual(fit["passes"], E.passes_bar(fit["loo"], fit["bar"]))
def test_estimates_only_with_a_passing_fit(self):
def test_estimates_only_over_the_bar_by_the_blind_test(self):
"""The machine estimate on its own is under the bar and is never
written to a record. Estimated seasons are judged, and the judged
method must pass the bar in its blind test."""
estimated = []
for tid in refresh.trail_ids(V.ROOT):
rec = refresh.load_toml(os.path.join(V.ROOT, tid, "trail.toml"))
@@ -49,12 +52,10 @@ class SeasonFitFileTest(unittest.TestCase):
estimated.append(tid)
if not estimated:
self.skipTest("no estimated seasons on file yet")
fit = load_fit()
self.assertTrue(fit["passes"], fit)
held = fit["loo"]
self.assertGreaterEqual(held["within1"] / held["n"],
E.BAR["within1_min"])
import season_judge
blind = season_judge.load_blind_test()
self.assertEqual(season_judge.check_blind_test(blind), [])
self.assertGreaterEqual(blind["share"], E.BAR["within1_min"])
if __name__ == "__main__":
unittest.main()
+4
View File
@@ -54,6 +54,10 @@ class PhraseTest(unittest.TestCase):
self.assertEqual(season.phrase_for([11, 12, 1, 2, 3]), "November to March")
self.assertEqual(season.phrase_for([4, 5, 9, 10]),
"April to May and September to October")
self.assertEqual(season.phrase_for([3, 4, 5, 10, 11]),
"March to May and October to November")
self.assertEqual(season.phrase_for([11, 12, 1, 2, 6, 7, 8]),
"November to February and June to August")
self.assertEqual(season.phrase_for([7]), "July")
self.assertEqual(season.phrase_for(list(range(1, 13))), "All year")