Skip to content

Refactor: extract validation and path utilities to shared utils module#104

Open
lout33 wants to merge 1 commit into
ApexOpsStudio:mainfrom
lout33:main
Open

Refactor: extract validation and path utilities to shared utils module#104
lout33 wants to merge 1 commit into
ApexOpsStudio:mainfrom
lout33:main

Conversation

@lout33
Copy link
Copy Markdown

@lout33 lout33 commented May 16, 2026

Summary

Refactor scattered validation and path utilities into shared utils/ module.

Changes

  • Create utils/validation.py with shared validate_description, validate_task_id, validate_task_file
  • Create utils/paths.py with shared get_tasks_file and get_config_path
  • Remove duplicated get_tasks_file and validation logic from add.py, list.py, done.py
  • Update commands to import from utils modules
  • Update tests to cover utils modules and verify refactoring

Testing

pytest test_task.py -v
# 6 passed

Closes #3

- Create utils/validation.py with shared validate_description, validate_task_id, validate_task_file
- Create utils/paths.py with shared get_tasks_file and get_config_path
- Remove duplicated get_tasks_file and validation logic from add.py, list.py, done.py
- Update commands to import from utils modules
- Update tests to cover utils modules and verify refactoring

Closes ApexOpsStudio#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Extract validation to utils module

1 participant