Skip to content

Commit

Permalink
address a self-review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gargnitingoogle committed Oct 10, 2024
1 parent 02ae0dd commit 581793e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions perfmetrics/scripts/testing_on_gke/examples/utils/gsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@ def append_data_to_gsheet(
) -> None:
"""Calls the API to append the given data at the end of the given worksheet in the given gsheet.
If the passed header matches the first row of the file, then the
header is not inserted again.
Args:
serviceAccountKeyFile: Path of a service-account key-file for authentication
read/write from/to the given gsheet. This can be a local filepath or a GCS
path starting with `gs:`
worksheet: string, name of the worksheet to be edited appended by a "!"
data: Dictionary of {'header': tuple, 'values': list(tuples)}, to be added
to the worksheet.
to the worksheet. If the passed header matches the first row of the
worksheet, then the header row is not inserted again.
gsheet_id: Unique ID to identify a gsheet.
Raises:
Expand Down Expand Up @@ -138,4 +137,5 @@ def _write_at_address(cell_address: str, data):


def url(gsheet_id: str) -> str:
"""Returns the url corresponding to the given google sheet ID."""
return f'https://docs.google.com/spreadsheets/d/{gsheet_id}'
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

class GsheetTest(unittest.TestCase):

# @classmethod
# def setUpClass(self):
# self.project_id = 'gcs-fuse-test'

def test_append_data_to_gsheet(self):
_DEFAULT_GSHEET_ID = '1s9DCis6XZ_oHRIFTy0F8yVN93EGA2Koks_pzpCqAIS4'

Expand Down
2 changes: 1 addition & 1 deletion perfmetrics/scripts/testing_on_gke/examples/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def run_command(command: str) -> int:
Returns exit-code which would be non-zero for error.
"""
result = subprocess.run(
[word for word in command.split(" ") if (word and not str.isspace(word))],
[word for word in command.split(" ") if (word and word.strip())],
capture_output=True,
text=True,
)
Expand Down

0 comments on commit 581793e

Please sign in to comment.