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 examples for Mesa 2.2.0 API change #83

Merged
merged 7 commits into from
Jan 12, 2024
Merged

Conversation

rht
Copy link
Contributor

@rht rht commented Jan 11, 2024

Update examples to always initialize all Mesa models with super().__init__().

class MyModel(mesa.Model):
    def __init__(self):
        super().__init__()  # This is now required!

This is needed to correctly add Agents to the model and setup other Mesa model variables.

@rht
Copy link
Contributor Author

rht commented Jan 11, 2024

Ready for review. This PR fixes all the issues except for the weakref stuff, which needs to happen in projectmesa/mesa itself.

Copy link
Member

@tpike3 tpike3 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 doing this @rht!

@tpike3 tpike3 merged commit 3363765 into projectmesa:main Jan 12, 2024
1 of 2 checks passed
@rht rht deleted the fix_2.2.0 branch January 12, 2024 10:29
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