Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rename pybigquery to sqlalchemy-bigquery #198

Merged
merged 36 commits into from Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
839965e
Rename refs in files
jimfulton Jul 1, 2021
7b9dd6b
Move package
jimfulton Jul 1, 2021
dc70785
more renaming
jimfulton Jul 1, 2021
ca88aaa
Expose dialect and types
jimfulton Jul 1, 2021
d0f9bd4
explain the weird registration
jimfulton Jul 1, 2021
c35a686
fixed: No longer need `test_pybigquery_sqla` schema, we generte rando…
jimfulton Jul 1, 2021
b2636d6
document that we obsolete pybigquery
jimfulton Jul 2, 2021
9a82e92
get _type_map from the base module.
jimfulton Jul 2, 2021
33da56c
fix import
jimfulton Jul 2, 2021
073293f
Warn if an old (non-empty) version of pybigquery is installed.
jimfulton Jul 2, 2021
3555943
Add __version__
jimfulton Jul 2, 2021
b3d022b
fixed names
jimfulton Jul 2, 2021
af5242a
Updated the way the path to __init__.py is computed
jimfulton Jul 2, 2021
2a0f6a0
Updated copyright statements with new package name
jimfulton Jul 2, 2021
b0458cc
Define the version in version.py
jimfulton Jul 2, 2021
95c1bc3
skip coverage for code handling pybigquery hanging around
jimfulton Jul 2, 2021
159f618
blacken/lint
jimfulton Jul 2, 2021
e2d6021
Merge branch 'master' into sqlalchemy-bigquery-197
jimfulton Jul 2, 2021
e5dc64b
merge upstream
jimfulton Jul 6, 2021
a0eeeff
Merge remote-tracking branch 'origin/sqlalchemy-bigquery-197' into sq…
jimfulton Jul 6, 2021
5975e16
merge upstream
jimfulton Jul 7, 2021
132fcd1
Update .repo-metadata.json
jimfulton Jul 14, 2021
741f3a4
Merge branch 'master' into sqlalchemy-bigquery-197
jimfulton Jul 15, 2021
20bc572
Merge branch 'master' into sqlalchemy-bigquery-197
jimfulton Jul 16, 2021
02f4b54
merge upstream/master
jimfulton Aug 5, 2021
0ab7d52
merge upstream/master
jimfulton Aug 5, 2021
64a26a6
Keep pybigquery history pypi link
jimfulton Aug 5, 2021
0aed0cb
Removed the api module
jimfulton Aug 5, 2021
3ac10f8
added missing comma
jimfulton Aug 5, 2021
9b49a87
we decided not to have a shim, so get rid of the check for it.
jimfulton Aug 5, 2021
9c31524
fixed indentation
jimfulton Aug 5, 2021
5f821e3
Added missing import and added module docstring
jimfulton Aug 6, 2021
24a7e59
More docs reorg
jimfulton Aug 6, 2021
1b7be89
fixed some heading levels and also highlight that older versions are …
jimfulton Aug 6, 2021
657054f
lint
jimfulton Aug 6, 2021
8f1c2e4
removed a reference to the old API client
jimfulton Aug 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .coveragerc
Expand Up @@ -18,7 +18,7 @@
[run]
branch = True
omit =
pybigquery/requirements.py
sqlalchemy_bigquery/requirements.py

