FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: load_table_from_dataframe for higher scale decimal by Gaurang033 · Pull Request #1703 · googleapis/python-bigquery · GitHub

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
/ python-bigquery Public archive

fix: load_table_from_dataframe for higher scale decimal - #1703

Merged
Linchin merged 3 commits into
googleapis:mainfrom
Gaurang033:feature/fix_1650
Dec 18, 2023
Merged

fix: load_table_from_dataframe for higher scale decimal#1703
Linchin merged 3 commits into
googleapis:mainfrom
Gaurang033:feature/fix_1650

Conversation

Copy link
Copy Markdown
Contributor

Fixes #1650

Gaurang033 requested review from a team and farhan0102 October 25, 2023 18:18
product-auto-label Bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels Oct 25, 2023
Gaurang033 force-pushed the feature/fix_1650 branch 3 times, most recently from e3573d3 to d72d05e Compare October 31, 2023 23:51
Gaurang033 force-pushed the feature/fix_1650 branch 2 times, most recently from 269be64 to aa343a0 Compare November 5, 2023 04:13
Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2023
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2023
Gaurang033 force-pushed the feature/fix_1650 branch 3 times, most recently from 628d53c to 7ca7abe Compare November 11, 2023 14:06
tswast added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2023
tswast requested review from Linchin and chalmerlowe and removed request for farhan0102 November 22, 2023 20:04
yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2023
Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023

Linchin commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

@Gaurang033 please fix the test failures

Copy link
Copy Markdown
Contributor Author

@Gaurang033 please fix the test failures

could you help me understand which test is failing. I tried checking in logs but couldn't find much information.
https://source.cloud.google.com/results/invocations/570f5627-61a7-4aa7-8f1d-76eabc56918f/log

Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2023
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2023

Linchin commented Dec 11, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Hi @Gaurang033, thank you so much for your contribution, we really appreciate it.
I took a look at the log, and it seems coverage test is failing. Seeing from the log, line 521 in google/cloud/bigquery/_pandas_helpers.py wasn't run during unit tests. We probably need to make some changes to the unit test to ensure this line is covered. Usually, we require 100% unit test coverage for any commit to merge. If you need any help doing it, I'm more than willing to help.

nox > coverage report --show-missing --fail-under=100
Name                                                         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------------------------
google/cloud/bigquery/_helpers.py                              291      0    152      0   100%
google/cloud/bigquery/_http.py                                  16      0      0      0   100%
google/cloud/bigquery/_job_helpers.py                           94      0     20      0   100%
google/cloud/bigquery/_pandas_helpers.py                       360      1    193      1    99%   521
google/cloud/bigquery/_pyarrow_helpers.py                       27      0      4      0   100%
google/cloud/bigquery/_tqdm_helpers.py                          55      0     20      0   100%
google/cloud/bigquery/_versions_helpers.py                      76      0     20      0   100%
google/cloud/bigquery/client.py                                855      0    318      0   100%
google/cloud/bigquery/dataset.py                               383      0     95      0   100%
google/cloud/bigquery/dbapi/__init__.py                         30      0      0      0   100%
google/cloud/bigquery/dbapi/_helpers.py                        170      0     96      0   100%
google/cloud/bigquery/dbapi/connection.py                       37      0     14      0   100%
... ...
--------------------------------------------------------------------------------------------------------
TOTAL                                                        27251      1   2797      1    99%
Coverage failure: total of 99 is less than fail-under=100
nox > Command coverage report --show-missing --fail-under=100 failed with exit code 2
nox > Session cover failed.

Just to make it more efficient for you in the future, you can see a rundown of all test results if you scroll down to the bottom of the logs (kokoro test especially):

Gaurang033 commented Dec 14, 2023
edited
Loading

Copy link
Copy Markdown
Contributor Author

Hi @Gaurang033, thank you so much for your contribution, we really appreciate it. I took a look at the log, and it seems coverage test is failing. Seeing from the log, line 521 in google/cloud/bigquery/_pandas_helpers.py wasn't run during unit tests. We probably need to make some changes to the unit test to ensure this line is covered. Usually, we require 100% unit test coverage for any commit to merge. If you need any help doing it, I'm more than willing to help.

nox > coverage report --show-missing --fail-under=100
Name                                                         Stmts   Miss Branch BrPart  Cover   Missing
--------------------------------------------------------------------------------------------------------
google/cloud/bigquery/_helpers.py                              291      0    152      0   100%
google/cloud/bigquery/_http.py                                  16      0      0      0   100%
google/cloud/bigquery/_job_helpers.py                           94      0     20      0   100%
google/cloud/bigquery/_pandas_helpers.py                       360      1    193      1    99%   521
google/cloud/bigquery/_pyarrow_helpers.py                       27      0      4      0   100%
google/cloud/bigquery/_tqdm_helpers.py                          55      0     20      0   100%
google/cloud/bigquery/_versions_helpers.py                      76      0     20      0   100%
google/cloud/bigquery/client.py                                855      0    318      0   100%
google/cloud/bigquery/dataset.py                               383      0     95      0   100%
google/cloud/bigquery/dbapi/__init__.py                         30      0      0      0   100%
google/cloud/bigquery/dbapi/_helpers.py                        170      0     96      0   100%
google/cloud/bigquery/dbapi/connection.py                       37      0     14      0   100%
... ...
--------------------------------------------------------------------------------------------------------
TOTAL                                                        27251      1   2797      1    99%
Coverage failure: total of 99 is less than fail-under=100
nox > Command coverage report --show-missing --fail-under=100 failed with exit code 2
nox > Session cover failed.

Just to make it more efficient for you in the future, you can see a rundown of all test results if you scroll down to the bottom of the logs (kokoro test especially):

I am running coverge using following, however my result is different then I see in logs.
nox -R -s unit-3.8 nox -s cover

product-auto-label Bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Dec 14, 2023
Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 18, 2023
yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 18, 2023

Linchin commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

Thank you @Gaurang033 for fixing the coverage test :)
LGTM

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client.load_table_from_dataframe() sometimes chooses invalid column type

4 participants


Back | FazBrowse Home | New Git URL