From b906b7629d600406bd746a4a6cc79ee8b15305f3 Mon Sep 17 00:00:00 2001 From: Irina Truong Date: Thu, 18 May 2023 09:13:50 -0700 Subject: [PATCH 1/3] Prefix test dataset with platform. --- dask_bigquery/tests/test_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask_bigquery/tests/test_core.py b/dask_bigquery/tests/test_core.py index 4d08805..14ac6c1 100644 --- a/dask_bigquery/tests/test_core.py +++ b/dask_bigquery/tests/test_core.py @@ -42,7 +42,7 @@ def dataset(): project_id = os.environ.get("DASK_BIGQUERY_PROJECT_ID") if not project_id: credentials, project_id = google.auth.default() - dataset_id = uuid.uuid4().hex + dataset_id = f"{sys.platform}-uuid.uuid4().hex" with bigquery.Client() as bq_client: dataset = bigquery.Dataset(f"{project_id}.{dataset_id}") @@ -138,7 +138,7 @@ def write_dataset(): if env_project_id: project_id = env_project_id - dataset_id = uuid.uuid4().hex + dataset_id = f"{sys.platform}-uuid.uuid4().hex" yield credentials, project_id, dataset_id From 24b460ee51a8340454959574168d3dd00c3f85c3 Mon Sep 17 00:00:00 2001 From: Irina Truong Date: Thu, 18 May 2023 09:19:28 -0700 Subject: [PATCH 2/3] Oops. --- dask_bigquery/tests/test_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask_bigquery/tests/test_core.py b/dask_bigquery/tests/test_core.py index 14ac6c1..a574455 100644 --- a/dask_bigquery/tests/test_core.py +++ b/dask_bigquery/tests/test_core.py @@ -42,7 +42,7 @@ def dataset(): project_id = os.environ.get("DASK_BIGQUERY_PROJECT_ID") if not project_id: credentials, project_id = google.auth.default() - dataset_id = f"{sys.platform}-uuid.uuid4().hex" + dataset_id = f"{sys.platform}-{uuid.uuid4().hex}" with bigquery.Client() as bq_client: dataset = bigquery.Dataset(f"{project_id}.{dataset_id}") @@ -138,7 +138,7 @@ def write_dataset(): if env_project_id: project_id = env_project_id - dataset_id = f"{sys.platform}-uuid.uuid4().hex" + dataset_id = f"{sys.platform}-{uuid.uuid4().hex}" yield credentials, project_id, dataset_id From 00a20db6149a0939fbc786761a3fdbe81ef9af85 Mon Sep 17 00:00:00 2001 From: Irina Truong Date: Thu, 18 May 2023 09:25:21 -0700 Subject: [PATCH 3/3] Dashes not allowed. --- dask_bigquery/tests/test_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask_bigquery/tests/test_core.py b/dask_bigquery/tests/test_core.py index a574455..e678781 100644 --- a/dask_bigquery/tests/test_core.py +++ b/dask_bigquery/tests/test_core.py @@ -42,7 +42,7 @@ def dataset(): project_id = os.environ.get("DASK_BIGQUERY_PROJECT_ID") if not project_id: credentials, project_id = google.auth.default() - dataset_id = f"{sys.platform}-{uuid.uuid4().hex}" + dataset_id = f"{sys.platform}_{uuid.uuid4().hex}" with bigquery.Client() as bq_client: dataset = bigquery.Dataset(f"{project_id}.{dataset_id}") @@ -138,7 +138,7 @@ def write_dataset(): if env_project_id: project_id = env_project_id - dataset_id = f"{sys.platform}-{uuid.uuid4().hex}" + dataset_id = f"{sys.platform}_{uuid.uuid4().hex}" yield credentials, project_id, dataset_id