Skip to content

Fix Pushover Analysis Example - #326

Closed
jonbiemond wants to merge 1 commit into
JWock82:mainfrom
jonbiemond:325-fix-pushover-analysis-example
Closed

Fix Pushover Analysis Example#326
jonbiemond wants to merge 1 commit into
JWock82:mainfrom
jonbiemond:325-fix-pushover-analysis-example

Conversation

@jonbiemond

Copy link
Copy Markdown
Contributor

Pass plastic_beam in via a default argument to avoid a NameError when 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

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.65%. Comparing base (8d634fe) to head (de1696f).
⚠️ Report is 2 commits behind head on main.

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     
Flag Coverage Δ
unittests 71.65% <ø> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonbiemond
jonbiemond force-pushed the 325-fix-pushover-analysis-example branch from de1696f to e4394ed Compare June 7, 2026 04:10
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
@jonbiemond
jonbiemond force-pushed the 325-fix-pushover-analysis-example branch from e4394ed to 135c347 Compare June 7, 2026 14:44
@JWock82

JWock82 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

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 frame=frame argument introduces an extra concept that may create more confusion than clarity.

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.

@JWock82 JWock82 closed this Jun 15, 2026
@jonbiemond

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pushover Analysis Example Fails

2 participants