Skip to content

Commit

Permalink
fix filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
nwlandry committed Nov 24, 2024
1 parent d669a91 commit a9c77e4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions benchmarks/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@

def test_construct_from_edgelist(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H.edges.members(),), {}

benchmark.pedantic(xgi.Hypergraph, setup=setup, rounds=10)


def test_construct_from_edgedict(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H.edges.members(dtype=dict),), {}

benchmark.pedantic(xgi.Hypergraph, setup=setup, rounds=10)


def test_construct_from_df(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (xgi.to_bipartite_pandas_dataframe(H),), {}

benchmark.pedantic(xgi.Hypergraph, setup=setup, rounds=10)


def test_node_memberships(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def node_memberships(H):
Expand All @@ -44,7 +44,7 @@ def node_memberships(H):

def test_edge_members(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def edge_members(H):
Expand All @@ -55,7 +55,7 @@ def edge_members(H):

def test_node_attributes(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def node_attributes(H):
Expand All @@ -66,7 +66,7 @@ def node_attributes(H):

def test_edge_attributes(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def edge_attributes(H):
Expand All @@ -77,7 +77,7 @@ def edge_attributes(H):

def test_degree(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def degree(H):
Expand All @@ -88,7 +88,7 @@ def degree(H):

def test_nodestats_degree(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def degree(H):
Expand All @@ -99,7 +99,7 @@ def degree(H):

def test_nodestats_degree(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def degree(H):
Expand All @@ -110,7 +110,7 @@ def degree(H):

def test_edge_size(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def degree(H):
Expand All @@ -121,7 +121,7 @@ def degree(H):

def test_isolates(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def isolates(H):
Expand All @@ -132,7 +132,7 @@ def isolates(H):

def test_singletons(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def singletons(H):
Expand All @@ -143,7 +143,7 @@ def singletons(H):

def test_copy(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def copy(H):
Expand All @@ -154,7 +154,7 @@ def copy(H):

def test_dual(benchmark):
def setup():
H = xgi.read_hif("email-enron.json")
H = xgi.read_hif("benchmarks/email-enron.json")
return (H,), {}

def dual(H):
Expand Down

0 comments on commit a9c77e4

Please sign in to comment.