Skip to content

Conversation

Gaurang033
Copy link
Contributor

Fixes #1650

@Gaurang033 Gaurang033 requested review from a team as code owners October 25, 2023 18:18
@Gaurang033 Gaurang033 requested a review from farhan0102 October 25, 2023 18:18
@product-auto-label 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 Gaurang033 force-pushed the feature/fix_1650 branch 3 times, most recently from e3573d3 to d72d05e Compare October 31, 2023 23:51
@Gaurang033 Gaurang033 force-pushed the feature/fix_1650 branch 2 times, most recently from 269be64 to aa343a0 Compare November 5, 2023 04:13
@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 6, 2023
@Gaurang033 Gaurang033 force-pushed the feature/fix_1650 branch 3 times, most recently from 628d53c to 7ca7abe Compare November 11, 2023 14:06
@tswast tswast added the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2023
@tswast tswast requested review from Linchin and chalmerlowe and removed request for farhan0102 November 22, 2023 20:04
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Nov 22, 2023
@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
@Linchin Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 1, 2023
@Linchin
Copy link
Contributor

Linchin commented Dec 5, 2023

@Gaurang033 please fix the test failures

@Gaurang033
Copy link
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 Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 11, 2023
@Linchin
Copy link
Contributor

Linchin commented Dec 11, 2023

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):
image

@Gaurang033
Copy link
Contributor Author

Gaurang033 commented Dec 14, 2023

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): image

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 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 Linchin added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 18, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 18, 2023
@Linchin
Copy link
Contributor

Linchin commented Dec 18, 2023

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

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 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