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 21 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
8 changes: 4 additions & 4 deletions .repo-metadata.json
@@ -1,10 +1,10 @@
{
"name": "pybigquery",
"name": "sqlalchemy-bigquery",
"name_pretty": "SQLAlchemy dialect for BigQuery",
"client_documentation": "https://github.com/googleapis/pybigquery",
"client_documentation": "https://github.com/googleapis/sqlalchemy-bigquery",
jimfulton marked this conversation as resolved.
Show resolved Hide resolved
"release_level": "beta",
"language": "python",
"library_type": "INTEGRATION",
"repo": "googleapis/python-bigquery-sqlalchemy",
"distribution_name": "pybigquery"
}
"distribution_name": "sqlalchemy-bigquery"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need extra comma now that we added api_id

Suggested change
"distribution_name": "sqlalchemy-bigquery"
"distribution_name": "sqlalchemy-bigquery",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

}
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -2,7 +2,7 @@

[PyPI History][1]

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

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

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Expand Up @@ -188,7 +188,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
16 changes: 8 additions & 8 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 @@ -98,7 +98,7 @@ API Client

.. code-block:: python

from pybigquery.api import ApiClient
from sqlalchemy_bigquery.api import ApiClient
api_client = ApiClient()
print(api_client.dry_run_query(query=sqlstr).total_bytes_processed)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this code sample now that we don't have an ApiClient

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dang, I did yesterday, but I guess that change lost in my docfx flailing. Thanks, will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


Expand Down
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
4 changes: 2 additions & 2 deletions docs/index.rst
Expand Up @@ -9,12 +9,12 @@ API Reference
.. toctree::
:maxdepth: 2

pybigquery/api
sqlalchemy-bigquery/api

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/pybigquery/api.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/sqlalchemy-bigquery/api.rst
@@ -0,0 +1,7 @@
sqlalchemy-bigquery API
=======================

.. automodule:: sqlalchemy_bigquery.api
:members:
:undoc-members:
:inherited-members:
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
10 changes: 5 additions & 5 deletions owlbot.py
Expand Up @@ -33,7 +33,7 @@
cov_level=100
)
s.move(templated_files, excludes=[
# pybigquery was originally licensed MIT
# sqlalchemy-bigquery was originally licensed MIT
"LICENSE"
])

Expand All @@ -44,17 +44,17 @@
s.replace(
[".coveragerc"],
"google/cloud/__init__.py",
"pybigquery/requirements.py",
"sqlalchemy_bigquery/requirements.py",
)

s.replace(
["noxfile.py"],
r"[\"']google[\"']",
'"pybigquery"',
'"sqlalchemy_bigquery"',
)

s.replace(
["noxfile.py"], "google/cloud", "pybigquery",
["noxfile.py"], "google/cloud", "sqlalchemy_bigquery",
)

def place_before(path, text, *before_text, escape=None):
Expand Down Expand Up @@ -192,7 +192,7 @@ def compliance(session):
"""universal = 1

[sqla_testing]
requirement_cls=pybigquery.requirements:Requirements
requirement_cls=sqlalchemy_bigquery.requirements:Requirements
profile_file=.sqlalchemy_dialect_compliance-profiles.txt

[tool:pytest]
Expand Down
4 changes: 2 additions & 2 deletions release-procedure.md
@@ -1,4 +1,4 @@
# pybigquery release procedure
# sqlalchemy-bigquery release procedure

* Checkout master branch

Expand Down Expand Up @@ -26,7 +26,7 @@

* Try out test PyPI package

pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pybigquery
pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple sqlalchemy-bigquery

* Upload to PyPI

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -19,7 +19,7 @@
universal = 1

[sqla_testing]
requirement_cls=pybigquery.requirements:Requirements
requirement_cls=sqlalchemy_bigquery.requirements:Requirements
profile_file=.sqlalchemy_dialect_compliance-profiles.txt

[tool:pytest]
Expand Down
23 changes: 15 additions & 8 deletions setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (c) 2017 The PyBigQuery Authors
# Copyright (c) 2017 The sqlalchemy-bigquery Authors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,12 +19,13 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

import io
import os
import re
from setuptools import setup

# Package metadata.

name = "pybigquery"
version = "0.10.0"
name = "sqlalchemy-bigquery"
description = "SQLAlchemy dialect for BigQuery"

# Should be one of:
Expand All @@ -33,6 +34,10 @@
# 'Development Status :: 5 - Production/Stable'
release_status = "Development Status :: 4 - Beta"

package_root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(package_root, "sqlalchemy_bigquery", "version.py")) as f:
version = re.search('__version__ = "([^"]+)"', f.read()).group(1)


def readme():
with io.open("README.rst", "r", encoding="utf8") as f:
Expand All @@ -45,9 +50,9 @@ def readme():
description=description,
long_description=readme(),
long_description_content_type="text/x-rst",
author="The PyBigQuery Authors",
author="The Sqlalchemy-Bigquery Authors",
author_email="googleapis-packages@google.com",
packages=["pybigquery"],
packages=["sqlalchemy_bigquery"],
url="https://github.com/googleapis/python-bigquery-sqlalchemy",
keywords=["bigquery", "sqlalchemy"],
classifiers=[
Expand All @@ -74,8 +79,10 @@ def readme():
python_requires=">=3.6, <3.10",
tests_require=["pytz"],
entry_points={
"sqlalchemy.dialects": [
"bigquery = pybigquery.sqlalchemy_bigquery:BigQueryDialect"
]
"sqlalchemy.dialects": ["bigquery = sqlalchemy_bigquery:BigQueryDialect"]
},
# Document that this replaces pybigquery, however, this isn't
# enforced by pip, because doing so would allow rogue packages to
# obsolete legitimate ones.
obsoletes=["pybigquery"],
)