Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix requirements inside loops and functions #316

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Conversation

dfremont
Copy link
Collaborator

Description

This PR makes require statements work as expected inside loops and functions (currently they can trigger an assertion failure or evaluate improperly).

Issue Link

Fixes #313.

Checklist

  • I have tested the changes locally via pytest and/or other means
  • I have added or updated relevant documentation
  • I have autoformatted the code with black and isort
  • I have added test cases (if applicable)

@dfremont dfremont requested a review from Eric-Vin November 25, 2024 04:29
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.43%. Comparing base (4ae8ee2) to head (ceda6c5).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #316      +/-   ##
==========================================
+ Coverage   91.38%   91.43%   +0.04%     
==========================================
  Files          54       54              
  Lines       13555    13575      +20     
==========================================
+ Hits        12387    12412      +25     
+ Misses       1168     1163       -5     
Files with missing lines Coverage Δ
src/scenic/core/dynamics/scenarios.py 94.33% <100.00%> (-0.02%) ⬇️
src/scenic/core/regions.py 87.30% <ø> (-0.36%) ⬇️
src/scenic/core/requirements.py 95.91% <100.00%> (+0.68%) ⬆️
src/scenic/syntax/compiler.py 98.47% <ø> (ø)

... and 4 files with indirect coverage changes

Copy link
Collaborator

@Eric-Vin Eric-Vin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@dfremont dfremont merged commit fe28e13 into main Nov 26, 2024
26 checks passed
@dfremont dfremont deleted the fix_requirements branch November 26, 2024 19:13
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.

assert not externals.nonlocals error
2 participants