Hw2 Final Submission#4
Open
faithvillarr wants to merge 5 commits into
Open
Conversation
* feat:fixed e2e tests * fix: changing main to work for two api scopes
8ac88cc to
a3573f9
Compare
update docs
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.
Pull Request
Summary
What problem is being solved?
This PR introduces a complete Google Tasks integration system, mirroring the existing Gmail system architecture. The system enables applications to interact with Google Tasks API through a clean, abstracted interface that decouples business logic from Google-specific implementation details. This provides:
Why now? Any user-visible impact?
This addition completes the dual-system architecture (Gmail + Google Tasks) that was planned in the project design. The Google Tasks system follows the exact same architectural patterns as the Gmail system, ensuring consistency and maintainability.
User-visible impact:
test_gtask.pyscript for demonstrating Google Tasks functionalityhttp://127.0.0.1:8001for task operationsTASKS_CLIENT_ID,TASKS_CLIENT_SECRET,TASKS_REFRESH_TOKENRelated Issues
Change Type
Impacted Areas
mail_client_apigmail_client_impltask_client_api(new)gtask_client_impl(new)task_client_adapter(new)task_client_service(new)task_client_service_client(new)Testing
Commands executed
Results
Test Coverage:
gtask_client_impl: 7 test files covering authentication, core methods, edge cases, and registrationtask_client_service: 8 test files covering all REST endpointstask_client_adapter: Integration tests for adapter patterntests/gtask_integration/tests/e2e/test_main_task_application.py: Tests thetest_gtask.pydemo scripttest_task_service_e2e.py: Tests the FastAPI service end-to-endQuality Checklist
Details:
.envfile (never committed)Breaking Changes (skip if none)
N/A - This is a new feature addition. No breaking changes to existing functionality.
Notes for Reviewers
Architecture Overview
The Google Tasks system consists of 5 components, mirroring the Gmail system architecture:
task_client_api: Abstract base classes (Client,Task,TaskList) defining the contractgtask_client_impl: Google Tasks API implementation with OAuth2 authenticationtask_client_adapter: Adapter pattern for service integrationtask_client_service: FastAPI REST service (port 8001) with session-based authtask_client_service_client: Auto-generated service clientKey Implementation Details
Authentication:
TASKS_CLIENT_ID,TASKS_CLIENT_SECRET,TASKS_REFRESH_TOKENAPI Operations:
list_tasklists(),insert_tasklist(),delete_tasklist()list_tasks(),get_task(),insert_task(),delete_task()Testing Strategy:
@pytest.mark.e2e,@pytest.mark.integration,@pytest.mark.circleci,@pytest.mark.local_credentialsFiles to Review
Core Implementation:
src/gtask_client_impl/src/gtask_client_impl/gtask_impl.py- Main client implementationsrc/gtask_client_impl/src/gtask_client_impl/auth.py- OAuth2 authentication managersrc/gtask_client_impl/src/gtask_client_impl/task_impl.py- Task abstraction implementationsrc/gtask_client_impl/src/gtask_client_impl/tasklist_impl.py- TaskList abstraction implementationService Layer:
src/task_client_service/src/task_client_service/fast_api_service.py- FastAPI servicesrc/task_client_service/src/task_client_service/routers/- REST endpoint routersTests:
tests/e2e/test_main_task_application.py- E2E tests for demo scripttests/e2e/test_task_service_e2e.py- E2E tests for FastAPI servicetests/gtask_integration/- Integration testsDocumentation:
src/gtask_client_impl/README.md- Comprehensive implementation guidesrc/task_client_api/README.md- API contract documentationsrc/task_client_service/README.md- Service documentationREADME.md- Updated with Google Tasks system overviewValidation Steps
Local Testing:
.envfile withTASKS_CLIENT_IDandTASKS_CLIENT_SECRETuv run python test_gtask.py(first run will open browser for OAuth, be sure to setinteractive=True).envinteractive=FalseService Testing:
uv run uvicorn task_client_service.fast_api_service:app --reload --port 8001http://127.0.0.1:8001/auth/loginto authenticatehttp://127.0.0.1:8001/docsTest Suite:
uv run pytest src/ tests/ -m "not local_credentials" -vfor CI-compatible testsuv run pytest -m e2efor end-to-end tests (requires credentials)Follow-ups / Future Work