Skip to content

refactor: extract validation and path helpers to utils module#76

Open
nguyenquockhang1610 wants to merge 1 commit into
ApexOpsStudio:mainfrom
nguyenquockhang1610:refactor/extract-utils
Open

refactor: extract validation and path helpers to utils module#76
nguyenquockhang1610 wants to merge 1 commit into
ApexOpsStudio:mainfrom
nguyenquockhang1610:refactor/extract-utils

Conversation

@nguyenquockhang1610
Copy link
Copy Markdown

Summary

Extracts scattered validation logic and path helpers into shared utils/ module (#3).

Changes

  • utils/validation.pyvalidate_description(), validate_task_id(), validate_task_file()
  • utils/paths.pyget_tasks_file()
  • utils/__init__.py — package init
  • Updated commands/add.py, commands/list.py, commands/done.py to import from shared utils
  • Updated test_task.py to import from new locations + added tests for validate_task_file and get_tasks_file

Verification

  • Pure refactor, no behavior changes
  • All 5 tests pass
  • No duplicate validation code remains in command files

Closes #3

- Create utils/validation.py with validate_description,
  validate_task_id, validate_task_file
- Create utils/paths.py with get_tasks_file
- Update commands/add.py, commands/list.py, commands/done.py to
  import from shared utils
- Update tests to import from new locations
- No behavior changes, all tests pass

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