Skip to content

Commit

Permalink
Spec cleanup
Browse files Browse the repository at this point in the history
  * Add title to credentials
  * Add text about where to get spreadsheet ID to spreadsheet_id
  * Add an example of spreadsheet id
  • Loading branch information
grishick committed Mar 18, 2022
1 parent c6524b2 commit f1805ae
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
"spreadsheet_id": {
"type": "string",
"title": "Spreadsheet ID",
"description": "The ID of the spreadsheet to be replicated."
"description": "The ID of the spreadsheet to be replicated. The ID is found in the URL of your spreadsheet, typically between \"/d/\" and \"/edit\"",
"examples": ["1hLd9Qqti5XyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb"]
},
"credentials": {
"type": "object",
"title": "Credentials",
"description": "Google API Credentials for connecting to Google Sheets and Google Drive APIs",
"oneOf": [
{
"title": "Authenticate via Google (OAuth)",
Expand Down

1 comment on commit f1805ae

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Google Sheets(#11270)

Measures

Name Value Name Value Name Value
Duplicated Lines (%) 0.0 Quality Gate Status OK Code Smells 27
Reliability Rating A Coverage 61.5 Security Rating A
Vulnerabilities 0 Bugs 0 Duplicated Blocks 0
Lines to Cover 299 Lines of Code 338 Blocker Issues 0
Critical Issues 1 Major Issues 5 Minor Issues 21

Detected Issues

Rule File Description Message
python:mypy_union_attr (MINOR) google_sheets_source/helpers.py:160 Check that attribute exists in each item of a union Item "None" of "Optional[SheetProperties]" has no attribute "title" . Code line: return {sheet.properties.title: sheet.properties.gridPropertie...
python:mypy_misc (MINOR) google_sheets_source/helpers.py:160 Miscellaneous other checks Key expression in dictionary comprehension has incompatible type "Union[str, None, Any]"; expected type "str" . Code line: return {sheet.properties.title: sheet.properties.gridPropertie...
python:mypy_union_attr (MINOR) google_sheets_source/helpers.py:160 Check that attribute exists in each item of a union Item "SheetProperties" of "Optional[SheetProperties]" has no attribute "gridProperties" . Code line: return {sheet.properties.title: sheet.properties.gridPropertie...
python:mypy_union_attr (MINOR) google_sheets_source/helpers.py:160 Check that attribute exists in each item of a union Item "None" of "Optional[SheetProperties]" has no attribute "gridProperties" . Code line: return {sheet.properties.title: sheet.properties.gridPropertie...
python:mypy_syntax (MINOR) google_sheets_source/helpers.py:62 Report syntax errors Syntax error in type annotation . Code line: ...and_duplicates(header_row_values: List[str]) -> (List[str], List[str])...
python:S3776 (CRITICAL) google_sheets_source/google_sheets_source.py:121 Cognitive Complexity of functions should not be too high Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
python:mypy_import (MINOR) google_sheets_source/client.py:10 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.7) . Code line: from requests import codes as status_codes
python:mypy_import (MINOR) google_sheets_source/google_sheets_source.py:20 Require that imported module can be found or has stubs Library stubs not installed for "requests.status_codes" (or incompatible with Python 3.7) . Code line: from requests.status_codes import codes as status_codes
python:mypy_valid_type (MINOR) google_sheets_source/google_sheets_source.py:38 Check that type (annotation) is valid Module "json" is not valid as a type . Code line: ... def check(self, logger: AirbyteLogger, config: json) -> AirbyteConne...
python:mypy_valid_type (MINOR) google_sheets_source/google_sheets_source.py:95 Check that type (annotation) is valid Module "json" is not valid as a type . Code line: ...ef discover(self, logger: AirbyteLogger, config: json) -> AirbyteCatal...
python:mypy_valid_type (MINOR) google_sheets_source/google_sheets_source.py:122 Check that type (annotation) is valid Module "json" is not valid as a type . Code line: self, logger: AirbyteLogger, config: json, catalog: Configured...
python:mypy_valid_type (MINOR) google_sheets_source/google_sheets_source.py:122 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...config: json, catalog: ConfiguredAirbyteCatalog, state: Dict[str, any]
python:mypy_index (MINOR) google_sheets_source/google_sheets_source.py:45 Check indexing operations Value of type json? is not indexable . Code line: spreadsheet_id = config["spreadsheet_id"]
python:mypy_index (MINOR) google_sheets_source/google_sheets_source.py:97 Check indexing operations Value of type json? is not indexable . Code line: spreadsheet_id = config["spreadsheet_id"]
python:S112 (MAJOR) google_sheets_source/google_sheets_source.py:119 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_index (MINOR) google_sheets_source/google_sheets_source.py:127 Check indexing operations Value of type json? is not indexable . Code line: spreadsheet_id = config["spreadsheet_id"]
python:S5806 (MAJOR) google_sheets_source/google_sheets_source.py:143 Builtins should not be shadowed by local variables Rename this variable; it shadows a builtin.
python:mypy_misc (MINOR) google_sheets_source/helpers.py:86 Miscellaneous other checks List comprehension has incompatible type List[Union[str, None, Any]]; expected List[str] . Code line: return [value.formattedValue for value in row_data.values]
python:mypy_union_attr (MINOR) google_sheets_source/helpers.py:86 Check that attribute exists in each item of a union Item "None" of "Optional[List[CellData]]" has no attribute "iter" (not iterable) . Code line: return [value.formattedValue for value in row_data.values]
python:S112 (MAJOR) google_sheets_source/helpers.py:95 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_arg_type (MINOR) google_sheets_source/helpers.py:98 Check argument types in calls Argument 1 to "len" has incompatible type "Optional[List[GridData]]"; expected "Sized" . Code line: if len(range_data) != 1:
python:S112 (MAJOR) google_sheets_source/helpers.py:99 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_index (MINOR) google_sheets_source/helpers.py:101 Check indexing operations Value of type "Optional[List[GridData]]" is not indexable . Code line: all_row_data = range_data[0].rowData
python:S112 (MAJOR) google_sheets_source/helpers.py:103 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_var_annotated (MINOR) google_sheets_source/helpers.py:138 Require variable annotation if type can't be inferred Need type annotation for "available_sheets_to_column_index_to_name" . Code line: available_sheets_to_column_index_to_name = defaultdict(dict)
python:mypy_union_attr (MINOR) google_sheets_source/helpers.py:153 Check that attribute exists in each item of a union Item "None" of "Optional[SheetProperties]" has no attribute "title" . Code line: return [sheet.properties.title for sheet in spreadsheet_metada...
python:mypy_misc (MINOR) google_sheets_source/helpers.py:153 Miscellaneous other checks List comprehension has incompatible type List[Union[str, None, Any]]; expected List[str] . Code line: return [sheet.properties.title for sheet in spreadsheet_metada...

Coverage (61.5%)

File Coverage File Coverage
google_sheets_source/init.py 100.0 google_sheets_source/client.py 72.2
google_sheets_source/google_sheets_source.py 17.6 google_sheets_source/helpers.py 79.8
google_sheets_source/models/init.py 100.0 google_sheets_source/models/spreadsheet.py 100.0
google_sheets_source/models/spreadsheet_values.py 100.0

Please sign in to comment.