Skip to content

Sub-Issue 4: Update Path Resolution to Use vault_location #110

@leppikallio

Description

@leppikallio

Parent Issue: #84
Estimated Time: ~35 minutes
Phase: 3 (Parallel with Sub-Issue 3)

Goal

Add resolve_path() method to Config and update all path users to support vault_location-based resolution.

Files

  • Modify: .workspace/scripts/models/config.py (add resolve_path method)
  • Modify: .workspace/scripts/process_queue.py:63-64
  • Modify: .workspace/scripts/process_note.py:630
  • Modify: .workspace/scripts/attachment_migrator.py:261
  • Modify: .workspace/scripts/export_notes_urls.py:295
  • Modify: .workspace/scripts/batch_process_queue.py:40-45
  • Test: .workspace/tests/test_path_resolution.py (new file)

Dependencies

Requires: Sub-Issues 1 & 2 completed
Phase: Phase 3 (parallel with Sub-Issue 3)

Implementation Steps

See full implementation steps in issue #84 under "Sub-Issue 4: Update Path Resolution to Use vault_location"

Summary

  1. Write failing tests for resolve_path() (5 tests)
  2. Implement resolve_path() method in Config
  3. Update 6 scripts to use resolve_path
  4. Test updated scripts
  5. Run type checker
  6. Commit changes
  7. Verify no regressions
  8. Close this sub-issue

Key Requirements

  • All relative paths resolve from vault_location (not cwd)
  • Absolute paths returned unchanged
  • Falls back to cwd if vault_location is None
  • Update 6+ scripts to use resolve_path()

Acceptance Criteria

  • resolve_path() method added to Config
  • Works with vault_location set
  • Works without vault_location (uses cwd)
  • Handles nested paths correctly
  • Returns absolute paths unchanged
  • All 6 scripts updated to use resolve_path
  • All scripts import successfully
  • All tests pass
  • Type checking passes

Testing Commands

uv run pytest .workspace/tests/test_path_resolution.py -v
uv run python -c "from workspace.scripts.process_queue import main; print('✓ process_queue imports')"
uv run pyright .workspace/scripts/models/config.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions