Skip to content

Commit ab72705

Browse files
authored
Merge pull request #690 from xgi-org/dev
Patch v0.10.1
2 parents c712685 + b51b1fe commit ab72705

10 files changed

Lines changed: 30 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## v0.10.1
4+
5+
* Fix slow test collection and matplotlib GUI popups. [#686](https://github.com/xgi-org/xgi/pull/686) (@leotrs)
6+
* Speedup imports. [#676](https://github.com/xgi-org/xgi/pull/676) (@nwlandry)
7+
* Update hypergraph_matrix.py. [#682](https://github.com/xgi-org/xgi/pull/682) (@GavinAnderberg)
8+
* fix JSON error. [#677](https://github.com/xgi-org/xgi/pull/677) (@nwlandry)
9+
* Improved the hypergraph equality method. [#671](https://github.com/xgi-org/xgi/pull/671) (@nwlandry)
10+
* Add eq methods to IDView and IDStat. [#646](https://github.com/xgi-org/xgi/pull/646) (@nwlandry)
11+
* added 2 gallery examples. [#669](https://github.com/xgi-org/xgi/pull/669) (@maximelucas)
12+
313
## v0.10
414
* Added a recipe for community detection. [#668](https://github.com/xgi-org/xgi/pull/668) (@nwlandry)
515
* Added a community detection module and a method for community detection using spectral clustering. [#665](https://github.com/xgi-org/xgi/pull/665) (@kaiser-dan)
@@ -423,4 +433,4 @@ Contributors: @iaciac, @leotrs, @lordgrilo, @maximelucas, @nwlandry, and @tlaroc
423433
* Added functions for finding and removing isolates
424434
* Refactored the `has_edge()` method in the Hypergraph class.
425435

426-
Contributors: @leotrs, @maximelucas, and @nwlandry
436+
Contributors: @leotrs, @maximelucas, and @nwlandry

tests/communities/test_spectral.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def test_errors_num_clusters(self):
5454
with pytest.raises(XGIError):
5555
xgi.spectral_clustering(H, 6)
5656

57+
@pytest.mark.skip("Inconsistent seeding across macOS 3.11 - 3.13")
5758
def test_perfectly_separable_low_dimensions(self):
5859
H = xgi.Hypergraph(
5960
[

tests/drawing/test_draw.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_draw(edgelist8):
1414
fig, ax = plt.subplots()
1515
ax, collections = xgi.draw(H, ax=ax)
1616

17-
(node_collection, dyad_collection, edge_collection) = collections
17+
node_collection, dyad_collection, edge_collection = collections
1818

1919
# number of elements
2020
assert len(ax.lines) == 0
@@ -39,7 +39,7 @@ def test_draw(edgelist8):
3939

4040
fig, ax = plt.subplots()
4141
ax, collections = xgi.draw(S, ax=ax)
42-
(node_collection, dyad_collection, edge_collection) = collections
42+
node_collection, dyad_collection, edge_collection = collections
4343

4444
# number of elements
4545
assert len(ax.lines) == 0
@@ -236,12 +236,12 @@ def test_draw_hyperedges(edgelist8):
236236

237237
fig, ax = plt.subplots()
238238
ax, collections = xgi.draw_hyperedges(H, ax=ax)
239-
(dyad_collection, edge_collection) = collections
239+
dyad_collection, edge_collection = collections
240240
fig2, ax2 = plt.subplots()
241241
ax2, collections2 = xgi.draw_hyperedges(
242242
H, ax=ax2, dyad_color="r", edge_fc="r", dyad_lw=3, dyad_style="--"
243243
)
244-
(dyad_collection2, edge_collection2) = collections2
244+
dyad_collection2, edge_collection2 = collections2
245245

246246
# number of elements
247247
assert len(ax.lines) == 0
@@ -279,7 +279,7 @@ def test_draw_hyperedges(edgelist8):
279279
# negative node_lw or node_size
280280
with pytest.raises(ValueError):
281281
ax, collections = xgi.draw_hyperedges(H, ax=ax, dyad_lw=-1)
282-
(dyad_collection, edge_collection) = collections
282+
dyad_collection, edge_collection = collections
283283
plt.close("all")
284284

285285
plt.close("all")
@@ -292,7 +292,7 @@ def test_draw_hyperedges_fc_cmap(edgelist8):
292292
# default cmap
293293
fig, ax = plt.subplots()
294294
ax, collections = xgi.draw_hyperedges(H, ax=ax)
295-
(dyad_collection, edge_collection) = collections
295+
dyad_collection, edge_collection = collections
296296
assert dyad_collection.get_cmap() == plt.cm.Greys
297297
assert edge_collection.get_cmap() == xgi.crest_r()
298298
plt.close("all")
@@ -303,7 +303,7 @@ def test_draw_hyperedges_fc_cmap(edgelist8):
303303
ax, collections = xgi.draw_hyperedges(
304304
H, ax=ax, dyad_color=dyad_colors, dyad_color_cmap="Greens", edge_fc_cmap="Blues"
305305
)
306-
(dyad_collection, edge_collection) = collections
306+
dyad_collection, edge_collection = collections
307307
assert dyad_collection.get_cmap() == plt.cm.Greens
308308
assert edge_collection.get_cmap() == plt.cm.Blues
309309

@@ -325,7 +325,7 @@ def test_draw_hyperedges_fc_cmap(edgelist8):
325325
edge_vmin=14,
326326
edge_vmax=19,
327327
)
328-
(dyad_collection, edge_collection) = collections
328+
dyad_collection, edge_collection = collections
329329
plt.colorbar(dyad_collection)
330330
plt.colorbar(edge_collection)
331331
assert (14, 19) == edge_collection.get_clim()
@@ -353,7 +353,7 @@ def test_draw_hyperedges_ec(edgelist8):
353353
# edge stat color
354354
fig, ax = plt.subplots()
355355
ax, collections = xgi.draw_hyperedges(H, ax=ax, edge_ec=H.edges.size, edge_fc="w")
356-
(_, edge_collection) = collections
356+
_, edge_collection = collections
357357

358358
assert np.all(edge_collection.get_edgecolor() == colors)
359359
plt.close("all")
@@ -369,7 +369,7 @@ def test_draw_simplices(edgelist8):
369369

370370
fig, ax = plt.subplots()
371371
ax, collections = xgi.draw_simplices(S, ax=ax)
372-
(dyad_collection, edge_collection) = collections
372+
dyad_collection, edge_collection = collections
373373

374374
# number of elements
375375
assert len(ax.lines) == 0
@@ -395,7 +395,7 @@ def test_draw_hypergraph_hull(edgelist8):
395395
fig, ax = plt.subplots()
396396
ax, collections = xgi.draw(H, ax=ax, hull=True)
397397

398-
(node_collection, dyad_collection, edge_collection) = collections
398+
node_collection, dyad_collection, edge_collection = collections
399399

400400
# number of elements
401401
assert len(ax.lines) == 0

tests/linalg/test_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def test_fix_647():
673673

674674
# Eigenvalues non-negative
675675
evals_mwe = eigvalsh(L)
676-
assert np.all(evals_mwe >= 0)
676+
assert np.all(evals_mwe >= -1e-12)
677677

678678
# Weights error handling
679679
## Default value when "weight" attribute unavailable

tools/generate_changelog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
This is a script to determine which PRs have been merges since the last
128128
release, or between two releases on the same branch.
129129
"""
130+
130131
import argparse
131132
import os
132133
import re

tutorials/in_depth/In Depth 1 - Drawing nodes.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
"source": [
389389
"ax, collections = xgi.draw(H, pos=pos, node_fc=H.nodes.degree())\n",
390390
"\n",
391-
"(node_collection, _, _) = collections\n",
391+
"node_collection, _, _ = collections\n",
392392
"\n",
393393
"plt.colorbar(node_collection, label=\"Node Degree\", shrink=0.8, ticks=[1, 2, 3])"
394394
]

tutorials/in_depth/In Depth 2 - Drawing hyperedges.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@
407407
" edge_fc=H.edges.size,\n",
408408
")\n",
409409
"\n",
410-
"(node_collection, dyad_collection, edge_collection) = collections\n",
410+
"node_collection, dyad_collection, edge_collection = collections\n",
411411
"plt.colorbar(node_collection, label=\"nodes\")\n",
412412
"plt.colorbar(dyad_collection, label=\"dyads\")\n",
413413
"plt.colorbar(edge_collection, label=\"edges\")\n",

xgi/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
from .readwrite import *
2424
from .stats import *
2525

26-
27-
__version__ = "0.10"
26+
__version__ = "0.10.1"

xgi/convert/hif_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Methods for converting to/from HIF standard."""
22

3+
import math
34
from collections import defaultdict
45

56
from ..core import DiHypergraph, Hypergraph, SimplicialComplex
67
from ..utils import IDDict
78
from .bipartite_edges import to_bipartite_edgelist
8-
import math
99

1010
__all__ = ["to_hif_dict", "from_hif_dict"]
1111

xgi/drawing/draw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ def draw_node_labels(
10841084

10851085
text_items = {}
10861086
for idx, label in node_labels.items():
1087-
(x, y) = pos[idx]
1087+
x, y = pos[idx]
10881088

10891089
if not isinstance(label, str):
10901090
label = str(label)

0 commit comments

Comments
 (0)