From 10807d267e62c28e8aa0af87bac62fd18a46ed27 Mon Sep 17 00:00:00 2001 From: faizanfatmi Date: Thu, 4 Jun 2026 18:24:08 +0530 Subject: [PATCH 1/5] Fix test_setup_map for newer Folium versions --- tests/test_maps.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_maps.py b/tests/test_maps.py index de9b8e63f..4b3ecf94a 100644 --- a/tests/test_maps.py +++ b/tests/test_maps.py @@ -39,7 +39,7 @@ def test_draw_map(states): def test_setup_map(): """ Tests that passing kwargs doesn't error. """ kwargs1 = { - 'tiles': 'Stamen Toner', + 'tiles': 'OpenStreetMap', 'zoom_start': 17, 'width': 960, 'height': 500, @@ -47,7 +47,7 @@ def test_setup_map(): } """ Tests features as NumPy array. """ kwargs2 = { - 'tiles': 'Stamen Toner', + 'tiles': 'OpenStreetMap', 'zoom_start': 17, 'width': 960, 'height': 500, @@ -161,14 +161,13 @@ def test_marker_copy(): assert lon == b_lat_lon[1] def test_background_color_condition_white(): - # Test the condition when the background color is white (all 'f' in the hex code) marker = ds.Marker(0, 0, color='#ffffff') - assert marker._folium_kwargs['icon'].options['textColor'], 'gray' + assert marker._folium_kwargs['icon'].options['text_color'] == 'gray' def test_background_color_condition_not_white(): # Test the condition when the background color is not white marker = ds.Marker(0, 0, color='#ff0000') - assert marker._folium_kwargs['icon'].options['textColor'], 'white' + assert marker._folium_kwargs['icon'].options['text_color'] == 'white' def test_icon_args_icon_not_present(): # Test when 'icon' key is not present in icon_args From 4aed1b7201ee040e9d5fa83d54c640f322f3806c Mon Sep 17 00:00:00 2001 From: faizanfatmi Date: Thu, 4 Jun 2026 18:41:19 +0530 Subject: [PATCH 2/5] Support text_color and textColor in tests --- tests/test_maps.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/test_maps.py b/tests/test_maps.py index 4b3ecf94a..981bf79a2 100644 --- a/tests/test_maps.py +++ b/tests/test_maps.py @@ -162,12 +162,21 @@ def test_marker_copy(): def test_background_color_condition_white(): marker = ds.Marker(0, 0, color='#ffffff') - assert marker._folium_kwargs['icon'].options['text_color'] == 'gray' + +text_color = marker._folium_kwargs['icon'].options.get('text_color') +if text_color is None: + text_color = marker._folium_kwargs['icon'].options.get('textColor') + +assert text_color == 'gray' def test_background_color_condition_not_white(): - # Test the condition when the background color is not white marker = ds.Marker(0, 0, color='#ff0000') - assert marker._folium_kwargs['icon'].options['text_color'] == 'white' + +text_color = marker._folium_kwargs['icon'].options.get('text_color') +if text_color is None: + text_color = marker._folium_kwargs['icon'].options.get('textColor') + +assert text_color == 'white' def test_icon_args_icon_not_present(): # Test when 'icon' key is not present in icon_args From b9cc9b6c65a3d61465332b5423aaad3376fdd466 Mon Sep 17 00:00:00 2001 From: faizanfatmi Date: Thu, 4 Jun 2026 18:50:47 +0530 Subject: [PATCH 3/5] Fix flake8 undefined marker issue --- tests/test_maps.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/test_maps.py b/tests/test_maps.py index 981bf79a2..5f81c7861 100644 --- a/tests/test_maps.py +++ b/tests/test_maps.py @@ -163,20 +163,21 @@ def test_marker_copy(): def test_background_color_condition_white(): marker = ds.Marker(0, 0, color='#ffffff') -text_color = marker._folium_kwargs['icon'].options.get('text_color') -if text_color is None: - text_color = marker._folium_kwargs['icon'].options.get('textColor') + text_color = marker._folium_kwargs['icon'].options.get('text_color') + if text_color is None: + text_color = marker._folium_kwargs['icon'].options.get('textColor') + + assert text_color == 'gray' -assert text_color == 'gray' def test_background_color_condition_not_white(): marker = ds.Marker(0, 0, color='#ff0000') -text_color = marker._folium_kwargs['icon'].options.get('text_color') -if text_color is None: - text_color = marker._folium_kwargs['icon'].options.get('textColor') + text_color = marker._folium_kwargs['icon'].options.get('text_color') + if text_color is None: + text_color = marker._folium_kwargs['icon'].options.get('textColor') -assert text_color == 'white' + assert text_color == 'white' def test_icon_args_icon_not_present(): # Test when 'icon' key is not present in icon_args From a4c4e6d3a278a29698c6e9aeb83b74abdb3fc0db Mon Sep 17 00:00:00 2001 From: faizanfatmi Date: Thu, 4 Jun 2026 18:58:32 +0530 Subject: [PATCH 4/5] Trigger workflow From 9961a811e1368c99fd6faf21d22f205e71ed3db0 Mon Sep 17 00:00:00 2001 From: faizanfatmi Date: Thu, 4 Jun 2026 19:14:19 +0530 Subject: [PATCH 5/5] Remove unused global declaration --- datascience/tables.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/datascience/tables.py b/datascience/tables.py index 51298c885..79b11c3f1 100644 --- a/datascience/tables.py +++ b/datascience/tables.py @@ -3183,7 +3183,7 @@ def interactive_plots(cls): >>> table.plot('days') # doctest: +SKIP """ - global _INTERACTIVE_PLOTS + _INTERACTIVE_PLOTS = True if go is None or make_subplots is None: cls._import_plotly() @@ -3217,7 +3217,7 @@ def static_plots(cls): >>> table.plot('days') # doctest: +SKIP """ - global _INTERACTIVE_PLOTS + _INTERACTIVE_PLOTS = False def plot(self, column_for_xticks=None, select=None, overlay=True, width=None, height=None, **vargs): @@ -3265,7 +3265,7 @@ def plot(self, column_for_xticks=None, select=None, overlay=True, width=None, he >>> table.plot('days', 'price') # doctest: +SKIP """ - global _INTERACTIVE_PLOTS + if _INTERACTIVE_PLOTS: return self.iplot(column_for_xticks, select, overlay, width, height, **vargs) @@ -3586,7 +3586,7 @@ def bar(self, column_for_categories=None, select=None, overlay=True, width=None, See http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.bar for additional arguments that can be passed into vargs. """ - global _INTERACTIVE_PLOTS + if _INTERACTIVE_PLOTS: show = vargs.pop('show', True) return self.ibar( @@ -3780,7 +3780,7 @@ def barh(self, column_for_categories=None, select=None, overlay=True, width=None >>> t.barh('Furniture', make_array(1, 2)) # doctest: +SKIP """ - global _INTERACTIVE_PLOTS + if _INTERACTIVE_PLOTS: show = vargs.pop('show', True) return self.ibarh( @@ -4015,7 +4015,7 @@ def scatter(self, column_for_x, select=None, overlay=True, fit_line=False, >>> table.scatter('x', fit_line=True) # doctest: +SKIP """ - global _INTERACTIVE_PLOTS + if _INTERACTIVE_PLOTS: return self.iscatter( column_for_x = column_for_x, @@ -4404,7 +4404,7 @@ def scatter3d(self, column_for_x, column_for_y, select=None, overlay=True, fit_l