diff --git a/archetypal/utils.py b/archetypal/utils.py index 6ec1810a..dae35245 100644 --- a/archetypal/utils.py +++ b/archetypal/utils.py @@ -20,7 +20,6 @@ import numpy as np import pandas as pd -from pandas.io.json import json_normalize from path import Path from tqdm.auto import tqdm @@ -366,7 +365,7 @@ def load_umi_template(json_template): with open(json_template) as f: dicts = json.load(f, object_pairs_hook=OrderedDict) - return [{key: json_normalize(value)} for key, value in dicts.items()] + return [{key: pd.json_normalize(value)} for key, value in dicts.items()] else: raise ValueError("File {} does not exist".format(json_template)) diff --git a/archetypal/zone_graph.py b/archetypal/zone_graph.py index 71b31950..0ab3a00c 100644 --- a/archetypal/zone_graph.py +++ b/archetypal/zone_graph.py @@ -459,7 +459,7 @@ def plot_graph2d( G = networkx.convert_node_labels_to_integers(G, label_attribute="name") tree = networkx.dfs_tree(G) pos = layout_function(tree, *func_args) - with plt.style.context((plt_style)): + with plt.style.context(plt_style): if ax: fig = plt.gcf() else: diff --git a/requirements.txt b/requirements.txt index 9d28c85f..6743e5b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ networkx~=2.6.1 eppy==0.5.60 # for stability matplotlib~=3.4 # because of TwoSlopesNorm pycountry~=20.7.3 -scikit-learn~=1.0.2 -pandas>=1.2.0,<2.0 +scikit-learn +pandas>=2.0.3 numpy>=1.17 tqdm tabulate~=0.8.9 @@ -20,4 +20,4 @@ energy-pandas validator_collection pint<=0.19 typing_extensions -pydantic-settings \ No newline at end of file +pydantic-settings diff --git a/tests/test_zonegraph.py b/tests/test_zonegraph.py index a6db9e3d..b6ba89b9 100644 --- a/tests/test_zonegraph.py +++ b/tests/test_zonegraph.py @@ -88,7 +88,7 @@ def test_viewgraph2d(self, G): font_size=8, color_nodes="core", node_labels_to_integers=True, - plt_style="seaborn", + plt_style="ggplot", save=False, show=False, filename="test",