fix(pybind): give enum default arguments a valid python repr in signatures - #653
fix(pybind): give enum default arguments a valid python repr in signatures#653leonardocarreras wants to merge 1 commit into
Conversation
abf0b39 to
33879f1
Compare
There was a problem hiding this comment.
DPsim LLM review
Claim vs. code: matches the description.
TL;DR: One confirmed documentation nit remains for a new public pybind helper, while the rest of the report is a broad low-confidence docs-coverage sweep that does not indicate a functional regression in the enum-repr fix. The binding change itself appears to address the stated signature issue, and no correctness, scheduling, or equation problems were surfaced.
Found 1 medium (1 anchored to lines below).
🟡 Suggestions
- Missing Doxygen comment for logLevelArg
[medium · 80% confidence]indpsim/include/dpsim/pybind/Utils.h:33(details inline)
Claim vs. implementation
- Claimed: Give enum default arguments valid Python reprs in pybind signatures, using a helper for LogLevel defaults and inline arg_v for PhaseType defaults.
- Done: Adds a logLevelArg helper that maps CPS::Logger::Level defaults to explicit dpsimpy.LogLevel repr strings and replaces many loglevel defaults across DP/EMT/SP bindings, plus two PhaseType arg_v uses.
- Difference: none
How this review was produced
13 specialized finder passes raised 72 findings over the diff and the full changed sources. After de-duplication, 72 were re-checked against the current file and the base-class / interface headers it inherits (code as truth), escalating survivors to a stronger model: 11 refuted as unsupported, 61 kept (60 tentative).
Refuted by verification:
- Incorrect getter/setter attribute name for CurrentSource I_ref (dpsim/src/pybind/EMTComponents.cpp): The binding uses createAttributeGetterCPS::MatrixComp("I_ref") and the setter name is only the expected typo target on line 333, not a V_ref getter mismatch.
- Incorrect attribute getter for I_ref in EMT Ph3 CurrentSource binding (dpsim/src/pybind/EMTComponents.cpp): Line 332 reads createAttributeGetterCPS::MatrixComp("I_ref"), so it does not read from V_ref.
- Missing default argument for 'name' parameter in logLevelArg (dpsim/src/pybind/Utils.cpp): The header already declares the default argument
const char *name = "loglevel", and C++ requires defaults only on the declaration, not the definition. - Missing include for in Utils.cpp (dpsim/src/pybind/Utils.cpp):
std::stringis used in this file, but it is provided transitively by the includeddpsim/pybind/Utils.h/DPsim headers, so the file does not show a missing include defect. - Add default argument to logLevelArg (dpsim/include/dpsim/pybind/Utils.h): The declaration already includes the default argument
const char *name = "loglevel"on line 33. - Fix misnamed property getter for I_ref in CurrentSource (dpsim/src/pybind/EMTComponents.cpp): The I_ref property getter is already named "I_ref" on line 332, so the claimed misnaming is not present.
- Add missing default argument to logLevelArg declaration (dpsim/include/dpsim/pybind/Utils.h): The header declaration itself has the default value for
name, so there is no missing default-argument mismatch here. - Add missing default value for the name parameter in logLevelArg (dpsim/src/pybind/Utils.cpp): The definition omitting the default is valid because the default is already present in the header declaration.
- Potential nullptr description in logLevelArg default case (dpsim/src/pybind/Utils.cpp): The default branch leaves
descrnull only for unsupported enum values; all knownCPS::Logger::Levelcases are handled explicitly before thepy::arg_vcall. - Attribute setter type mismatch for R (dpsim/src/pybind/SPComponents.cpp): The R property is intentionally typed as Real on both sides in the same line, and the setter template argument is the only mismatch; this is a clear typo in the finding, not a code defect because the file already shows the property binding itself.
- Potential nullptr description in py::arg_v (dpsim/src/pybind/Utils.cpp):
py::arg_vis called withdescrafter exhaustive handling of the enum values used here, so the claimed null-description path is only for invalid/unexpected values.
Automated, non-blocking review. May be wrong. Models: find mistral-small-4-119b-2603, gpt-oss-120b → verify gpt-5.4-mini → final gpt-5.5.
| }; | ||
| } | ||
|
|
||
| py::arg_v logLevelArg(CPS::Logger::Level level, const char *name = "loglevel"); |
There was a problem hiding this comment.
Missing Doxygen comment for logLevelArg
severity: medium · confidence: 80%
Public function logLevelArg is declared without any explanatory comment or Doxygen documentation, violating the convention that public classes/methods have an explanatory comment.
Suggested fix: Add a Doxygen comment describing the purpose, parameters, and return value of logLevelArg.
| py::arg_v logLevelArg(CPS::Logger::Level level, const char *name = "loglevel"); | |
| /** | |
| * Helper to create a py::arg_v for CPS::Logger::Level with a Python-friendly representation. | |
| * @param level The default logger level. | |
| * @param name The argument name (default "loglevel"). | |
| * @return py::arg_v with the appropriate default value and description. | |
| */ | |
| py::arg_v logLevelArg(CPS::Logger::Level level, const char *name = "loglevel"); |
Checked against the source: logLevelArg is a new public header declaration with no preceding explanatory or Doxygen comment
stage: naming-docs
There was a problem hiding this comment.
DPsim LLM review
Claim vs. code: matches the description.
TL;DR: The only substantive issue surfaced is a broad docs-coverage gap for newly exposed Python components across DP, EMT, and SP submodules; the binding/signature change itself did not surface correctness, scheduling, or equation problems. Most findings are near-duplicate missing-page reports, so the main maintainer action is to add the absent documentation pages and verify the generated signatures remain valid for enum defaults.
Found 60 medium (0 anchored to lines below).
🔵 Optional / low-confidence (60)
- Add documentation for DP::Ph1::NetworkInjection
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/NetworkInjection.md - Add documentation for DP::Ph1::PiLine
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/PiLine.md - Add documentation for DP::Ph1::RXLoad
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/RXLoad.md - Add documentation for DP::Ph1::Shunt
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/Shunt.md - Add documentation for DP::Ph1::Switch
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/Switch.md - Add documentation for DP::Ph1::varResSwitch
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/varResSwitch.md - Add documentation for DP::Ph1::AvVoltSourceInverterStateSpace
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/AvVoltSourceInverterStateSpace.md - Add documentation for DP::Ph1::SynchronGeneratorIdeal
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGeneratorIdeal.md - Add documentation for DP::Ph1::SynchronGeneratorTrStab
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGeneratorTrStab.md - Add documentation for DP::Ph1::SynchronGenerator3OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator3OrderVBR.md - Add documentation for DP::Ph1::SynchronGenerator4OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator4OrderVBR.md - Add documentation for DP::Ph1::SynchronGenerator5OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator5OrderVBR.md - Add documentation for DP::Ph1::SynchronGenerator6aOrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator6aOrderVBR.md - Add documentation for DP::Ph1::SynchronGenerator6bOrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator6bOrderVBR.md - Add documentation for DP::Ph1::SynchronGenerator4OrderTPM
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator4OrderTPM.md - Add documentation for DP::Ph1::SynchronGenerator4OrderPCM
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator4OrderPCM.md - Add documentation for DP::Ph1::SynchronGenerator6OrderPCM
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/SynchronGenerator6OrderPCM.md - Add documentation for DP::Ph1::AvVoltageSourceInverterDQ
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/AvVoltageSourceInverterDQ.md - Add documentation for DP::Ph1::Inverter
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/Inverter.md - Add documentation for DP::Ph1::Transformer
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/Transformer.md - Add documentation for DP::Ph3::NetworkInjection
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph3/NetworkInjection.md - Add documentation for DP::Ph3::PiLine
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph3/PiLine.md - Add documentation for EMT::DC::VoltageSource
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/VoltageSource.md - Add documentation for EMT::DC::CurrentSource
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/CurrentSource.md - Add documentation for EMT::DC::Resistor
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/Resistor.md - Add documentation for EMT::DC::Capacitor
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/Capacitor.md - Add documentation for EMT::DC::Inductor
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/Inductor.md - Add documentation for EMT::DC::PiLine
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/PiLine.md - Add documentation for EMT::Ph1::Switch
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph1/Switch.md - Add documentation for EMT::Ph3::NetworkInjection
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/NetworkInjection.md - Add documentation for EMT::Ph3::PiLine
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/PiLine.md - Add documentation for EMT::Ph3::RXLoad
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/RXLoad.md - Add documentation for EMT::Ph3::Shunt
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/Shunt.md - Add documentation for EMT::Ph3::Switch
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/Switch.md - Add documentation for EMT::Ph3::SynchronGeneratorIdeal
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGeneratorIdeal.md - Add documentation for EMT::Ph3::SynchronGeneratorDQTrapez
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGeneratorDQTrapez.md - Add documentation for EMT::Ph3::VSIVoltageControlVCO
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/VSIVoltageControlVCO.md - Add documentation for EMT::Ph3::SynchronGenerator3OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGenerator3OrderVBR.md - Add documentation for EMT::Ph3::SynchronGenerator4OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGenerator4OrderVBR.md - Add documentation for EMT::Ph3::SynchronGenerator5OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGenerator5OrderVBR.md - Add documentation for EMT::Ph3::SynchronGenerator6aOrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGenerator6aOrderVBR.md - Add documentation for EMT::Ph3::SynchronGenerator6bOrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SynchronGenerator6bOrderVBR.md - Add documentation for EMT::Ph3::AvVoltageSourceInverterDQ
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/AvVoltageSourceInverterDQ.md - Add documentation for EMT::Ph3::Transformer
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/Transformer.md - Add documentation for EMT::Ph3::SeriesSwitch
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SeriesSwitch.md - Add documentation for EMT::Ph3::SSN_GFM
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/SSN_GFM.md - Add documentation for SP::Ph1::NetworkInjection
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/NetworkInjection.md - Add documentation for SP::Ph1::PiLine
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/PiLine.md - Add documentation for SP::Ph1::Shunt
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/Shunt.md - Add documentation for SP::Ph1::Load
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/Load.md - Add documentation for SP::Ph1::Switch
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/Switch.md - Add documentation for SP::Ph1::SynchronGenerator
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGenerator.md - Add documentation for SP::Ph1::SynchronGeneratorTrStab
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGeneratorTrStab.md - Add documentation for SP::Ph1::SynchronGenerator3OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGenerator3OrderVBR.md - Add documentation for SP::Ph1::SynchronGenerator4OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGenerator4OrderVBR.md - Add documentation for SP::Ph1::SynchronGenerator5OrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGenerator5OrderVBR.md - Add documentation for SP::Ph1::SynchronGenerator6aOrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGenerator6aOrderVBR.md - Add documentation for SP::Ph1::SynchronGenerator6bOrderVBR
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/SynchronGenerator6bOrderVBR.md - Add documentation for SP::Ph1::AvVoltageSourceInverterDQ
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/AvVoltageSourceInverterDQ.md - Add documentation for SP::Ph1::Transformer
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/Transformer.md
Claim vs. implementation
- Claimed: Give enum default arguments valid Python reprs in pybind signatures by adding a helper and updating bindings.
- Done: Adds a logLevelArg helper that maps Logger::Level defaults to explicit dpsimpy.LogLevel repr strings and replaces many loglevel defaults, plus a few PhaseType defaults, across DP/EMT/SP bindings.
- Difference: none
How this review was produced
13 specialized finder passes raised 87 findings over the diff and the full changed sources. After de-duplication, 87 were re-checked against the current file and the base-class / interface headers it inherits (code as truth), escalating survivors to a stronger model: 27 refuted as unsupported, 60 kept (60 tentative).
Refuted by verification:
- Incorrect attribute name for CurrentSource I_ref setter (dpsim/src/pybind/EMTComponents.cpp): The I_ref property setter is bound to createAttributeSetterCPS::MatrixComp("V_ref") on line 333, but the file clearly shows the property name and getter are I_ref; the claim is about a typo in the setter, not a missing binding
- Incorrect attribute name in CurrentSource Python binding (dpsim/src/pybind/EMTComponents.cpp): Line 332 binds the getter as createAttributeGetterCPS::MatrixComp("I_ref"), so the getter is not named V_ref
- Add missing default argument to logLevelArg (dpsim/include/dpsim/pybind/Utils.h): The header already declares logLevelArg with the default name parameter
const char *name = "loglevel"on line 33. - Incorrect attribute getter for I_ref in EMT Ph3 CurrentSource (dpsim/src/pybind/EMTComponents.cpp): The getter on line 332 uses "I_ref" and not "V_ref"
- Add default argument to logLevelArg (dpsim/include/dpsim/pybind/Utils.h): The claimed missing default is present in the declaration itself:
const char *name = "loglevel". - Incorrect attribute getter for I_ref in CurrentSource (dpsim/src/pybind/EMTComponents.cpp): The getter for I_ref is correctly bound to createAttributeGetterCPS::MatrixComp("I_ref")
- Mismatched attribute type for R in SP Ph1 Resistor (dpsim/src/pybind/SPComponents.cpp): The Ph1 Resistor binding exposes R with createAttributeGetterCPS::Real("R") and createAttributeSetterCPS::Complex("R") on the same line pair, but the file’s own code shows the setter type mismatch is in the binding and the claim is about a changed line that is not a defect in the source as written because the attribute access pattern is the only exposed code here
- Typo in attribute getter name for CurrentSource I_ref (dpsim/src/pybind/EMTComponents.cpp): The getter name matches the property name I_ref on line 332
- Typo in attribute setter name for Resistor R (dpsim/src/pybind/EMTComponents.cpp): The Resistor binding uses def_property("R", createAttributeGetterCPS::Real("R"), createAttributeSetterCPS::Real("R")) so getter and setter names match
- Typo in attribute getter name for Resistor R (dpsim/src/pybind/EMTComponents.cpp): Line 203 shows the getter is also "R", matching the setter
- Typo in attribute setter name for Capacitor C (dpsim/src/pybind/EMTComponents.cpp): The Capacitor binding uses def_property("C", createAttributeGetterCPS::Real("C"), createAttributeSetterCPS::Real("C"))
- Typo in attribute getter name for Capacitor C (dpsim/src/pybind/EMTComponents.cpp): Line 230 shows both getter and setter use "C"
- Typo in attribute getter name for Inductor L (dpsim/src/pybind/EMTComponents.cpp): The Inductor getter is createAttributeGetterCPS::Real("L") on line 203
- Typo in attribute setter name for Inductor L (dpsim/src/pybind/EMTComponents.cpp): The Inductor setter is createAttributeSetterCPS::Real("L") on line 204, matching the getter
- Typo in attribute getter name for VoltageSource V_ref (dpsim/src/pybind/EMTComponents.cpp): The VoltageSource getter is createAttributeGetterCPS::Complex("V_ref") on line 170
Automated, non-blocking review. May be wrong. Models: find mistral-small-4-119b-2603, gpt-oss-120b → verify gpt-5.4-mini → final gpt-5.5.
…tures Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
33879f1 to
95660dc
Compare
There was a problem hiding this comment.
DPsim LLM review
Found 7 high, 12 medium, 3 low (0 anchored to lines below).
🔵 Optional / low-confidence (22)
- Incorrect attribute getter for I_ref in CurrentSource
[high · 35% confidence · unconfirmed]indpsim/src/pybind/EMTComponents.cpp:333 - Add missing default argument to logLevelArg
[high · 35% confidence · unconfirmed]indpsim/include/dpsim/pybind/Utils.h:33 - Add missing default argument to logLevelArg
[high · 35% confidence · unconfirmed]indpsim/src/pybind/Utils.cpp:11 - Incorrect attribute setter type for resistance
[high · 35% confidence · unconfirmed]indpsim/src/pybind/SPComponents.cpp:56 - Setter name typo for current source attribute
[high · 35% confidence · unconfirmed]indpsim/src/pybind/EMTComponents.cpp:332 - Inconsistent argument name for loglevel default
[high · 35% confidence · unconfirmed]indpsim/src/pybind/EMTComponents.cpp:470 - Inconsistent argument name for loglevel default
[high · 35% confidence · unconfirmed]indpsim/src/pybind/EMTComponents.cpp:779 - Add missing default argument name in logLevelArg declaration
[medium · 35% confidence · unconfirmed]indpsim/include/dpsim/pybind/Utils.h:33 - Inconsistent default argument name in logLevelArg definition
[medium · 35% confidence · unconfirmed]indpsim/src/pybind/Utils.cpp:11 - Missing default argument name in return statement of logLevelArg
[medium · 35% confidence · unconfirmed]indpsim/src/pybind/Utils.cpp:38 - Avoid string formatting inside hot path in getAttributeList
[medium · 35% confidence · unconfirmed]indpsim/src/pybind/Utils.cpp:44 - Provide default argument description for logLevelArg
[medium · 35% confidence · unconfirmed]indpsim/src/pybind/Utils.cpp:11 - Add documentation for DP Ph1 components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph1/_index.md - Add documentation for DP Ph3 components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/DP/ph3/_index.md - Add documentation for EMT DC components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/dc/_index.md - Add documentation for EMT Ph1 components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph1/_index.md - Add documentation for EMT Ph3 components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/EMT/ph3/_index.md - Add documentation for SP Ph1 components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph1/_index.md - Add documentation for SP Ph3 components affected by loglevel change
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/SP/ph3/_index.md - Fix incorrect getter for I_ref attribute in EMT Ph3 CurrentSource binding
[low · 35% confidence · unconfirmed]indpsim/src/pybind/EMTComponents.cpp:333 - Add default argument to logLevelArg for name parameter
[low · 35% confidence · unconfirmed]indpsim/include/dpsim/pybind/Utils.h:33 - Typo in attribute getter name for I_ref
[low · 35% confidence · unconfirmed]indpsim/src/pybind/EMTComponents.cpp:333
How this review was produced
13 specialized finder passes raised 22 findings over the diff and the full changed sources. After de-duplication, 22 were re-checked against the current file and the base-class / interface headers it inherits (code as truth), escalating survivors to a stronger model: 0 refuted as unsupported, 22 kept (22 tentative).
Automated, non-blocking review. May be wrong. Models: find mistral-small-4-119b-2603, gpt-oss-120b → verify gpt-5.4-mini → final gpt-5.5.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #653 +/- ##
==========================================
+ Coverage 71.80% 72.72% +0.91%
==========================================
Files 512 512
Lines 33188 33216 +28
Branches 17935 17936 +1
==========================================
+ Hits 23831 24156 +325
+ Misses 9356 9048 -308
- Partials 1 12 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



pybind11 bakes an enum default argument's
repr()into the docstring signature, so everyloglevelandphase_typedefault came out as<LogLevel.off: 6>, which is not a Python expression. pybind11-stubgen logs an ERROR for each one during the wheel build and the resulting signature is useless to a type checker.Adds a
logLevelArg()helper returning apy::arg_vwith an explicit repr, used at the 80 call sites across the DP, EMT and SP bindings, plus inlinepy::arg_vfor the twoPhaseTypedefaults. Docstrings now readloglevel: dpsimpy.LogLevel = dpsimpy.LogLevel.off.