Skip to content

Commit

Permalink
fix precompilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pszufe committed Feb 27, 2020
1 parent 583f977 commit 173e184
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 32 deletions.
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
MIT License

Copyright (c) 2018 Bogumił Kamiński

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SimpleHypergraphs"
uuid = "aa4a32ff-dd5d-5357-90e3-e7a9512f0501"
authors = ["Przemysław Szufel <[email protected]>", "Bogumił Kamiński <[email protected]>", "Carmine Spagnuolo <[email protected]>", "Alessia Antelmi <[email protected]>"]
version = "0.1.7"
version = "0.1.8"

[deps]
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
Expand Down
52 changes: 26 additions & 26 deletions examples/viz/Visualizing_hypergraphs.ipynb

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/SimpleHypergraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export draw

const hnx = PyNULL()
const nx = PyNULL()
const pynull = PyNULL()


function __init__()
Expand All @@ -47,9 +48,13 @@ function __init__()
@warn "Python HyperNetX not found. Plotting functionality will not work."
plot_ok = false
end
@eval const support_hypernetx = $plot_ok
end

function support_hypernetx()
return ((SimpleHypergraphs.nx != SimpleHypergraphs.pynull) &&
(SimpleHypergraphs.hnx != SimpleHypergraphs.pynull))

end

include("hypergraph.jl")
include("bipartite.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/viz/drawing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function draw(
with_node_labels::Bool=true,
label_alpha::Float64=.35
)
if (!SimpleHypergraphs.support_hypernetx)
if (!SimpleHypergraphs.support_hypernetx())
throw("HyperNetX is not installed in Python used by this Julia. Install HyperNetX and reload SimpleHypergraphs.jl")
end

Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ end

@testset "SimpleHypergraphs hypernetx bridge" begin

if (!SimpleHypergraphs.support_hypernetx)
if (!SimpleHypergraphs.support_hypernetx())
@warn "HyperNetX is not installed. Skipping hypernetx tests"
return
end
Expand Down

0 comments on commit 173e184

Please sign in to comment.