Skip to content

examples: correcting comment in examples/pd_grid/pd_grid/agent.py#1247

Merged
rht merged 1 commit intomesa:mainfrom
UniK-INES:main
Apr 5, 2022
Merged

examples: correcting comment in examples/pd_grid/pd_grid/agent.py#1247
rht merged 1 commit intomesa:mainfrom
UniK-INES:main

Conversation

@Holzhauer
Copy link
Copy Markdown
Contributor

The agent gets the move of the best neighbor (not of all neighbors) and adopts it, but only if the other agent performed better than oneself.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2022

Codecov Report

Merging #1247 (5c10504) into main (c6f0dc2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1247   +/-   ##
=======================================
  Coverage   89.08%   89.08%           
=======================================
  Files          19       19           
  Lines        1310     1310           
  Branches      265      265           
=======================================
  Hits         1167     1167           
  Misses        104      104           
  Partials       39       39           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6f0dc2...5c10504. Read the comment docs.

@rht
Copy link
Copy Markdown
Contributor

rht commented Apr 4, 2022

The PR content looks good to me, but the commit message needs to be changed to be in imperative mood.
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.

To save time: you can edit the commit message with git commit --amend, and then git push -f when pushing to your remote, because editing a commit message means you are rewriting history, and so, it needs a force push.

@rht
Copy link
Copy Markdown
Contributor

rht commented Apr 4, 2022

There is a tool that can be used to check the commit message: https://jorisroovers.com/gitlint/.

@Holzhauer
Copy link
Copy Markdown
Contributor Author

Thanks @rht! However, gitlint didn't complain about the original commit message. Some specific configuration required?

@rht
Copy link
Copy Markdown
Contributor

rht commented Apr 5, 2022

It should be PDAgent.step instead of PDAgent.step.

Hmm, yeah, forgot to say that the gitlint invocation needs some extra config.
E.g. gitlint --contrib contrib-title-conventional-commits but we don't follow Conventional Commits on Mesa -- this is just an example

I will add a gitlint CI hook later.

@rht rht merged commit 6883295 into mesa:main Apr 5, 2022
@rht
Copy link
Copy Markdown
Contributor

rht commented Apr 5, 2022

Merged, thank you!

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