Skip to content

Fix portless sub-netlists and internal-port handling#97

Merged
flaport merged 3 commits into
mainfrom
fix/portless-subnets-and-internal-port-handling
Mar 3, 2026
Merged

Fix portless sub-netlists and internal-port handling#97
flaport merged 3 commits into
mainfrom
fix/portless-subnets-and-internal-port-handling

Conversation

@flaport

@flaport flaport commented Feb 26, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • Updated 4 existing tests to expect drop-by-default behavior
  • Added 2 new tests in test_circuit.py for portless sub-netlists (no ports key / empty ports dict)
  • Added 5 new tests in test_probes.py covering all three on_internal_port modes, hierarchical composition port dropping, explicit probes after dropping, and probe-into-portless-subnetlist ordering
  • All 58 tests pass (pytest src/tests/ -v --ignore=src/tests/test_nbs.py)

Closes #95, closes #96

🤖 Generated with Claude Code

- Filter out sub-netlists with no ports in circuit() to prevent errors
  during construction of hierarchical netlists.
- Change default behavior for ports on internal connection nodes: drop
  them instead of auto-converting to probes. Add on_internal_port flag
  to circuit() with modes "warn" (default), "ignore", and "as_probes".
- Update and add tests for both fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Feb 26, 2026
@flaport flaport merged commit 21fb5ea into main Mar 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hierarchical cell ports incorrectly auto-converted to probes when cell becomes top-level Filtering out empty netlists

1 participant