Skip to content

Commit

Permalink
Ok advancing on coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Nov 12, 2024
1 parent c3ef9b8 commit b7fe008
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Binary file modified docs/examples/04_spice_cosimulation/netlist.raw
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/examples/false_transition.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions piel/flows/electro_optic.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from ..tools.qutip import fock_states_only_individual_modes
from ..models.frequency.defaults import get_default_models
from ..integration.thewalrus_qutip import fock_transition_probability_amplitude
from piel.tools.gdsfactory import get_netlist_recursive, get_netlist

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -288,7 +289,7 @@ def compose_network_matrix_from_models(

if netlist_function is None:
# Generate the netlist recursively
netlist = circuit_component.get_netlist_recursive(allow_multiple=True)
netlist = get_netlist_recursive(circuit_component, allow_multiple=True)

switch_instance_list_i = get_matched_model_recursive_netlist_instances(
recursive_netlist=netlist,
Expand Down Expand Up @@ -465,7 +466,7 @@ def generate_s_parameter_circuit_from_photonic_circuit(

if netlist_function is None:
# Step 2: Generate the netlist recursively
netlist = circuit.get_netlist_recursive(allow_multiple=True)
netlist = get_netlist_recursive(circuit, allow_multiple=True)
else:
netlist = netlist_function(circuit)

Expand All @@ -481,7 +482,7 @@ def generate_s_parameter_circuit_from_photonic_circuit(
Custom exception mapping.
"""
# Step 3: Identify the top-level circuit name
top_level_name = circuit.get_netlist()["name"]
top_level_name = get_netlist(circuit)["name"]

# Step 4: Get required measurement for the top-level circuit
required_models = sax.get_required_circuit_models(
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ branch = true
parallel = true
source = ["piel/"]
omit = [
"docs/examples/*",
"*/tests/*",
# "docs/examples/*",
# "tests/*",
"/nix/*"
]

Expand All @@ -213,6 +213,6 @@ sort = "-cover"
show_missing = true
omit = [
"docs/examples/*",
"*/tests/*",
"tests/*",
"/nix/*"
]
4 changes: 2 additions & 2 deletions scripts/test_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ for example in "${examples[@]}"; do
# Run the script with coverage
coverage run --branch --append "$example_file"
echo "Appending coverage to: ${COVERAGE_FILE}"
total=$(coverage report | tail -n1 | awk '{print $NF}' | tr -d '%')
echo "### Total coverage: ${total}%"
# total=$(coverage report | tail -n1 | awk '{print $NF}' | tr -d '%')
# echo "### Total coverage: ${total}%"

# Return to base directory
cd - > /dev/null
Expand Down

0 comments on commit b7fe008

Please sign in to comment.