Skip to content

Commit fe8dd4c

Browse files
authored
enable build specific projects for data science onramp (GoogleCloudPlatform#7633)
* enable build specific projects for data science onramp Fixes GoogleCloudPlatform#7493 Fixes GoogleCloudPlatform#7489 * run blacken * Update data-science-onramp/data-ingestion/noxfile_config.py * Update data-science-onramp/data-processing/noxfile_config.py
1 parent 68549f8 commit fe8dd4c

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

data-science-onramp/data-ingestion/ingestion_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def setup_and_teardown_cluster():
9393
try:
9494
# Delete cluster
9595
operation = cluster_client.delete_cluster(
96-
project_id=PROJECT_ID, region=CLUSTER_REGION, cluster_name=DATAPROC_CLUSTER
96+
project_id=PROJECT_ID,
97+
region=CLUSTER_REGION,
98+
cluster_name=DATAPROC_CLUSTER,
9799
)
98100
operation.result()
99101
except NotFound:

data-science-onramp/data-ingestion/noxfile_config.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@
2222

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.
25-
# There's no google-cloud-bigquery package for Python 3.9.
26-
"ignored_versions": ["2.7", "3.6", "3.9"],
25+
"ignored_versions": ["2.7", "3.6"],
2726
# Old samples are opted out of enforcing Python type hints
2827
# All new samples should feature them
2928
"enforce_type_hints": False,
3029
# An envvar key for determining the project id to use. Change it
3130
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
3231
# build specific Cloud project. You can also use your own string
3332
# to use your own Cloud project.
34-
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
35-
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
33+
# "gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
34+
"gcloud_project_env": "BUILD_SPECIFIC_GCLOUD_PROJECT",
3635
# A dictionary you want to inject into your test. Don't put any
3736
# secrets here. These values will override predefined values.
3837
"envs": {},

data-science-onramp/data-processing/noxfile_config.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@
2222

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.
25-
# Skipping for Python 3.9 due to pyarrow compilation failure.
26-
"ignored_versions": ["2.7", "3.6", "3.9"],
25+
"ignored_versions": ["2.7", "3.6"],
2726
# Old samples are opted out of enforcing Python type hints
2827
# All new samples should feature them
2928
"enforce_type_hints": False,
3029
# An envvar key for determining the project id to use. Change it
3130
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
3231
# build specific Cloud project. You can also use your own string
3332
# to use your own Cloud project.
34-
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
35-
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
33+
# "gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
34+
"gcloud_project_env": "BUILD_SPECIFIC_GCLOUD_PROJECT",
3635
# A dictionary you want to inject into your test. Don't put any
3736
# secrets here. These values will override predefined values.
3837
"envs": {},

data-science-onramp/data-processing/process_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ def setup_and_teardown_cluster():
123123
try:
124124
# Delete cluster
125125
operation = cluster_client.delete_cluster(
126-
project_id=PROJECT_ID, region=CLUSTER_REGION, cluster_name=DATAPROC_CLUSTER
126+
project_id=PROJECT_ID,
127+
region=CLUSTER_REGION,
128+
cluster_name=DATAPROC_CLUSTER,
127129
)
128130
operation.result()
129131
except NotFound:

0 commit comments

Comments
 (0)