-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from nikosavola/interactive_netlist
Add interactive netlist plotting
- Loading branch information
Showing
4 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from pathlib import Path | ||
|
||
import pytest | ||
from gdsfactory.samples.demo.lvs import pads_correct | ||
|
||
from gplugins.klayout.get_netlist import get_l2n | ||
from gplugins.klayout.plot_nets import plot_nets | ||
|
||
|
||
@pytest.fixture | ||
def klayout_netlist(tmp_path): | ||
c = pads_correct() | ||
|
||
gdspath = c.write_gds(gdsdir=tmp_path) | ||
l2n = get_l2n(gdspath) | ||
netlist_path = str(Path(tmp_path) / f"{c.name}.txt") | ||
l2n.write_l2n(netlist_path) | ||
return netlist_path | ||
|
||
|
||
def test_plot_nets(klayout_netlist): | ||
plot_nets(klayout_netlist) | ||
|
||
|
||
def test_plot_nets_interactive(klayout_netlist): | ||
plot_nets(klayout_netlist, interactive=True) | ||
assert Path("connectivity.html").exists() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters