Group bin's root modules into packages named by purpose, and make rank_todo.py a launcher of release_plan/ranking.py
This commit is contained in:
@@ -3,7 +3,7 @@ import pathlib
|
||||
import typing
|
||||
|
||||
from claude_code.transcript import first_timestamped_line
|
||||
from project_key import project_key
|
||||
from transcript_archive.project_key import project_key
|
||||
|
||||
# What an outcomes file's name ends with, in place of its transcript copy's .jsonl.
|
||||
FILE_SUFFIX = ".outcomes.md"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import re
|
||||
|
||||
from markdown_text import quoted
|
||||
from utc_stamp import STAMPED
|
||||
from records.markdown_text import quoted
|
||||
from records.utc_stamp import STAMPED
|
||||
from model_routing.route import WorkerLine
|
||||
|
||||
TASK = "Task: "
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import pathlib
|
||||
|
||||
|
||||
def project_key(checkout_root: str, home: pathlib.Path) -> str:
|
||||
"""The checkout's path relative to ~/code, or to / outside it: what names a project's loop-claude session, its entry in the models file and its archive folder."""
|
||||
return checkout_root.removeprefix(f"{home / 'code'}/").lstrip("/")
|
||||
|
||||
|
||||
def checkout_of(key: str, home: pathlib.Path) -> str:
|
||||
"""The checkout a project key names: under ~/code where that folder exists, else under /."""
|
||||
under_code = home / "code" / key
|
||||
return str(under_code) if under_code.is_dir() else f"/{key}"
|
||||
@@ -8,11 +8,11 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from project_key import checkout_of, project_key
|
||||
from transcript_archive.project_key import checkout_of, project_key
|
||||
from failure import Failure
|
||||
from transcript_archive import outcomes, read, write
|
||||
from transcript_archive.location import project_archive
|
||||
from utc_stamp import utc
|
||||
from records.utc_stamp import utc
|
||||
|
||||
NOW = 1790000000
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import typing
|
||||
|
||||
from transcript_archive.location import chunk_folder, outcomes_of
|
||||
from failure import Failure
|
||||
from file_writes import make_private, replace_file
|
||||
from records.file_writes import make_private, replace_file
|
||||
from claude_code.session import session_files
|
||||
from transcript_archive.outcomes import TASK
|
||||
from utc_stamp import utc
|
||||
from records.utc_stamp import utc
|
||||
|
||||
|
||||
def archive(project_archive: pathlib.Path, path: str, task: str, outcome: str, at: float, note: typing.Callable[[str], None] = lambda text: None) -> Failure | None:
|
||||
|
||||
Reference in New Issue
Block a user