Skip to content

Conversation

@jackiekazil
Copy link
Member

No description provided.

@jackiekazil jackiekazil changed the title Move examples from mesa repo to mesa-examples repo. [WIP] Move examples from mesa repo to mesa-examples repo. Dec 5, 2022
@jackiekazil jackiekazil marked this pull request as ready for review December 5, 2022 04:00
@jackiekazil jackiekazil requested a review from rht December 5, 2022 04:12
@@ -0,0 +1,86 @@
Contributing
Copy link
Member Author

Choose a reason for hiding this comment

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

This file was thrown together and probably needs future iterations.

- `Clone your repository`_ from Github to your machine.
- Create a new branch in your fork: ``git checkout -b BRANCH_NAME``
- Run ``git config pull.rebase true``. This prevents messy merge commits when updating your branch on top of Mesa main branch.
- If you are using the existing Mesa version that a model might be pinned to, then you will want to run ``pip install -r requirements.txt`` from inside the example folder you are working with. If you are making changes using the main repo or other version, do not install the version in the requirements file & make sure to update if the example is pinned.
Copy link
Member Author

Choose a reason for hiding this comment

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

This line specifically could use some finessing. People with less Python experience are more likely to contribute a model than core code. But here is a situation where they need to pay attention to the versions of things. That is what I was trying to describe. Maybe we pass this thru for now, but reapproach when we do a rewrite of this as I suggest here: mesa/mesa#963 (comment)

@@ -0,0 +1,2 @@
networkx>=2.0
mesa No newline at end of file
Copy link
Member Author

Choose a reason for hiding this comment

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

@rht this line is specifically added in the move -- because this model was failing.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was about to say that this should have been pinned to mesa==1.x, because people might be cloning this repo and forget to update the repo when it has been changed to be compatible with 2.0 instead of 1.x. But the diff in this PR is huge, and any small iterations on top of it will slow down the process. And so, I'm merging now.

@jackiekazil
Copy link
Member Author

@rht when you go through this - can you make sure that recent PR changes made it in. I believe I captured them, but would like a second set of eyes on this explicitly, because I did have a hiccup in the process.

## Summary

A simple model of agents exchanging wealth. All agents start with the same amount of money. Every step, each agent with one unit of money or more gives one unit of wealth to another random agent. This is the model described in the [Intro Tutorial](http://mesa.readthedocs.io/en/latest/intro-tutorial.html).
A simple model of agents exchanging wealth. All agents start with the same amount of money. Every step, each agent with one unit of money or more gives one unit of wealth to another random agent. This is the model described in the [Intro Tutorial](https://mesa.readthedocs.io/en/latest/tutorials/intro_tutorial.html).
Copy link
Contributor

Choose a reason for hiding this comment

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

Confirmed that this is the change done in mesa/mesa@238c2c0.

@rht rht merged commit 37e0a9d into main Dec 5, 2022
@rht rht deleted the jk/mv-examples branch December 5, 2022 07: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.

3 participants