Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s

This commit is contained in:
2026-12-03 18:56:28 +01:00
parent 20c83f861f
commit 1ca2c8efe0
142 changed files with 1095 additions and 933 deletions
+4 -2
View File
@@ -6,7 +6,7 @@ import tempfile
import typing
from do_epic.repo_pick import CLAUDE_LABEL, HUMAN_LABEL
from loop_state.paths import CONFIG_FOLDER
from loop_state.paths import config_folder, without_xdg_folders
from project_config.settings import Epic, Finish
from do_epic import epic_record, findings, finish
from record_store.jira_description import EpicDescription
@@ -56,7 +56,9 @@ class Machine:
def machine_made(home: pathlib.Path, sandbox: Sandbox, launcher: pathlib.Path, env: typing.Mapping[str, str]) -> Machine | Failure:
folder = home / CONFIG_FOLDER / "do-epic"
# So that do-epic keeps its config and state under home.
env = without_xdg_folders(env)
folder = config_folder(env, home) / "do-epic"
folder.mkdir(parents=True)
ladder = read_ladder(SHIPPED)
if isinstance(ladder, Failure):
+1 -1
View File
@@ -254,7 +254,7 @@ class MachineTest(unittest.TestCase):
machine = scenario.machine_made(home, self.sandbox, pathlib.Path("do-epic"), {"A": "b"})
assert not isinstance(machine, Failure), machine
self.assertEqual((machine.home, machine.launcher, machine.env), (home, pathlib.Path("do-epic"), {"A": "b"}))
config = load(home)
config = load(home, {})
assert not isinstance(config, Failure), config
self.assertEqual((config.jira_url, config.env_file, config.repo_rule), ("https://acme.atlassian.net", self.env_file, scenario.RULE))
self.assertEqual((config.finish.transition, config.finish.status) if config.finish else None, ("Done", "Done"))