GeezerVison is showing github.com — Core: Make build_api_url an instance method. by busunkim96 · Pull Request #8747 · googleapis/google-cloud-python
Conversation
See #8737.
Hmm, that @classmethod looks a little bogus to me. All actual uses of it are via instances:
$ git grep "\.build_api_url"
bigquery/tests/unit/test__http.py: self.assertEqual(conn.build_api_url("/foo"), URI)
bigquery/tests/unit/test__http.py: uri = conn.build_api_url("/foo", {"bar": "baz"})
bigquery/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
bigquery/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
core/google/cloud/_http.py: url = self.build_api_url(
core/tests/unit/test__http.py: self.assertEqual(conn.build_api_url("/foo"), URI)
core/tests/unit/test__http.py: uri = conn.build_api_url("/foo", {"bar": "baz", "qux": ["quux", "corge"]})
dns/tests/unit/test__http.py: self.assertEqual(conn.build_api_url("/foo"), URI)
dns/tests/unit/test__http.py: uri = conn.build_api_url("/foo", {"bar": "baz"})
dns/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
logging/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
resource_manager/tests/unit/test__http.py: self.assertEqual(conn.build_api_url("/foo"), URI)
resource_manager/tests/unit/test__http.py: uri = conn.build_api_url("/foo", {"bar": "baz"})
resource_manager/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
runtimeconfig/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
storage/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
storage/tests/unit/test__http.py: self.assertEqual(conn.build_api_url("/foo"), URI)
storage/tests/unit/test__http.py: uri = conn.build_api_url("/foo", {"bar": "baz"})
translate/tests/unit/test__http.py: self.assertEqual(conn.build_api_url("/foo"), URI)
translate/tests/unit/test__http.py: uri = conn.build_api_url("/foo", query_params=query_params)
translate/tests/unit/test__http.py: expected_uri = conn.build_api_url("/rainbow")
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@busunkim96 This is a case where we'd actually like to test the change against the affected API libraries (bigquery, dns, logging, resource_manager, runtime_config, storage, translate), but our heuristic for determining whether to run them can't detect that. Can you verify that they still pass with this change?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
busunkim96
commented
Jul 25, 2019
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
BigQuery unit test failures seem to be unrelated:
=================================== FAILURES ===================================
___________________ test_bq_to_arrow_array_w_special_floats ____________________
module_under_test = <module 'google.cloud.bigquery._pandas_helpers' from '/tmpfs/src/github/google-cloud-python/bigquery/google/cloud/bigquery/_pandas_helpers.py'>
@pytest.mark.skipif(pandas is None, reason="Requires `pandas`")
@pytest.mark.skipif(pyarrow is None, reason="Requires `pyarrow`")
def test_bq_to_arrow_array_w_special_floats(module_under_test):
bq_field = schema.SchemaField("field_name", "FLOAT64")
rows = [float("-inf"), float("nan"), float("inf"), None]
series = pandas.Series(rows, dtype="object")
arrow_array = module_under_test.bq_to_arrow_array(series, bq_field)
roundtrip = arrow_array.to_pylist()
assert len(rows) == len(roundtrip)
assert roundtrip[0] == float("-inf")
> assert roundtrip[1] != roundtrip[1] # NaN doesn't equal itself.
E assert None != None
tests/unit/test__pandas_helpers.py:491: AssertionError
=============================== warnings summary =============```
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The BigQuery failure is likely due to a new version of a dependency (pyarrow would be my guess).
The Logging failure is a known flakiness in systest teardown, #8676.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Also, a rebase would likely fix the BigQuery failure, if you'd like to do that first.
|
busunkim96 reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|