Skip to content

Adding DotBot examples#208

Merged
aabadie merged 21 commits intoDotBots:mainfrom
genkimiyauchi:develop-examples
Feb 25, 2026
Merged

Adding DotBot examples#208
aabadie merged 21 commits intoDotBots:mainfrom
genkimiyauchi:develop-examples

Conversation

@genkimiyauchi
Copy link
Contributor

Adding two examples for the PyDotBot.

1. Minimum naming game (with and without motion): From a list of potential words, a swarm of DotBots runs a distributed algorithm to agree on a single word using local communication.
2. Work and charge: A swarm of DotBots alternate moving between a work region to perform work and a charge region to recharge.

Copy link
Contributor

@geonnave geonnave left a comment

Choose a reason for hiding this comment

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

Thanks for this PR!

Could you add a very basic README to each new example folder explaining:

  1. what it does
  2. how to run it (and specific dependencies to install, if applicable)

@genkimiyauchi
Copy link
Contributor Author

I've added a README for the two examples and removed optional dependencies from pyproject.toml. The dependencies are now mentioned in each of the example's README

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

I only have comestic comments. I'll try to test your PR later today.

@aabadie
Copy link
Contributor

aabadie commented Feb 24, 2026

Also the CI is complaining because of code formatting issues. Install and run black to solve the problems.
There's another issues with pytest that cannot run because of missing dependencies in the CI environment. Maybe add scipy and yaml dependencies to tests_requirements.txt (https://github.com/DotBots/PyDotBot/blob/main/tests_requirements.txt)

@aabadie
Copy link
Contributor

aabadie commented Feb 24, 2026

Some of my comments above are still not addressed (the ones about the missing newline at end of file)

@genkimiyauchi
Copy link
Contributor Author

Sorry for the missed lines. I've fixed the lines at the end for the remaining files

@aabadie
Copy link
Contributor

aabadie commented Feb 25, 2026

FYI I allowed myself to apply some changes to fix the lint issues and missing dependencies reported by the CI. The tests are now launched correctly but an unrelated one is still failing. I'm investigating. Once the CI is green I'll merge this PR.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 21.70640% with 624 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.84%. Comparing base (9a7358b) to head (7883c03).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
dotbot/examples/sct.py 12.93% 175 Missing ⚠️
dotbot/examples/work_and_charge/work_and_charge.py 21.98% 110 Missing ⚠️
...ples/minimum_naming_game/controller_with_motion.py 20.00% 68 Missing ⚠️
dotbot/examples/minimum_naming_game/controller.py 20.00% 56 Missing ⚠️
dotbot/examples/work_and_charge/controller.py 27.77% 52 Missing ⚠️
...mum_naming_game/minimum_naming_game_with_motion.py 29.57% 50 Missing ⚠️
...xamples/minimum_naming_game/minimum_naming_game.py 31.03% 40 Missing ⚠️
dotbot/examples/minimum_naming_game/walk_avoid.py 7.89% 35 Missing ⚠️
...tbot/examples/minimum_naming_game/gen_init_pose.py 32.35% 23 Missing ⚠️
dotbot/examples/work_and_charge/gen_init_pose.py 41.66% 14 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #208       +/-   ##
===========================================
- Coverage   81.99%   68.84%   -13.15%     
===========================================
  Files          30       40       +10     
  Lines        2943     3739      +796     
===========================================
+ Hits         2413     2574      +161     
- Misses        530     1165      +635     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aabadie aabadie force-pushed the develop-examples branch 2 times, most recently from 7b985c5 to 2618d69 Compare February 25, 2026 15:19
@aabadie aabadie merged commit 53fc129 into DotBots:main Feb 25, 2026
10 of 12 checks passed
@aabadie
Copy link
Contributor

aabadie commented Feb 25, 2026

I finally found the issue which is indeed not related but I fixed it here. So let's go!

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