feat(compiler): add params_map for setting-to-field name mapping - #41
Merged
Conversation
Add `params_map` parameter to `compile_netlist()` and `compile_circuit()` to rename netlist setting keys to model field names before compilation. This allows users to decouple netlist setting names from the underlying model's expected field names, resolving issue #40.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
cdaunt
marked this pull request as ready for review
July 30, 2026 15:26
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
params_mapparameter tocompile_netlist()andcompile_circuit()that renames netlist setting keys to model field names before compilation{"thermal_heater": {"length": "length_um"}}Closes #40
Test plan
test_params_map_renames_setting— single key rename workstest_params_map_none_is_noop— default None doesn't change behaviortest_params_map_unmapped_keys_pass_through— unmatched keys pass throughtest_params_map_multiple_renames— multiple keys renamed in one componenttest_params_map_through_compile_circuit— threads through high-level API, DC solve succeedstest_params_map_dc_matches_direct— mapped circuit DC result matches direct compilation🤖 Generated with Claude Code
https://claude.ai/code/session_011yNsfyNipiGFMPmBDfMpfu