Fix Pushover Analysis Example - #326
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
==========================================
+ Coverage 71.45% 71.65% +0.20%
==========================================
Files 23 23
Lines 9911 9911
==========================================
+ Hits 7082 7102 +20
+ Misses 2829 2809 -20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
de1696f to
e4394ed
Compare
Lambda functions only have access to the scope of the environment they are called in. Any additional variables from where they are defined must be explicitly passed in. Pass local variables in via a default argument to avoid a `NameError` when called in another module during analysis. Resolves JWock82#325
e4394ed to
135c347
Compare
|
Thanks for the contribution. I can see why this approach is useful in your case, and I don’t think there’s anything wrong with it technically. For this example, though, I’d like to keep the code as simple and approachable as possible. Most new users won’t be calling the example from another module, so adding the explicit Because this seems specific to your workflow rather than something broadly needed by most users, I’m hesitant to incorporate it into the general example problem. I appreciate you pointing it out, though. |
|
Hi @JWock82, sorry for not explaining correctly. The example does not work as is, unless pasted directly into a library file and ran from there. |
Pass
plastic_beamin via a default argument to avoid aNameErrorwhen called in another module during analysis.Lambda functions only have access to the scope of the environment they are called in. Any additional variables from where they are defined must be explicitly passed in.
Resolves #325