-
Notifications
You must be signed in to change notification settings - Fork 121
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: accepts a table ID, which downloads the table without a query #443
feat: accepts a table ID, which downloads the table without a query #443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with just a few nits.
pandas_gbq/gbq.py
Outdated
def download_table( | ||
self, table_id, max_results=None, progress_bar_type=None, dtypes=None | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) Maybe completely annotate new methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a start, Dict[str, any]
is probably just fine, especially if type checks are not implemented yet. Let's just make sure it's consistent with the docstring, the latter currently says Optional[Map[str, Union[str, pandas.Series.dtype]]]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
The two comments are non-blocking.
(making the annotation consistent with the docstring and excluding the TYPE_CHECKING imports from coverage)
pandas_gbq/gbq.py
Outdated
if typing.TYPE_CHECKING: | ||
import pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will never be executed during the tests (TYPE_CHECKING
is False
at runtime), thus at some point coverage will complain. Let's add a # pragma: NO COVER
comment to ignore this block.
…-bigquery-pandas into issue266-read_gbq-no-query
This reverts commit a9075df.
Thanks for the review @plamut! |
🤖 I have created a release *beep* *boop* --- ## [0.17.0](v0.16.0...v0.17.0) (2022-01-19) ### ⚠ BREAKING CHANGES * use nullable Int64 and boolean dtypes if available (#445) ### Features * accepts a table ID, which downloads the table without a query ([#443](#443)) ([bf0e863](bf0e863)) * use nullable Int64 and boolean dtypes if available ([#445](#445)) ([89078f8](89078f8)) ### Bug Fixes * `read_gbq` supports extreme DATETIME values such as `0001-01-01 00:00:00` ([#444](#444)) ([d120f8f](d120f8f)) * `to_gbq` allows strings for DATE and floats for NUMERIC with `api_method="load_parquet"` ([#423](#423)) ([2180836](2180836)) * allow extreme DATE values such as `datetime.date(1, 1, 1)` in `load_gbq` ([#442](#442)) ([e13abaf](e13abaf)) * avoid iteritems deprecation in pandas prerelease ([#469](#469)) ([7379cdc](7379cdc)) * use data project for destination in `to_gbq` ([#455](#455)) ([891a00c](891a00c)) ### Miscellaneous Chores * release 0.17.0 ([#470](#470)) ([29ac8c3](29ac8c3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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:
Fixes #266 🦕