Add Google Forms API integration for questionnaire import (closes #36)#126
Open
antuansabe wants to merge 1 commit intoharmonydata:mainfrom
Open
Add Google Forms API integration for questionnaire import (closes #36)#126antuansabe wants to merge 1 commit intoharmonydata:mainfrom
antuansabe wants to merge 1 commit intoharmonydata:mainfrom
Conversation
…monydata#36) Implements complete Google Forms API integration allowing users to import questionnaires directly from Google Forms URLs using simple API key authentication. Features: - URL and form ID parsing with regex pattern matching - Google Forms API v1 integration using google-api-python-client - Support for multiple question types: multiple choice, checkboxes, dropdown, linear scale, text questions, and grid questions - Automatic language detection using langdetect - Comprehensive metadata extraction (form_id, title, description) - Complete test suite with mock data for testing without API calls - Documentation in README.md with setup instructions and usage examples Technical details: - Authentication: API key via GOOGLE_FORMS_API_KEY environment variable - New FileType: google_forms enum value - Parser pattern: convert_google_forms_to_instruments(file: RawFile) -> List[Instrument] - Error handling for HttpError (403, 404, 429) and invalid inputs Files added: - src/harmony/parsing/google_forms_parser.py (~350 lines) - tests/test_google_forms_parser.py (comprehensive test suite) Files modified: - requirements.txt: Added google-api-python-client>=2.147.0 - pyproject.toml: Added google-api-python-client dependency - src/harmony/schemas/enums/file_types.py: Added google_forms enum - src/harmony/parsing/wrapper_all_parsers.py: Added import and routing - README.md: Added Google Forms documentation section
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.
Implements complete Google Forms API integration allowing users to import questionnaires directly from Google Forms URLs using simple API key authentication.
Features:
Technical details:
Files added:
Files modified: