Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 509cb5c

Browse files
authored
Remove sub directories of metrics scripts (GoogleCloudPlatform#159)
1 parent b194a78 commit 509cb5c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

perf_dashboard/__init__.py

Whitespace-only changes.

perf_dashboard/stackoverflow/posts_stats.py renamed to perf_dashboard/posts_stats.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525

2626
from google.cloud import bigquery
2727

28-
# Need this to import the local helper function
29-
sys.path.insert(0, os.path.abspath(__file__+"/../../.."))
30-
from perf_dashboard import bq_utils
28+
import bq_utils
3129

3230
GCLOUD_PROJECT_ENV = 'GCLOUD_PROJECT'
3331
DATASET_NAME = 'stackoverflow'

perf_dashboard/clientlibs_download/python_clientlibs_download.py renamed to perf_dashboard/python_clientlibs_download.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020

2121
from google.cloud import bigquery
2222

23-
sys.path.insert(0, os.path.abspath(__file__+"/../../.."))
24-
from perf_dashboard import bq_utils
25-
23+
import bq_utils
2624

2725
GCLOUD_PROJECT_ENV = 'GCLOUD_PROJECT'
2826

@@ -136,7 +134,7 @@ def main():
136134
clientlibs_table_name=table_name,
137135
date_str=datetime.datetime.now().strftime("%Y%m%d"))
138136
bq_utils.insert_rows(
139-
project=project,
137+
project=os.environ.get(GCLOUD_PROJECT_ENV),
140138
dataset_name=DATASET_NAME,
141139
table_name=table_name,
142140
rows=rows)

0 commit comments

Comments
 (0)