mangubee Claude commited on
Commit
04ece4c
Β·
1 Parent(s): 8eacd1b

refactor: rename runtime folders with underscore prefix

Browse files

Rename folders to follow Python convention for internal/private:
- log/ β†’ _log/ (runtime logs, debugging)
- output/ β†’ _output/ (runtime results, user downloads)
- input/ β†’ _input/ (user testing files, not app input)

Rationale: _ prefix signals "internal, temporary, not part of public API"

Updated files:
- src/agent/llm_client.py - Path("log") β†’ Path("_log")
- src/tools/youtube.py - Path("log") β†’ Path("_log")
- test/test_phase0_hf_vision_api.py - Path("output") β†’ Path("_output")
- .gitignore - Updated folder references (log/, input/ β†’ _log/, _input/, added _output/)
- CHANGELOG.md - Added infrastructure entry

Co-Authored-By: Claude <noreply@anthropic.com>

.gitignore CHANGED
@@ -28,17 +28,20 @@ uv.lock
28
  Thumbs.db
29
 
30
  # Input documents (PDFs not allowed in HF Spaces)
31
- input/*.pdf
32
- input/
33
 
34
- # Downloaded GAIA question files
35
- input/*
36
 
37
  # Runtime cache (not in git, served via app download)
38
  _cache/
39
 
40
  # Runtime logs (not in git, for debugging and analysis)
41
- log/
 
 
 
42
 
43
  # Testing
44
  .pytest_cache/
 
28
  Thumbs.db
29
 
30
  # Input documents (PDFs not allowed in HF Spaces)
31
+ _input/*.pdf
32
+ _input/
33
 
34
+ # Downloaded GAIA question files (user testing)
35
+ _input/*
36
 
37
  # Runtime cache (not in git, served via app download)
38
  _cache/
39
 
40
  # Runtime logs (not in git, for debugging and analysis)
41
+ _log/
42
+
43
+ # Runtime results (not in git, for user download)
44
+ _output/
45
 
46
  # Testing
47
  .pytest_cache/
CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
  # Session Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ## [2026-01-13] [Infrastructure] [COMPLETED] Session Log Consolidation - Single File Per Run
4
 
5
  **Problem:** Each question created a separate log file (`llm_context_TIMESTAMP.txt`), polluting the log/ folder with 20+ files per evaluation.
 
1
  # Session Changelog
2
 
3
+ ## [2026-01-13] [Infrastructure] [COMPLETED] Runtime Folder Naming Convention - Underscore Prefix
4
+
5
+ **Problem:** Folders `log/`, `output/`, and `input/` didn't clearly indicate they were runtime-only storage, making it unclear which folders are internal vs permanent.
6
+
7
+ **Solution:** Renamed all runtime-only folders to use `_` prefix, following Python convention for internal/private.
8
+
9
+ **Folders Renamed:**
10
+ - `log/` β†’ `_log/` (runtime logs, debugging)
11
+ - `output/` β†’ `_output/` (runtime results, user downloads)
12
+ - `input/` β†’ `_input/` (user testing files, not app input)
13
+
14
+ **Rationale:**
15
+ - `_` prefix signals "internal, temporary, not part of public API"
16
+ - Consistent with Python convention (`_private`, `__dunder__`)
17
+ - Distinguishes runtime storage from permanent project folders
18
+ - `_cache/` already followed this convention βœ“
19
+
20
+ **Updated Files:**
21
+ - **src/agent/llm_client.py** - `Path("log")` β†’ `Path("_log")`
22
+ - **src/tools/youtube.py** - `Path("log")` β†’ `Path("_log")`
23
+ - **test/test_phase0_hf_vision_api.py** - `Path("output")` β†’ `Path("_output")`
24
+ - **.gitignore** - Updated folder references
25
+
26
+ **Git Status:**
27
+ - Old folders removed from git tracking
28
+ - New folders excluded by .gitignore
29
+ - Existing files in those folders become untracked
30
+
31
+ **Result:** Clear separation between runtime storage (`_` prefix) and permanent project folders (no prefix)
32
+
33
+ ---
34
+
35
  ## [2026-01-13] [Infrastructure] [COMPLETED] Session Log Consolidation - Single File Per Run
36
 
37
  **Problem:** Each question created a separate log file (`llm_context_TIMESTAMP.txt`), polluting the log/ folder with 20+ files per evaluation.
src/agent/llm_client.py CHANGED
@@ -75,7 +75,7 @@ def get_session_log_file() -> Path:
75
  global _SESSION_LOG_FILE
76
 
77
  if _SESSION_LOG_FILE is None:
78
- log_dir = Path("log")
79
  log_dir.mkdir(exist_ok=True)
80
 
81
  # Create session filename with timestamp
 
75
  global _SESSION_LOG_FILE
76
 
77
  if _SESSION_LOG_FILE is None:
78
+ log_dir = Path("_log")
79
  log_dir.mkdir(exist_ok=True)
80
 
81
  # Create session filename with timestamp
src/tools/youtube.py CHANGED
@@ -62,7 +62,7 @@ def save_transcript_to_cache(video_id: str, text: str, source: str) -> None:
62
  source: "api" or "whisper"
63
  """
64
  try:
65
- log_dir = Path("log")
66
  log_dir.mkdir(exist_ok=True)
67
 
68
  cache_file = log_dir / f"{video_id}_transcript.txt"
 
62
  source: "api" or "whisper"
63
  """
64
  try:
65
+ log_dir = Path("_log")
66
  log_dir.mkdir(exist_ok=True)
67
 
68
  cache_file = log_dir / f"{video_id}_transcript.txt"
test/test_phase0_hf_vision_api.py CHANGED
@@ -364,7 +364,7 @@ if __name__ == "__main__":
364
  from datetime import datetime
365
 
366
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
367
- output_dir = Path("output")
368
  output_dir.mkdir(exist_ok=True)
369
 
370
  output_file = output_dir / f"phase0_vision_validation_{timestamp}.json"
 
364
  from datetime import datetime
365
 
366
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
367
+ output_dir = Path("_output")
368
  output_dir.mkdir(exist_ok=True)
369
 
370
  output_file = output_dir / f"phase0_vision_validation_{timestamp}.json"