Skip to content

Update python versions #4492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Jan 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f108db7
add 3.10 tests, remove 3.6 + 3.7
LiamConnors Jan 22, 2024
4fc892e
check only for near equality
LiamConnors Jan 22, 2024
6391f3f
fix function call
LiamConnors Jan 22, 2024
b40f5e4
add py311 tests
LiamConnors Jan 22, 2024
d8bb3b2
add python 3.11 in workflows
LiamConnors Jan 22, 2024
ab92c7d
fix function call
LiamConnors Jan 22, 2024
2f6a186
update for python 3.11 and later
LiamConnors Jan 22, 2024
8185cc5
Update test_figure_factory.py
LiamConnors Jan 22, 2024
4f5006b
Update test_figure_factory.py
LiamConnors Jan 22, 2024
f86e0fb
add statsmodels version
LiamConnors Jan 22, 2024
fc42fda
add python 3.12 tests
LiamConnors Jan 22, 2024
bb73b70
Update test_figure_factory.py
LiamConnors Jan 22, 2024
f51c371
Update test_figure_factory.py
LiamConnors Jan 22, 2024
3a22960
only run polars/vaex tests on 3.11 or earlier
LiamConnors Jan 22, 2024
315ccd4
Update _county_choropleth.py
LiamConnors Jan 22, 2024
c2c9c7d
update
LiamConnors Jan 22, 2024
635e933
Update test_to_from_plotly_json.py
LiamConnors Jan 22, 2024
709fb99
update docs requirements
LiamConnors Jan 22, 2024
f3b427a
Update requirements.txt
LiamConnors Jan 22, 2024
a2236ee
Update requirements.txt
LiamConnors Jan 22, 2024
b4c3a70
update docs page to use same versions as docs
LiamConnors Jan 22, 2024
5725d6d
Update requirements.txt
LiamConnors Jan 22, 2024
1dfcb3e
Update requirements.txt
LiamConnors Jan 22, 2024
e0b22d8
Update ml-regression.md
LiamConnors Jan 22, 2024
37116fb
Update requirements.txt
LiamConnors Jan 22, 2024
aa5965d
Update setup.py
LiamConnors Jan 22, 2024
8abb152
update pandas version
LiamConnors Jan 22, 2024
8655c10
Update ml-pca.md
LiamConnors Jan 22, 2024
0bdd6e0
Update conda_build_config.yaml
LiamConnors Jan 22, 2024
9602b65
Update requirements.txt
LiamConnors Jan 22, 2024
045778a
Update CHANGELOG.md
LiamConnors Jan 22, 2024
13809ac
Update requirements.txt
LiamConnors Jan 22, 2024
ca597f9
Update CHANGELOG.md
LiamConnors Jan 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_figure_factory.py
  • Loading branch information
LiamConnors committed Jan 22, 2024
commit bb73b70b5e239a8a1994ba3c76aec50ae1bb2a52
Original file line number Diff line number Diff line change
Expand Up @@ -4310,20 +4310,24 @@ def test_optional_arguments(self):


class TestHexbinMapbox(NumpyTestUtilsMixin, TestCaseNoTemplate):
def assert_dict_almost_equal(self, dict1, dict2, decimal=7):
def compare_list_values(self, list1, list2, decimal=7):
assert len(list1) == len(list2), "Lists are not of the same length."
for i in range(len(list1)):
if isinstance(list1[i], list):
self.compare_list_values(list1[i], list2[i], decimal=decimal)
elif isinstance(list1[i], float):
np.testing.assert_almost_equal(list1[i], list2[i], decimal=decimal)
else:
assert (
list1[i] == list2[i]
), f"Values at index {i} are not equal: {list1[i]} != {list2[i]}"

def compare_dict_values(self, dict1, dict2, decimal=7):
for k, v in dict1.items():
if isinstance(v, dict):
self.assert_dict_almost_equal(v, dict2[k], decimal=decimal)
self.compare_dict_values(v, dict2[k], decimal=decimal)
elif isinstance(v, list):
for i in range(len(v)):
if isinstance(v[i], float):
np.testing.assert_almost_equal(
v[i], dict2[k][i], decimal=decimal
)
else:
assert (
v[i] == dict2[k][i]
), f"Values at index {i} for key {k} are not equal: {v[i]} != {dict2[k][i]}"
self.compare_list_values(v, dict2[k], decimal=decimal)
elif isinstance(v, float):
np.testing.assert_almost_equal(v, dict2[k], decimal=decimal)
else:
Expand Down Expand Up @@ -4437,7 +4441,7 @@ def test_aggregation(self):

actual_agg = [2.0, 2.0, 1.0, 3.0, 9.0]

self.assert_dict_almost_equal(fig1.data[0].geojson, actual_geojson)
self.compare_dict_values(fig1.data[0].geojson, actual_geojson)
assert np.array_equal(fig1.data[0].z, actual_agg)

fig2 = ff.create_hexbin_mapbox(
Expand Down