Skip to content

Commit a6f0a5d

Browse files
author
Jim Fulton
authored
feat: Rename pybigquery to sqlalchemy-bigquery (#198)
1 parent 999ac79 commit a6f0a5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+224
-224
lines changed

.coveragerc

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[run]
1919
branch = True
2020
omit =
21-
pybigquery/requirements.py
21+
sqlalchemy_bigquery/requirements.py
2222

2323
[report]
2424
fail_under = 100
@@ -35,4 +35,4 @@ omit =
3535
*/proto/*.py
3636
*/core/*.py
3737
*/site-packages/*.py
38-
pybigquery/requirements.py
38+
sqlalchemy_bigquery/requirements.py

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are still having issues, please be sure to include as much information as
2020
- OS type and version:
2121
- Python version: `python --version`
2222
- pip version: `pip --version`
23-
- `pybigquery` version: `pip show pybigquery`
23+
- `sqlalchemy-bigquery` version: `pip show sqlalchemy-bigquery`
2424

2525
#### Steps to reproduce
2626

.repo-metadata.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"name": "pybigquery",
2+
"name": "sqlalchemy-bigquery",
33
"name_pretty": "SQLAlchemy dialect for BigQuery",
4-
"client_documentation": "https://github.com/googleapis/pybigquery",
4+
"client_documentation":
5+
"https://googleapis.dev/python/sqlalchemy-bigquery/latest/index.html",
56
"release_level": "beta",
67
"language": "python",
78
"library_type": "INTEGRATION",
89
"repo": "googleapis/python-bigquery-sqlalchemy",
9-
"distribution_name": "pybigquery",
10+
"distribution_name": "sqlalchemy-bigquery",
1011
"api_id": "bigquery.googleapis.com"
1112
}

AUTHORS

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This is the list of pybigquery's significant contributors.
1+
# This is the list of sqlalchemy-bigquery's significant contributors.
22
#
33
# This does not necessarily list everyone who has contributed code,
44
# especially since many employees of one corporation may be contributing.
@@ -12,6 +12,7 @@ Google LLC
1212
Harshal Sheth
1313
Jacob Hayes
1414
James Campbell
15+
Jim Fulton
1516
Joshua Carp
1617
Kurian (kuriancheeramelil)
1718
Maksym Voitko

CHANGELOG.md

+23-17
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,56 @@
11
# Changelog
22

3-
[PyPI History][1]
3+
Older versions of this project were distributed as [pybigquery][0].
44

5-
[1]: https://pypi.org/project/pybigquery/#history
5+
[0]: https://pypi.org/project/pybigquery
66

7-
### [0.10.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.10.0...v0.10.1) (2021-07-30)
7+
[sqlalchemy-bigquery PyPI History][1]
8+
9+
[1]: https://pypi.org/project/sqlalchemy-bigquery/#history
10+
11+
12+
[pybigquery PyPI History][2]
13+
14+
[2]: https://pypi.org/project/pybigquery/#history
15+
16+
17+
## [pybigquery 0.10.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.10.0...v0.10.1) (2021-07-30)
818

919

1020
### Bug Fixes
1121

1222
* **deps:** pin 'google-{api,cloud}-core', 'google-auth' to allow 2.x versions ([#220](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/220)) ([bf1f47c](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/bf1f47c794e747a2ea878347322c040636e8c2d4))
1323

14-
## [0.10.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.9.1...v0.10.0) (2021-07-06)
24+
## [pybigquery 0.10.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.9.1...v0.10.0) (2021-07-06)
1525

1626

1727
### Features
1828

1929
* There's a new `page_size` option to control the page size used when listing tables. ([#174](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/174)) ([e0f1496](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/e0f1496c99dd627e0ed04a0c4e89ca5b14611be2))
2030

21-
### [0.9.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.9.0...v0.9.1) (2021-06-25)
31+
## [pybigquery 0.9.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.9.0...v0.9.1) (2021-06-25)
2232

2333

2434
### Documentation
2535

2636
* omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([d52334c](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/d52334c3290d8356a26e1c9fc54dae75854410c9))
2737

28-
## [0.9.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.8.0...v0.9.0) (2021-05-25)
38+
## [pybigquery 0.9.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.8.0...v0.9.0) (2021-05-25)
2939

3040

3141
### Features
3242

3343
* Alembic support ([#183](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/183)) ([4d5a17c](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/4d5a17c8f63328d4484ea7b2ccc58334a421ba81))
3444
* Support parameterized NUMERIC, BIGNUMERIC, STRING, and BYTES types ([#180](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/180)) ([d118238](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/d1182385b9f1551e605acdc7e2dd45dff22c8064))
3545

36-
## [0.8.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.7.0...v0.8.0) (2021-05-21)
46+
## [pybigquery 0.8.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.7.0...v0.8.0) (2021-05-21)
3747

3848

3949
### Features
4050

4151
* Add support for SQLAlchemy 1.4 ([#177](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/177)) ([b7b6000](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/b7b60007c966cd548448d1d6fd5a14d1f89480cd))
4252

43-
## [0.7.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.6.1...v0.7.0) (2021-05-12)
53+
## [pybigquery 0.7.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.6.1...v0.7.0) (2021-05-12)
4454

4555

4656
### Features
@@ -64,14 +74,14 @@
6474
- Get view definitions.
6575

6676

67-
### [0.6.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.6.0...v0.6.1) (2021-04-12)
77+
## [pybigquery 0.6.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.6.0...v0.6.1) (2021-04-12)
6878

6979

7080
### Bug Fixes
7181

7282
* use `project_id` property from service account credentials ([#120](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/120)) ([ab2051d](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/ab2051de3097adb68503c01a87f9a91092711d2a))
7383

74-
## [0.6.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.5.1...v0.6.0) (2021-04-06)
84+
## [pybigquery 0.6.0](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.5.1...v0.6.0) (2021-04-06)
7585

7686

7787
### Features
@@ -83,7 +93,7 @@
8393

8494
* correct classifiers in `setup.py` ([#107](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/107)) ([0cfc5de](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/0cfc5de467823998ba72af1fee1d2a8aa865fabc))
8595

86-
### [0.5.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.5.0...v0.5.1) (2021-04-01)
96+
## [pybigquery 0.5.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.5.0...v0.5.1) (2021-04-01)
8797

8898

8999
### Bug Fixes
@@ -96,9 +106,7 @@
96106
* add templates for move to googleapis/python-bigquery-sqlalchemy repo ([#88](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/88)) ([37e584e](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/37e584e05db6316b4abd41ebc08486047d2c49b8))
97107
* build documentation with Sphinx ([#97](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/97)) ([1707737](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/1707737c60997e9714387c8077727eb5918626bb))
98108

99-
## 0.5.0
100-
101-
2020-11-18
109+
## pybigquery 0.5.0 (2020-11-18)
102110

103111
### ⚠️ Breaking Changes ⚠️
104112

@@ -118,9 +126,7 @@
118126

119127
- Use flake8 for code style checks. ([#71](https://github.com/mxmzdlv/pybigquery/pull/71))
120128

121-
## 0.4.15
122-
123-
2020-04-23
129+
## pybigquery 0.4.15 (2020-04-23)
124130

125131
### Implementation Changes
126132

CONTRIBUTING.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ instead of
212212
``https://github.com/googleapis/python-bigquery-sqlalchemy/blob/master/CONTRIBUTING.rst``)
213213
may cause problems creating links or rendering the description.
214214

215-
.. _description on PyPI: https://pypi.org/project/pybigquery
215+
.. _description on PyPI: https://pypi.org/project/sqlalchemy-bigquery
216216

217217

218218
*************************

README.rst

+19-16
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ SQLAlchemy Dialect for BigQuery
1010

1111
.. |beta| image:: https://img.shields.io/badge/support-beta-orange.svg
1212
:target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#beta-support
13-
.. |pypi| image:: https://img.shields.io/pypi/v/pybigquery.svg
14-
:target: https://pypi.org/project/pybigquery/
15-
.. |versions| image:: https://img.shields.io/pypi/pyversions/pybigquery.svg
16-
:target: https://pypi.org/project/pybigquery/
13+
.. |pypi| image:: https://img.shields.io/pypi/v/sqlalchemy-bigquery.svg
14+
:target: https://pypi.org/project/sqlalchemy-bigquery/
15+
.. |versions| image:: https://img.shields.io/pypi/pyversions/sqlalchemy-bigquery.svg
16+
:target: https://pypi.org/project/sqlalchemy-bigquery/
1717
.. _SQLAlchemy Dialects: https://docs.sqlalchemy.org/en/14/dialects/
18-
.. _Dialect Documentation: https://googleapis.dev/python/pybigquery/latest
18+
.. _Dialect Documentation: https://googleapis.dev/python/sqlalchemy-bigquery/latest
1919
.. _Product Documentation: https://cloud.google.com/bigquery/docs/
2020

2121

@@ -65,7 +65,7 @@ Mac/Linux
6565
pip install virtualenv
6666
virtualenv <your-env>
6767
source <your-env>/bin/activate
68-
<your-env>/bin/pip install pybigquery
68+
<your-env>/bin/pip install sqlalchemy-bigquery
6969
7070
7171
Windows
@@ -76,7 +76,7 @@ Windows
7676
pip install virtualenv
7777
virtualenv <your-env>
7878
<your-env>\Scripts\activate
79-
<your-env>\Scripts\pip.exe install pybigquery
79+
<your-env>\Scripts\pip.exe install sqlalchemy-bigquery
8080
8181
Usage
8282
-----
@@ -93,15 +93,6 @@ SQLAlchemy
9393
table = Table('dataset.table', MetaData(bind=engine), autoload=True)
9494
print(select([func.count('*')], from_obj=table).scalar())
9595
96-
API Client
97-
^^^^^^^^^^
98-
99-
.. code-block:: python
100-
101-
from pybigquery.api import ApiClient
102-
api_client = ApiClient()
103-
print(api_client.dry_run_query(query=sqlstr).total_bytes_processed)
104-
10596
Project
10697
^^^^^^^
10798

@@ -231,3 +222,15 @@ To add metadata to a column:
231222
.. code-block:: python
232223
233224
Column('mycolumn', doc='my column description')
225+
226+
227+
Threading and Multiprocessing
228+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
229+
230+
Because this client uses the `grpc` library, it's safe to
231+
share instances across threads.
232+
233+
In multiprocessing scenarios, the best
234+
practice is to create client instances *after* the invocation of
235+
`os.fork` by `multiprocessing.pool.Pool` or
236+
`multiprocessing.Process`.

docs/conf.py

+24-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
# pybigquery documentation build configuration file
16+
# sqlalchemy-bigquery documentation build configuration file
1717
#
1818
# This file is execfile()d with the current directory set to its
1919
# containing dir.
@@ -80,7 +80,7 @@
8080
master_doc = "index"
8181

8282
# General information about the project.
83-
project = "pybigquery"
83+
project = "sqlalchemy-bigquery"
8484
copyright = "2019, Google"
8585
author = "Google APIs"
8686

@@ -153,7 +153,7 @@
153153
# further. For a list of options available for each theme, see the
154154
# documentation.
155155
html_theme_options = {
156-
"description": "Google Cloud Client Libraries for pybigquery",
156+
"description": "Google Cloud Client Libraries for sqlalchemy-bigquery",
157157
"github_user": "googleapis",
158158
"github_repo": "python-bigquery-sqlalchemy",
159159
"github_banner": True,
@@ -247,7 +247,7 @@
247247
# html_search_scorer = 'scorer.js'
248248

249249
# Output file base name for HTML help builder.
250-
htmlhelp_basename = "pybigquery-doc"
250+
htmlhelp_basename = "sqlalchemy-bigquery-doc"
251251

252252
# -- Options for warnings ------------------------------------------------------
253253

@@ -278,7 +278,13 @@
278278
# (source start file, target name, title,
279279
# author, documentclass [howto, manual, or own class]).
280280
latex_documents = [
281-
(master_doc, "pybigquery.tex", "pybigquery Documentation", author, "manual",)
281+
(
282+
master_doc,
283+
"sqlalchemy-bigquery.tex",
284+
"sqlalchemy-bigquery Documentation",
285+
author,
286+
"manual",
287+
)
282288
]
283289

284290
# The name of an image file (relative to this directory) to place at the top of
@@ -306,7 +312,15 @@
306312

307313
# One entry per manual page. List of tuples
308314
# (source start file, name, description, authors, manual section).
309-
man_pages = [(master_doc, "pybigquery", "pybigquery Documentation", [author], 1,)]
315+
man_pages = [
316+
(
317+
master_doc,
318+
"sqlalchemy-bigquery",
319+
"sqlalchemy-bigquery Documentation",
320+
[author],
321+
1,
322+
)
323+
]
310324

311325
# If true, show URL addresses after external links.
312326
# man_show_urls = False
@@ -320,11 +334,11 @@
320334
texinfo_documents = [
321335
(
322336
master_doc,
323-
"pybigquery",
324-
"pybigquery Documentation",
337+
"sqlalchemy-bigquery",
338+
"sqlalchemy-bigquery Documentation",
325339
author,
326-
"pybigquery",
327-
"pybigquery Library",
340+
"sqlalchemy-bigquery",
341+
"sqlalchemy-bigquery Library",
328342
"APIs",
329343
)
330344
]

docs/index.rst

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
.. include:: README.rst
21

3-
.. include:: multiprocessing.rst
4-
5-
.. include:: alembic.rst
6-
7-
API Reference
8-
-------------
92
.. toctree::
10-
:maxdepth: 2
3+
:maxdepth: 2
114

12-
pybigquery/api
5+
README
6+
alembic
137

148
Changelog
159
---------
1610

17-
For a list of all ``pybigquery`` releases:
11+
For a list of all ``sqlalchemy-bigquery`` releases:
1812

1913
.. toctree::
2014
:maxdepth: 2

docs/multiprocessing.rst

-7
This file was deleted.

docs/pybigquery/api.rst

-7
This file was deleted.

noxfile.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
BLACK_VERSION = "black==19.10b0"
28-
BLACK_PATHS = ["docs", "pybigquery", "tests", "noxfile.py", "setup.py"]
28+
BLACK_PATHS = ["docs", "sqlalchemy_bigquery", "tests", "noxfile.py", "setup.py"]
2929

3030
DEFAULT_PYTHON_VERSION = "3.8"
3131

@@ -63,7 +63,7 @@ def lint(session):
6363
session.run(
6464
"black", "--check", *BLACK_PATHS,
6565
)
66-
session.run("flake8", "pybigquery", "tests")
66+
session.run("flake8", "sqlalchemy_bigquery", "tests")
6767

6868

6969
@nox.session(python=DEFAULT_PYTHON_VERSION)
@@ -114,7 +114,7 @@ def default(session):
114114
"py.test",
115115
"--quiet",
116116
f"--junitxml=unit_{session.python}_sponge_log.xml",
117-
"--cov=pybigquery",
117+
"--cov=sqlalchemy_bigquery",
118118
"--cov=tests/unit",
119119
"--cov-append",
120120
"--cov-config=.coveragerc",

0 commit comments

Comments
 (0)