Skip to content

Homework #3 First Run#6

Open
gsiri-code wants to merge 3 commits into
hw2from
feat/aligning-ticket-api
Open

Homework #3 First Run#6
gsiri-code wants to merge 3 commits into
hw2from
feat/aligning-ticket-api

Conversation

@gsiri-code

Copy link
Copy Markdown
Owner

Pull Request

Summary

  • What problem is being solved?
    Adapts gtask_impl to be called with tickets_api, using tickets_client_impl as an adapter ensuring seamless interaction between gtask_impl and tickets_api.

  • Why now? Any user-visible impact?
    We need to ensure that gtask_impl works seamlessly with tickets_api. Therefore users can call methods or attributes defined in ticekts_api's classes, and call upon the intended implementation of google tasks.

Related Issues

  • Closes # (if applicable)

  • Relates to # (if applicable)

Change Type

  • 🐛 Bug fix
  • ✨ Feature / enhancement
  • 💥 Breaking change
  • 📚 Documentation
  • 🔧 Refactor / cleanup
  • ⚡ Performance
  • 🧪 Test improvement
  • 🔨 Build / tooling

Impacted Areas

  • mail_client_api
  • gmail_client_impl
  • Documentation
  • Tests
  • Tooling / CI
  • Other (describe in summary): Added new tickets_api and tickets_client_impl packages, updated MkDocs configuration

Testing

Commands executed

Disclaimer ‼️
User must authorize their google credentials following directions in gtask_impl

uv run pytest src/tickets_client_impl/tests/

Results

  • Tests pass
  • Type checks clean
  • Linting clean
  • Manual verification (if applicable)

Quality Checklist

  • Contract boundaries respected; abstractions unchanged unless noted
  • Backward compatibility confirmed or migration documented
  • Security / secrets handled correctly
  • Performance impact acceptable
  • Docs updated for user-facing changes

Breaking Changes (skip if none)

N/A - This is a new feature addition with no breaking changes to existing code.

Notes for Reviewers

Key Implementation Details:

  1. Status Mapping Strategy: The implementation uses a clever mapping where:

    • OPEN tickets map to tasks with status "needsAction" and no prefix
    • IN_PROGRESS tickets map to tasks with status "needsAction" and title prefix "(IP) "
    • CLOSED tickets map to tasks with status "completed" (prefix removed if present)
  2. Update Behavior: Since Google Tasks doesn't support direct updates, update_ticket() uses a delete-and-recreate pattern. This means the underlying task ID changes, but the ticket interface maintains the original ID for the caller.

  3. Tasklist Strategy: The implementation uses the first available tasklist from list_tasklists() and caches it for all operations.

  4. Test Coverage: Comprehensive test suite includes:

    • Status mapping edge cases (spaces, unicode, empty titles, prefix variations)
    • All TicketInterface methods (create, get, search, update, delete)
    • Error handling and edge cases
  5. Documentation: Added MkDocs configuration and library documentation pages for all components, including the new tickets libraries.

Follow-ups:

  • Consider adding support for custom tasklist selection in future iterations
  • The assignee field is currently always None since Google Tasks doesn't support assignees

@gsiri-code gsiri-code changed the base branch from root to hw2 December 9, 2025 00:15
@faithvillarr faithvillarr force-pushed the feat/aligning-ticket-api branch from e616114 to 50f7686 Compare December 9, 2025 01:13
refactor: use ruff for simple lint fixes

feat: add official oss-api tickets_api

config: add dependencies tickets_api and tickets_client_impl

feat: add demonstration file to tickets_client_impl

fix: logging syntax

fix: remove all export from tickets_impl

fix: update logging of main main tickets client impl

docs: update documentation of tickets_impl

docs: add mkdocs config and mkdocs support for libraries and existing
documentation

fix: libraries md formating

lint: resolve ruff and mypy
@faithvillarr faithvillarr force-pushed the feat/aligning-ticket-api branch from 50f7686 to 6359dc5 Compare December 9, 2025 01:35
Remedied mistake in main.py and test_gtask.py causing issues in testing. Two other tests were impacted temporarily.
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.

2 participants