Skip to content

Minimum Distance Operator - #482

Merged
dfremont merged 6 commits into
mainfrom
MinimumDistanceOperator
Aug 18, 2026
Merged

Minimum Distance Operator#482
dfremont merged 6 commits into
mainfrom
MinimumDistanceOperator

Conversation

@Eric-Vin

Copy link
Copy Markdown
Collaborator

Description

Adds an operator to compute the minimum distance between two objects, accounting for shape, size, etc... To vote on the name of this operator, please use this poll.

Issue Link

N/A

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)

Additional Notes

Please do not merge until poll results are finalized and I have updated the code to reflect them.

@Eric-Vin
Eric-Vin marked this pull request as draft June 25, 2026 23:13
@Eric-Vin
Eric-Vin requested a review from dfremont June 25, 2026 23:15
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.86%. Comparing base (8257147) to head (254ac6e).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/scenic/core/object_types.py 85.71% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
- Coverage   89.87%   89.86%   -0.01%     
==========================================
  Files          48       48              
  Lines       13346    13374      +28     
==========================================
+ Hits        11995    12019      +24     
- Misses       1351     1355       +4     
Files with missing lines Coverage Δ
src/scenic/core/regions.py 88.13% <100.00%> (-0.02%) ⬇️
src/scenic/syntax/ast.py 97.22% <100.00%> (+0.02%) ⬆️
src/scenic/syntax/compiler.py 98.27% <100.00%> (+<0.01%) ⬆️
src/scenic/syntax/veneer.py 89.78% <100.00%> (-0.05%) ⬇️
src/scenic/core/object_types.py 93.08% <85.71%> (-0.07%) ⬇️

... and 3 files with indirect coverage changes

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

@Eric-Vin Eric-Vin changed the title Minimum Distance Operator (Final Name Pending) Minimum Distance Operator Jul 8, 2026
@Eric-Vin
Eric-Vin marked this pull request as ready for review July 8, 2026 22:37
Comment thread docs/reference/operators.rst Outdated
Comment thread src/scenic/core/object_types.py Outdated

@dfremont dfremont left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good (just one comment), but please add a .. note to the Operator Reference section for distance from explaining that when passed objects it just computes the distance between their positions (i.e. their centers), and that if you want to find the separation between two objects taking into account their shape and size you should use minimum distance from.

Also the minimum distance from entry needs a .. version-added directive. You could put version 3.2 for now I guess, or maybe something like "unreleased".

@dfremont dfremont left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, thanks Eric!

@dfremont
dfremont merged commit 6709fcd into main Aug 18, 2026
23 of 37 checks passed
@dfremont
dfremont deleted the MinimumDistanceOperator branch August 18, 2026 18:03
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.

2 participants