-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore(migration): Migrate code from googleapis/python-bigquery-magics into packages/bigquery-magics #14924
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
Draft
parthea
wants to merge
78
commits into
main
Choose a base branch
from
migration.python-bigquery-magics.migration.2025-11-24_21-55-24.migrate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
chore(migration): Migrate code from googleapis/python-bigquery-magics into packages/bigquery-magics #14924
parthea
wants to merge
78
commits into
main
from
migration.python-bigquery-magics.migration.2025-11-24_21-55-24.migrate
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy of only files needed for %%bigquery magics, from https://github.com/googleapis/python-bigquery/tree/955a4cd99e21cbca1b2f9c1dc6aa3fd8070cd61f
* chore: copy magics unit tests from google-cloud-bigquery * update tests to use bigquery_magics module * remove auth from unit tests * fix coverage
* chore: synchronize with Python templates * add owlbot configuration * remove unknown paths from linter * use templated noxfile * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * multiple teams: see: googleapis/synthtool#946 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: grant api-bigquery and api-bigquery-dataframe teams write access to repo * add python 3.7 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: copy magics unit tests from google-cloud-bigquery * include google-cloud-testutils in unittests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use bqstorage extras * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use extras by python for everything * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update tests to use bigquery_magics module * remove auth from unit tests * fix coverage --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@d50980e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: google-cloud-policy-bot[bot] <80869356+google-cloud-policy-bot[bot]@users.noreply.github.com>
* chore: add the sample test for magics * re-arrange directory and make nox -s pass * chore: add the sample test for magics * chore: copy `%%bigquery` magics tests from google-cloud-bigquery (#8) * chore: copy magics unit tests from google-cloud-bigquery * update tests to use bigquery_magics module * remove auth from unit tests * fix coverage * re-arrange directory and make nox -s pass * delete files * test the version * chore: add the sample test for magics * re-arrange directory and make nox -s pass * chore: add the sample test for magics * chore: copy `%%bigquery` magics tests from google-cloud-bigquery (#8) * chore: copy magics unit tests from google-cloud-bigquery * update tests to use bigquery_magics module * remove auth from unit tests * fix coverage * re-arrange directory and make nox -s pass * delete files * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * delete files * address comments * fix the merging conflicts * set local version of variables * address comments * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Tim Sweña (Swast) <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* docs: clean up docs and let the nox pass * update the commit * clean up the README.rst to pass lint_setup_py * Trigger Build * address comments
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore: add samples and kokoro tests as required checks * update tests
* docs: update the IPython Magics docs
Update lingering links to google-cloud-bigquery.
Source-Link: googleapis/synthtool@a37f74c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
) Source-Link: googleapis/synthtool@14d8b28 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5651442a6336971a2fb2df40fb56b3337df67cafa14c0809cc89cb34ccee1b8e Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@9ae0785 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:52210e0e0559f5ea8c52be148b33504022e1faef4e95fbe4b32d68022af2fa7e Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: include bigquery-magics version number in the user agent * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Import version from bigquery_magics.version package to avoid circular dependency. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: https://togithub.com/googleapis/synthtool/commit/bef813d194de29ddf3576eda60148b6b3dcc93d9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:94bb690db96e6242b2567a4860a94d48fa48696d092e51b0884a1a2c0a79a407
🤖 I have created a release *beep* *boop* --- ## [0.1.1](https://togithub.com/googleapis/python-bigquery-magics/compare/v0.1.0...v0.1.1) (2024-08-22) ### Dependencies * Depend on ipykernel 5.5.6+ instead of 6.0+ ([83d8fac](https://togithub.com/googleapis/python-bigquery-magics/commit/83d8facf6d04752c1f8c5e25575a3975c9b30e1c)) ### Documentation * Correct links to project pages in README ([#33](https://togithub.com/googleapis/python-bigquery-magics/issues/33)) ([ace5020](https://togithub.com/googleapis/python-bigquery-magics/commit/ace5020ff8ae374145579e75cb996150680f2bde)) * Update the IPython Magics docs ([#27](https://togithub.com/googleapis/python-bigquery-magics/issues/27)) ([62e88b3](https://togithub.com/googleapis/python-bigquery-magics/commit/62e88b3f4a595ecdc4a00d661b956c5d50fd6c35)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
* feat: depends on pydata-google-auth to fetch credentials If the credentials are not set, the user will be guided through the OAuth flow. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add pydata-google-auth deps to 3.7 testing constraints. * fix typo --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* refactor: use dataclass for Context to reduce boilerplate * Fix test cover workflow. Ref: googleapis/python-bigquery-dataframes#948 * Fix field name * fix docstring indentation
#54) * refactor: break down _cell_magic() into several helper functions to improve readability * Fix import * fix test failures * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix type hint for pre 3.9 compatibility * remove unused variable in test --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@71a7297 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e8dcfd7cbfd8beac3a3ff8d3f3185287ea0625d859168cc80faccfc9a7a00455 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
…igframes' to support query results larger than 10 GB (#58) * define 'engine' field in the conext * use bigframes API when the context.engine says so * remove unnecessary deps * relax pip deps * undo pip deps * make bigframes an optional dependency * fix format * use 'is' for None checks * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * parametrize bigframes installation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * define unit_bf with bf installation to make owlbot happy * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * parametrize bf installation and disable owlbot enforcement on the noxfile * chang owlbot file to test optional bf deps * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* Multi-column support * Remove 'rows' field in results, as it's not used by the Javascript. Also, add a test for the multi-column case. * reformat * Fix test_bigquery.py tests, remove unnecessary mocking of GraphServer * reformat
…ook code; also, allow visualization when only some columns are json. (#102) * Multi-column support * Remove 'rows' field in results, as it's not used by the Javascript. Also, add a test for the multi-column case. * reformat * Fix test_bigquery.py tests, remove unnecessary mocking of GraphServer * reformat * Get basic graph visualization working against latest spanner code * Fix unit tests * Ignore columns we don't know how to visualize for visualization purposes, but still show them in the tabular view, and don't block visualizing remaining columns * reformat * Remove unused dependency on networkx * Implement stub callback for node expansion * Fix test_bigquery_graph_missing_spanner_deps. The mock query result must contain valid json so that the visualizer attempts to get launched, in order for the code path we're trying to test to get reached. * reformat * Add unit test for GraphServerHandler::handler_post_node_expansion() * Add test for invalid node expansion request * reformat * Tweaks to improve code coverage * More tweaks to improve code coverage * avoid list comprehension due to code coverage tooling * Fix visualization in colab. Problem is that, even though the port is not used in colab mode, the javascript still throws an error if it's undefined.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* Add spanner-graph-notebook, python-bigquery, and bigquery-storage to prerelease deps to be installed from main * reformat * Update noxfile.py * Update noxfile.py --------- Co-authored-by: Tim Sweña (Swast) <[email protected]>
`setup.cfg` contains a setting to create a `Universal Wheel` which is only needed if libraries support both Python 2 and Python 3. This library only supports Python 3 so this setting is no longer needed. See https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#wheels. See similar PR https://togithub.com/googleapis/google-cloud-python/pull/13659 which includes this stack trace ``` running bdist_wheel /tmp/pip-build-env-9o_3w17v/overlay/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:135: SetuptoolsDeprecationWarning: bdist_wheel.universal is deprecated !! ******************************************************************************** With Python 2.7 end-of-life, support for building universal wheels (i.e., wheels that support both Python 2 and Python 3) is being obviated. Please discontinue using this option, or if you still need it, file an issue with pypa/setuptools describing your use case. By 2025-Aug-30, you need to update your project and remove deprecated calls or your builds will no longer be supported. ******************************************************************************** !! ```
#110) This fixes an issue where forcegraph is unavailable for external server.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: add --pyformat option to use Python string formatting * use mock_credentials in magics tests * avoid typing issue in tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * avoid polluting global options with context tests * fix coverage --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: instrument vscode, jupyter and 3p plugin usage * add more test coverage * improve code coverage
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* deps: drop support for Python 3.7 and 3.8 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update owlbot lock * manuallly update github workflows * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * include unit test in owlbot templates * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update owlbot.py * exclude bigframes from 3.9 tests of min verions * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * manually sync noxfile changes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix prerelease --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…1.1.7` (#131) * chome: move spanner-graph-notebook back to version 1.1.6 * Fix graph visualization to work with latest spanner-graph-notebook library. * Remove debug logging * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
… sending them to JavaScript (#133) * chome: move spanner-graph-notebook back to version 1.1.6 * Fix graph visualization to work with latest spanner-graph-notebook library. * Remove debug logging * chore: Convert property fields to strings before sending them to Javascript. This avoids possible truncation in the Javascript layer when converting the JSON into Javascript objects, for example, converting a 64-bit integer into a Number. * Reformat and fix code coverage.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@16790a3 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:543e209e7c1c1ffe720eb4db1a3f045a75099304fb19aa11a47dc717b8aae2a9 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@6702a34 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:fbbc8db67afd8b7d71bf694c5081a32da0c528eba166fbcffb3b6e56ddf907d5 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This PR updates the SHA for the librarian language image to match the one [here](https://github.com/googleapis/google-cloud-python/blob/2feb74032fd9c5cc7eaf6072ab03e9e8397bd434/.librarian/state.yaml#L1C1-L1C170). Owlbot related files are also cleaned up
This PR updates the librarian language container image sha.
…s/main' into migration.python-bigquery-magics.migration.2025-11-24_21-55-24.migrate
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #14911.
This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.