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鈥檒l 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

Conversation

jimfulton
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #197 馃

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Jul 2, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 2, 2021
@tswast
Copy link
Collaborator

tswast commented Jul 2, 2021

Could we add a warning to setup.py and the README and make a release of pybigquery first? I'd like to make sure folk who look for the pybigquery package are able to find sqlalchemy-bigquery.

I'm thinking something similar to what we're doing here: https://pypi.org/project/google-cloud/

@jimfulton
Copy link
Contributor Author

jimfulton commented Jul 2, 2021

Could we add a warning to setup.py and the README and make a release of pybigquery first? I'd like to make sure folk who look for the pybigquery package are able to find sqlalchemy-bigquery.

I'm thinking something similar to what we're doing here: https://pypi.org/project/google-cloud/

In this case, we'd be telling people to install a package that doesn't exist, wouldn't we?

Note that pybigquery will continue to work indefinitely!

Daft plan, modified based on your comment:

  • Release an alpha of sqlalchemy-bigquery

  • Release an alpha of pybigquery that is a facade/shim for sqlalchemy-bigquery
    Non-alpha pybigquery works as expected.

    Prior to these releases, test with non-pypi installs.

  • Decide when to go to non-alpha. For sake of discussion, say, July 42. ;)

  • Make a pybigquery release that gives folks a heads up of the swap on July 42.

  • On July 42, release non-alpha sqlalchemy-bigquery and non-alpha pybigquery shim

    pybigquery shim still works but issues a deprecation warning.

    Old installs of pybigquery or installes of pinned versions still work as expected.

Thoughts @tswast ?

@jimfulton jimfulton requested a review from tswast July 2, 2021 20:39
@tswast
Copy link
Collaborator

tswast commented Jul 13, 2021

In this case, we'd be telling people to install a package that doesn't exist, wouldn't we?

True. Maybe we try to use some of the LTS client automation and keep around a pybigquery branch for backports? Or maybe we just manually publish a release of pybigquery once sqlalchemy-bigquery is available?

@jimfulton
Copy link
Contributor Author

jimfulton commented Jul 13, 2021 via email

.repo-metadata.json Outdated Show resolved Hide resolved
Co-authored-by: Tim Swast <swast@google.com>
@jimfulton
Copy link
Contributor Author

Note that we have to sort out the new name, since the new name was taken.

@cpdean
Copy link

cpdean commented Aug 1, 2021

Note that we have to sort out the new name, since the new name was taken.

Hey @jimfulton and @tswast , I have added Jim as an owner on https://pypi.org/project/sqlalchemy_bigquery/ , and added a redirect notice on my old project at https://github.com/cpdean/sqlalchemy-bigquery .

Let me know if there's anything else I can do to help.

@jimfulton
Copy link
Contributor Author

Note that we have to sort out the new name, since the new name was taken.

Hey @jimfulton and @tswast , I have added Jim as an owner on https://pypi.org/project/sqlalchemy_bigquery/ , and added a redirect notice on my old project at https://github.com/cpdean/sqlalchemy-bigquery .

Let me know if there's anything else I can do to help.

@cpdean Thank you very much!

@jimfulton
Copy link
Contributor Author

@tswast are you good with this?

Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Looking good! A couple minor comments. I think we can merge this sooner rather than later.

"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

except ImportError:
pass
else: # pragma: NO COVER
if not hasattr(pybigquery, "__version__"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious what the not hasattr is doing. Could you add a comment about this? If __version__ is present it's less likely to conflict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a holdover from the shim, I think. The shim would have that attribute. I'll get rid of it.

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

@jimfulton
Copy link
Contributor Author

Looking good! A couple minor comments. I think we can merge this sooner rather than later.

I also just removed the api module, which we'd discussed, but that I just remembered. :)

sqlalchemy_bigquery/__init__.py Show resolved Hide resolved
sqlalchemy_bigquery/__init__.py Outdated Show resolved Hide resolved
@jimfulton jimfulton marked this pull request as ready for review August 6, 2021 15:43
@jimfulton jimfulton requested a review from a team as a code owner August 6, 2021 15:43
README.rst Outdated
Comment on lines 99 to 103
.. 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

@jimfulton jimfulton merged commit a6f0a5d into googleapis:master Aug 10, 2021
@jimfulton jimfulton deleted the sqlalchemy-bigquery-197 branch August 10, 2021 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standardize name and package layout in preparation for general availability and version 1.0
3 participants