Sort the scorer's imports and end its message as a citation reads
This commit is contained in:
@@ -7,15 +7,15 @@ import ast
|
||||
import dataclasses
|
||||
import decimal
|
||||
|
||||
from failure import Failure
|
||||
from plan import ranking
|
||||
from plan.blockers import blockers_first
|
||||
from plan.formula import parse_formula
|
||||
from plan.goals_file import goal_weights, Mark, numbered, ranked_goals
|
||||
from plan.todo_table import CODE_HEALTH, EPIC_GOAL, Item, REPO_GOAL, SHAPE
|
||||
from failure import Failure
|
||||
from plan.goals_file import goal_weights, Mark, numbered, ranked_goals
|
||||
from review_rules.comprehension_history import latest_overall
|
||||
from plan.formula import parse_formula
|
||||
from plan import ranking
|
||||
|
||||
MARK_IT = "is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says"
|
||||
MARK_IT = "is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says, so the epic's items can be scored"
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
|
||||
@@ -91,9 +91,9 @@ class RankedTest(unittest.TestCase):
|
||||
|
||||
def test_a_goal_marked_neither_way_fails_naming_whose_it_is(self) -> None:
|
||||
unmarked = RepoPremises("## Goals\n\n1. Fast builds.\n", "", "", decimal.Decimal("7.0"))
|
||||
self.assertEqual(order([item(4, "epic 1 by 5")], {"billing-api": unmarked}), Failure("billing-api's goal 1 is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says"))
|
||||
self.assertEqual(order([item(4, "epic 1 by 5")], {"billing-api": unmarked}), Failure("billing-api's goal 1 is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says, so the epic's items can be scored"))
|
||||
found = ranked([item(4, "epic 1 by 5", repo=None)], "V", "1. Ship invoices.\n", {})
|
||||
self.assertEqual(found, Failure("the epic's goal 1 is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says"))
|
||||
self.assertEqual(found, Failure("the epic's goal 1 is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says, so the epic's items can be scored"))
|
||||
|
||||
def test_a_repos_goals_file_that_cannot_be_read_fails_naming_the_repo(self) -> None:
|
||||
self.assertEqual(order([item(4, "epic 1 by 5")], {"billing-api": RepoPremises("# Billing\n", "", "", decimal.Decimal("7.0"))}), Failure("billing-api: the goals file has no ## Goals heading"))
|
||||
|
||||
Reference in New Issue
Block a user