betodealmeida commented on code in PR #21002:
URL: https://github.com/apache/superset/pull/21002#discussion_r947942417
##########
superset/examples/helpers.py:
##########
@@ -73,14 +70,5 @@ def get_slice_json(defaults: Dict[Any, Any], **kwargs: Any)
-> str:
return json.dumps(defaults_copy, indent=4, sort_keys=True)
-def get_example_data(
- filepath: str, is_gzip: bool = True, make_bytes: bool = False
-) -> BytesIO:
- content = request.urlopen( # pylint: disable=consider-using-with
- f"{BASE_URL}{filepath}?raw=true"
- ).read()
- if is_gzip:
- content = zlib.decompress(content, zlib.MAX_WBITS | 16)
- if make_bytes:
- content = BytesIO(content)
- return content
+def get_example_url(filepath: str) -> str:
+ return f"{BASE_URL}{filepath}?raw=true"
Review Comment:
Nice!
##########
superset/utils/pandas_postprocessing/contribution.py:
##########
@@ -49,6 +49,9 @@ def contribution(
"""
contribution_df = df.copy()
numeric_df = contribution_df.select_dtypes(include=["number", Decimal])
+ # TODO: copy needed due to following regression in 1.4, remove if not
needed:
+ # https://github.com/pandas-dev/pandas/issues/48090
+ numeric_df = numeric_df.copy()
Review Comment:
Awesome!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]