[report]
fail_under = 100
Expand All @@ -35,4 +35,4 @@ omit =
*/proto/*.py
*/core/*.py
*/site-packages/*.py
pybigquery/requirements.py
sqlalchemy_bigquery/requirements.py
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -20,7 +20,7 @@ If you are still having issues, please be sure to include as much information as
- OS type and version:
- Python version: `python --version`
- pip version: `pip --version`
- `pybigquery` version: `pip show pybigquery`
- `sqlalchemy-bigquery` version: `pip show sqlalchemy-bigquery`

#### Steps to reproduce

Expand Down
7 changes: 4 additions & 3 deletions .repo-metadata.json
@@ -1,11 +1,12 @@
{
"name": "pybigquery",
"name": "sqlalchemy-bigquery",
"name_pretty": "SQLAlchemy dialect for BigQuery",
"client_documentation": "https://github.com/googleapis/pybigquery",
"client_documentation":
"https://googleapis.dev/python/sqlalchemy-bigquery/latest/index.html",
"release_level": "beta",
"language": "python",
"library_type": "INTEGRATION",
"repo": "googleapis/python-bigquery-sqlalchemy",
"distribution_name": "pybigquery",
"distribution_name": "sqlalchemy-bigquery",
"api_id": "bigquery.googleapis.com"
}
3 changes: 2 additions & 1 deletion AUTHORS
@@ -1,4 +1,4 @@
# This is the list of pybigquery's significant contributors.
# This is the list of sqlalchemy-bigquery's significant contributors.
#
# This does not necessarily list everyone who has contributed code,
# especially since many employees of one corporation may be contributing.
Expand All @@ -12,6 +12,7 @@ Google LLC
Harshal Sheth
Jacob Hayes
James Campbell
Jim Fulton
Joshua Carp
Kurian (kuriancheeramelil)
Maksym Voitko
Expand Down
40 changes: 23 additions & 17 deletions CHANGELOG.md
@@ -1,46 +1,56 @@
# Changelog

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

[1]: https://pypi.org/project/pybigquery/#history
[0]: https://pypi.org/project/pybigquery

### [0.10.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.10.0...v0.10.1) (2021-07-30)
[sqlalchemy-bigquery PyPI History][1]

[1]: https://pypi.org/project/sqlalchemy-bigquery/#history


[pybigquery PyPI History][2]

[2]: https://pypi.org/project/pybigquery/#history


## [pybigquery 0.10.1](https://www.github.com/googleapis/python-bigquery-sqlalchemy/compare/v0.10.0...v0.10.1) (2021-07-30)


### Bug Fixes

* **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))

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


### Features

* 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))

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


### Documentation

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

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


### Features

* Alembic support ([#183](https://www.github.com/googleapis/python-bigquery-sqlalchemy/issues/183)) ([4d5a17c](https://www.github.com/googleapis/python-bigquery-sqlalchemy/commit/4d5a17c8f63328d4484ea7b2ccc58334a421ba81))
* 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))

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


### Features

* 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))

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


### Features
Expand All @@ -64,14 +74,14 @@
- Get view definitions.


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


### Bug Fixes

* 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))

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


### Features
Expand All @@ -83,7 +93,7 @@

* 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))

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


### Bug Fixes
Expand All @@ -96,9 +106,7 @@
* 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))
* 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))

## 0.5.0

2020-11-18
## pybigquery 0.5.0 (2020-11-18)

### ⚠️ Breaking Changes ⚠️

Expand All @@ -118,9 +126,7 @@

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

## 0.4.15

2020-04-23
## pybigquery 0.4.15 (2020-04-23)

### Implementation Changes

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Expand Up @@ -212,7 +212,7 @@ instead of
``https://github.com/googleapis/python-bigquery-sqlalchemy/blob/master/CONTRIBUTING.rst``)
may cause problems creating links or rendering the description.

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


*************************
Expand Down
35 changes: 19 additions & 16 deletions README.rst
Expand Up @@ -10,12 +10,12 @@ SQLAlchemy Dialect for BigQuery

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


Expand Down Expand Up @@ -65,7 +65,7 @@ Mac/Linux
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install pybigquery
<your-env>/bin/pip install sqlalchemy-bigquery


Windows
Expand All @@ -76,7 +76,7 @@ Windows
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install pybigquery
<your-env>\Scripts\pip.exe install sqlalchemy-bigquery

Usage
-----
Expand All @@ -93,15 +93,6 @@ SQLAlchemy
table = Table('dataset.table', MetaData(bind=engine), autoload=True)
print(select([func.count('*')], from_obj=table).scalar())

API Client
^^^^^^^^^^

.. code-block:: python

from pybigquery.api import ApiClient
api_client = ApiClient()
print(api_client.dry_run_query(query=sqlstr).total_bytes_processed)

Project
^^^^^^^

Expand Down Expand Up @@ -231,3 +222,15 @@ To add metadata to a column:
.. code-block:: python

Column('mycolumn', doc='my column description')


Threading and Multiprocessing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Because this client uses the `grpc` library, it's safe to
share instances across threads.

In multiprocessing scenarios, the best
practice is to create client instances *after* the invocation of
`os.fork` by `multiprocessing.pool.Pool` or
`multiprocessing.Process`.
34 changes: 24 additions & 10 deletions docs/conf.py
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pybigquery documentation build configuration file
# sqlalchemy-bigquery documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand Down Expand Up @@ -80,7 +80,7 @@
master_doc = "index"

# General information about the project.
project = "pybigquery"
project = "sqlalchemy-bigquery"
copyright = "2019, Google"
author = "Google APIs"

Expand Down Expand Up @@ -153,7 +153,7 @@
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
"description": "Google Cloud Client Libraries for pybigquery",
"description": "Google Cloud Client Libraries for sqlalchemy-bigquery",
"github_user": "googleapis",
"github_repo": "python-bigquery-sqlalchemy",
"github_banner": True,
Expand Down Expand Up @@ -247,7 +247,7 @@
# html_search_scorer = 'scorer.js'

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

# -- Options for warnings ------------------------------------------------------

Expand Down Expand Up @@ -278,7 +278,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "pybigquery.tex", "pybigquery Documentation", author, "manual",)
(
master_doc,
"sqlalchemy-bigquery.tex",
"sqlalchemy-bigquery Documentation",
author,
"manual",
)
]

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

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "pybigquery", "pybigquery Documentation", [author], 1,)]
man_pages = [
(
master_doc,
"sqlalchemy-bigquery",
"sqlalchemy-bigquery Documentation",
[author],
1,
)
]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -320,11 +334,11 @@
texinfo_documents = [
(
master_doc,
"pybigquery",
"pybigquery Documentation",
"sqlalchemy-bigquery",
"sqlalchemy-bigquery Documentation",
author,
"pybigquery",
"pybigquery Library",
"sqlalchemy-bigquery",
"sqlalchemy-bigquery Library",
"APIs",
)
]
Expand Down
14 changes: 4 additions & 10 deletions docs/index.rst
@@ -1,20 +1,14 @@
.. include:: README.rst

.. include:: multiprocessing.rst

.. include:: alembic.rst

API Reference
-------------
.. toctree::
:maxdepth: 2
:maxdepth: 2

pybigquery/api
README
alembic

Changelog
---------

For a list of all ``pybigquery`` releases:
For a list of all ``sqlalchemy-bigquery`` releases:

.. toctree::
:maxdepth: 2
Expand Down
7 changes: 0 additions & 7 deletions docs/multiprocessing.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/pybigquery/api.rst

This file was deleted.

6 changes: 3 additions & 3 deletions noxfile.py
Expand Up @@ -25,7 +25,7 @@


BLACK_VERSION = "black==19.10b0"
BLACK_PATHS = ["docs", "pybigquery", "tests", "noxfile.py", "setup.py"]
BLACK_PATHS = ["docs", "sqlalchemy_bigquery", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"

Expand Down Expand Up @@ -63,7 +63,7 @@ def lint(session):
session.run(
"black", "--check", *BLACK_PATHS,
)
session.run("flake8", "pybigquery", "tests")
session.run("flake8", "sqlalchemy_bigquery", "tests")


@nox.session(python=DEFAULT_PYTHON_VERSION)
Expand Down Expand Up @@ -114,7 +114,7 @@ def default(session):
"py.test",
"--quiet",
f"--junitxml=unit_{session.python}_sponge_log.xml",
"--cov=pybigquery",
"--cov=sqlalchemy_bigquery",
"--cov=tests/unit",
"--cov-append",
"--cov-config=.coveragerc",
Expand Down