Skip to content

Fix iter_agent_groups for fastest scheduler#1211

Open
Jonas-a-Zimmermann wants to merge 6 commits into
JuliaDynamics:mainfrom
Jonas-a-Zimmermann:fix_iter
Open

Fix iter_agent_groups for fastest scheduler#1211
Jonas-a-Zimmermann wants to merge 6 commits into
JuliaDynamics:mainfrom
Jonas-a-Zimmermann:fix_iter

Conversation

@Jonas-a-Zimmermann

Copy link
Copy Markdown

tackles #1210 by moving Base.map to Iterators.map and Ntuples.

Includes tests with schedulers fastest, Randomly(), ByID(), Partially(1), ByProperty(:weight), but any scheduler returning either a Vector or a KeySet should be fine.

Test Summary:   | Pass  Total     Time
Agents.jl Tests | 2514   2514  2m36.3s
     Testing Agents tests passed 

Comment thread test/runtests.jl
Comment on lines 78 to 118
@@ -114,7 +114,7 @@ function flocking_model(
)
space2d = ContinuousSpace(extent; spacing)
model = ModelType(
Bird, space2d, agent_step! = flocking_model_agent_step!,
Bird, space2d, (agent_step!) = flocking_model_agent_step!,
scheduler = Schedulers.Randomly(), rng = StableRNG(10),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm a bit confused about the usage of parenthesis here?

@Jonas-a-Zimmermann Jonas-a-Zimmermann Jun 8, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I believe these were added in a runic pass
could also have been my local formatter, but I ran runic over it afterwards
either way i did not add them manually

Comment thread test/iterable_tests.jl Outdated
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.04%. Comparing base (8b5b456) to head (316974b).
⚠️ Report is 215 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1211       +/-   ##
===========================================
+ Coverage   70.12%   85.04%   +14.92%     
===========================================
  Files          42       42               
  Lines        2718     2936      +218     
===========================================
+ Hits         1906     2497      +591     
+ Misses        812      439      -373     

☔ 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.

Co-authored-by: George Datseris <datseris.george@gmail.com>
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.

3 participants