Conversation
Add two new exception classes: - TaskConfigurationError(TaskWarriorError): environment/config errors (binary not found, taskrc file missing or unreadable) - TaskOperationError(TaskWarriorError): write operation failures on existing tasks (delete, purge, done, start, stop, annotate) Export all 6 exceptions from __init__.py (they were not public before) Semantic fixes: - TaskValidationError → TaskConfigurationError for 'binary not found' - TaskValidationError → TaskWarriorError for JSON parse errors on CLI responses - TaskNotFound → TaskOperationError for delete/purge/done/start/stop/annotate - TaskNotFound → TaskWarriorError for JSON errors in get_recurring_instances - TaskWarriorError → TaskNotFound when get_task returns nonzero returncode - TaskValidationError → TaskWarriorError in modify_task (generic CLI failure) - TaskWarriorError → TaskValidationError in ContextService._validate_name - TaskWarriorError → TaskConfigurationError in UdaRegistry for missing taskrc - RuntimeError → TaskWarriorError in add_task fallback path Missing coverage added: - OSError/SubprocessError wrapped in TaskWarriorError in run_task_command - try/except json.JSONDecodeError added in get_recurring_task (only method missing it) - FileNotFoundError/PermissionError/OSError handled in ConfigStore._extract_taskrc_config - Double ValueError fixed in parse_taskwarrior_date (fallback could raise uncaught) Update Raises: docstrings in main.py to reflect new exception types. Update tests to match new exception behaviors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- pyproject.toml: 1.1.2rc1 → 1.2.0 - CHANGELOG: add [1.2.0] entry covering exception refactor and sync infra - README: update version line (v1.1.1 → v1.2.0), test count (132 → 164), pip install command, remove outdated sync notice, add Exceptions section with table and import examples - PYPI_README: update test count and add exception hierarchy to features list - RELEASE_NOTES: replace 1.0.0 notes with 1.2.0 release notes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the taskchampion-py-based SyncLocal backend with a direct call to
the TaskWarrior CLI's built-in 'task sync' command.
Removed:
- taskchampion-py dependency from pyproject.toml
- src/taskwarrior/sync_backends/ (sync_local.py, sync_protocol.py, factory.py)
- champion.py (exploratory root-level script)
- tests: test_sync_local, test_sync_factory, test_sync_integration,
test_sync_disabled_facade (all taskchampion-specific)
Changed:
- TaskWarriorAdapter: _sync field replaced by _sync_configured bool;
synchronize() runs run_task_command(['sync']), raises TaskSyncError
if not configured or if task sync exits non-zero
- TaskWarrior (façade): synchronize() now calls self.adapter.synchronize()
and is no longer a no-op; docstring updated
- CHANGELOG: 1.2.0 entry updated (sync section rewritten)
- README: sync table updated, temporary notice removed
Added:
- tests/unit/test_adapter_sync.py — 9 tests covering is_sync_configured()
and synchronize() (not-configured, success, stderr/stdout errors)
- test_main_sync.py rewritten: delegates to adapter, propagates TaskSyncError
164 tests passing.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Removed verbose taskchampion removal narrative from CHANGELOG - Removed outdated 1.1.2rc1 RC entry (superseded by 1.2.0) - Consolidated exception and sync changes for clarity - Updated RELEASE_NOTES to emphasize sync now works (not 'temporarily disabled') - All 164 tests passing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Delete TaskWarrior.task_cmd and TaskWarrior.taskrc_file storage (lines 92-93) - These values already exist in TaskWarriorAdapter and ConfigStore (single source of truth) - Update get_info() to delegate to adapter.task_cmd and config_store.taskrc_path - Add public taskrc_path property to ConfigStore for clean access - All 164 tests pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ow returns current_context and current_context_details (name, read_filter, write_filter, active)\n- Safe fallback when context lookup fails\n- Added unit tests: tests/unit/test_get_info_context.py\n\nAll tests passing (166 total)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>,
Include current_context and current_context_details in get_info output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add unit tests verifying that TaskWarrior.get_tasks applies the active context read_filter when present.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Annotate local variables in TaskWarrior.get_info as dict[str, Any] to avoid mypy inference errors.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add CHANGELOG entry explaining that get_tasks combines active context read_filter with user filter.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add release note describing that get_tasks now combines active context read_filter with user filter.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.