-
Notifications
You must be signed in to change notification settings - Fork 10
Reads gdocs and adds fault and falure codes to bugs #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
To enable Docs API: https://developers.google.com/docs/api/quickstart/python Wasn't very comfortable with the message while authenticating: |
|
These file names have changed I guess in previous PRs: Also these bugs have not been assigned any codes: |
ChrisTimperley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. This looks great. Just a few suggestions to improve the script. It would also help to add specific versions for the necessary dependencies to requirements.dev.txt.
|
On a side note: what is the distinction between requirements.dev.txt and requirements.txt? |
|
@ChrisTimperley please take a look now. |
| print(f"ERROR: Empty fields encountered for {row[COLUMN_BUG]} in 'ROBUST coding'") | ||
| yield [row[COLUMN_BUG], None, None] | ||
|
|
||
| def refactor_fault_failure(description: t.List[str], faults: t.List[str], failures: t.List[str], update: bool = True) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faults and failures should be t.Optional[t.List[str]].
| yield [row[COLUMN_BUG], None, None] | ||
|
|
||
| def refactor_fault_failure(description: t.List[str], faults: t.List[str], failures: t.List[str], update: bool = True) -> None: | ||
| if 'failure-codes' and 'fault-codes' in description and not update: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There need to be two separate in operations here (i.e., 'failure-codes' in description)
scripts/gdocs_reader.py
Outdated
| print(f"{err}") | ||
| return | ||
|
|
||
| faults_ = faults.upper().splitlines() if faults else faults |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faults_ has a type of t.Union[t.List[str], str] here. I think this should be:
fault_list: t.Optional[t.List[str]]
if not fault_cell:
fault_list = None
else:
fault_list = faults.upper().splitlines()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless faults can be None? In which case the type annotation for the method should be updated to faults: t.Optional[str].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faults can be None because here:
yield [row[COLUMN_BUG], None, None]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Let's use an t.Optional[str] type.
|
@ChrisTimperley ping |
was not the intention, the rebase worked locally but didn't change anything after I pushed it. |
|
updated with #392 |
No description provided.