Skip to content

Commit

Permalink
chore: standardize samples directory - delete unneeded dependencies (#…
Browse files Browse the repository at this point in the history
…1732)

* chore: standardize samples directory = delete unneeded dependencies

* Removed unused import for linter
  • Loading branch information
kiraksi authored Nov 22, 2023
1 parent f05dc69 commit 222e86e
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 346 deletions.
23 changes: 23 additions & 0 deletions samples/desktopapp/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud import bigquery
import pytest


@pytest.fixture
def bigquery_client_patch(
monkeypatch: pytest.MonkeyPatch, bigquery_client: bigquery.Client
) -> None:
monkeypatch.setattr(bigquery, "Client", lambda: bigquery_client)
15 changes: 0 additions & 15 deletions samples/desktopapp/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
db-dtypes==1.1.1
google-cloud-bigquery==3.11.4
google-cloud-bigquery-storage==2.22.0
google-auth-oauthlib==1.0.0
grpcio==1.57.0
ipywidgets==8.1.0
ipython===7.31.1; python_version == '3.7'
ipython===8.0.1; python_version == '3.8'
ipython==8.14.0; python_version >= '3.9'
matplotlib===3.5.3; python_version == '3.7'
matplotlib==3.7.2; python_version >= '3.8'
pandas===1.3.5; python_version == '3.7'
pandas==2.0.3; python_version >= '3.8'
pyarrow==12.0.1; python_version == '3.7'
pyarrow==14.0.1; python_version >= '3.8'
pytz==2023.3
typing-extensions==4.7.1
10 changes: 1 addition & 9 deletions samples/magics/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
db-dtypes==1.1.1
google.cloud.bigquery==3.11.4
google-cloud-bigquery-storage==2.22.0
google-auth-oauthlib==1.0.0
grpcio==1.57.0
ipywidgets==8.1.0
ipython===7.31.1; python_version == '3.7'
ipython===8.0.1; python_version == '3.8'
ipython==8.14.0; python_version >= '3.9'
matplotlib===3.5.3; python_version == '3.7'
matplotlib==3.7.2; python_version >= '3.8'
pandas===1.3.5; python_version == '3.7'
pandas==2.0.3; python_version >= '3.8'
pyarrow==12.0.1; python_version == '3.7'
pyarrow==14.0.1; python_version >= '3.8'
pytz==2023.3
typing-extensions==4.7.1
23 changes: 23 additions & 0 deletions samples/notebooks/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud import bigquery
import pytest


@pytest.fixture
def bigquery_client_patch(
monkeypatch: pytest.MonkeyPatch, bigquery_client: bigquery.Client
) -> None:
monkeypatch.setattr(bigquery, "Client", lambda: bigquery_client)
7 changes: 0 additions & 7 deletions samples/notebooks/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
db-dtypes==1.1.1
google-cloud-bigquery==3.11.4
google-cloud-bigquery-storage==2.22.0
google-auth-oauthlib==1.0.0
grpcio==1.57.0
ipywidgets==8.1.0
ipython===7.31.1; python_version == '3.7'
ipython===8.0.1; python_version == '3.8'
ipython==8.14.0; python_version >= '3.9'
matplotlib===3.5.3; python_version == '3.7'
matplotlib==3.7.2; python_version >= '3.8'
pandas===1.3.5; python_version == '3.7'
pandas==2.0.3; python_version >= '3.8'
pyarrow==12.0.1; python_version == '3.7'
pyarrow==14.0.1; python_version >= '3.8'
pytz==2023.3
typing-extensions==4.7.1
175 changes: 0 additions & 175 deletions samples/snippets/jupyter_tutorial_test.py

This file was deleted.

18 changes: 1 addition & 17 deletions samples/snippets/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
db-dtypes==1.1.1
google-cloud-bigquery==3.11.4
google-cloud-bigquery-storage==2.22.0
google-auth-oauthlib==1.0.0
grpcio==1.57.0
ipywidgets==8.1.0
ipython===7.31.1; python_version == '3.7'
ipython===8.0.1; python_version == '3.8'
ipython==8.14.0; python_version >= '3.9'
matplotlib===3.5.3; python_version == '3.7'
matplotlib==3.7.2; python_version >= '3.8'
pandas===1.3.5; python_version == '3.7'
pandas==2.0.3; python_version >= '3.8'
pyarrow==12.0.1; python_version == '3.7'
pyarrow==14.0.1; python_version >= '3.8'
pytz==2023.3
typing-extensions==4.7.1
google-cloud-bigquery==3.11.4
78 changes: 0 additions & 78 deletions samples/snippets/user_credentials.py

This file was deleted.

Loading

0 comments on commit 222e86e

Please sign in to comment.