Answer principles round 1: 2 🔴, 9 🟡 (0 misread); explicit record versions in place of the Confluence store's hidden state, the routing ruling filed as item 393 for 0.12.0, rule-hook catching heavy runs through uv, poetry, sudo and doas, one unreleased heading, one owner of the no-item message, typed Jira issues, a turn that gives its failure as a value, outcome tests for the Atlassian client, an Emptied reason type, an injected clock and git in touch-predictions, and paired record names
This commit is contained in:
@@ -70,9 +70,9 @@ def performed(config: ProjectConfig, command: str, name: str, home: pathlib.Path
|
||||
|
||||
|
||||
def opened(config: ProjectConfig, name: str, home: pathlib.Path) -> tuple[RecordStore, pathlib.Path]:
|
||||
"""The store of the record called name, and the copy it gets where it isn't kept as a file. A store that keeps the version it read, for a later save, keeps it beside the copy."""
|
||||
"""The store of the record called name, and the copy it gets where it isn't kept as a file. `local_file` keeps the version beside the copy, for a later save."""
|
||||
copy = home / COPIES / config.key / worktree_folder(config.top) / f"{name}.md"
|
||||
return (goals_store(config) if name == GOALS else store(config, name, copy.with_suffix(".version"))), copy
|
||||
return (goals_store(config) if name == GOALS else store(config, name)), copy
|
||||
|
||||
|
||||
def worktree_folder(top: pathlib.Path) -> str:
|
||||
|
||||
@@ -25,13 +25,12 @@ def worktree_config(top: str, **kept: Page) -> ProjectConfig:
|
||||
|
||||
|
||||
class Opened(unittest.TestCase):
|
||||
def test_a_record_on_a_confluence_page_keeps_the_version_it_read_beside_its_copy(self):
|
||||
def test_a_record_on_a_confluence_page_gets_a_copy_in_a_folder_of_its_worktree(self):
|
||||
page = Page("https://acme.atlassian.net", "2293761", "confluence:https://acme.atlassian.net/wiki/spaces/ENG/pages/2293761")
|
||||
record, copy = main.opened(worktree_config("/code/acme", decisions=page), "decisions", pathlib.Path("/home/me"))
|
||||
self.assertEqual((copy.parent.parent, copy.name), (COPIES, "decisions.md"))
|
||||
self.assertRegex(copy.parent.name, r"^acme-[0-9a-f]{8}$")
|
||||
assert isinstance(record, ConfluencePage), record
|
||||
self.assertEqual(record.kept, copy.with_suffix(".version"))
|
||||
self.assertIsInstance(record, ConfluencePage)
|
||||
|
||||
def test_the_goals_file_opens_through_the_goals_store(self):
|
||||
record, copy = main.opened(worktree_config("/code/acme"), "goals-and-audience", pathlib.Path("/home/me"))
|
||||
|
||||
Reference in New Issue
Block a user