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

#2191 issue moved https://github.com/projectmesa/mesa/tree/main/mesa/experimental/devs/examples to mesa-examples reository #152

Closed
wants to merge 129 commits into from

Conversation

jayash1973
Copy link

@jayash1973 jayash1973 commented Aug 10, 2024

hey i am new to open source contribution if by some mistake i have made some mistakes please mention them to me so that i can improve them and i solved this issue as instructed

  1. moved the https://github.com/projectmesa/mesa/tree/main/mesa/experimental/devs/examples to mesa-examples

Todo (for each model):

Copy link
Member

@EwoutH EwoutH 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 the PR! It's a good start.

The next step would be to write some documentation about it, like all the other branches currently have.

I'm curious if the automated tests now properly pick up these models. I've updated pytest to show, do you know how to update/rebase a PR on the target branch? If not I can also do it.

updated the Epstein Civil Violence Model and Wolf-Sheep Predation Model documentation for the files moved from https://github.com/projectmesa/mesa/tree/main/mesa/experimental/devs/examples to mesa-examples repository
@jayash1973
Copy link
Author

Thanks for the PR! It's a good start.

The next step would be to write some documentation about it, like all the other branches currently have.

I'm curious if the automated tests now properly pick up these models. I've updated pytest to show, do you know how to update/rebase a PR on the target branch? If not I can also do it.

can you update/rebase a PR on the target branch as i dont have much idea on how to do it and might create some issues

@EwoutH
Copy link
Member

EwoutH commented Aug 11, 2024

Thanks! After taking a closer look, I would like the models to be added in new, separate folders, just like we did with boltzmann_wealth_model_experimental. Preferably, they have at least an agent.py, model.py and app.py file, and a Readme.

Another thing is that visualisation should ideally be added. This should be in the app.py file. See #154 for more details, and resources on how to do it.

The Readme can for the most part be copied from the original models, but the new (experimental) features used should be described in it.

Edit: I added a checklist for you in the first PR message, I hope it's useful!

@AryanTheng
Copy link

hello I am student i wanted to do open source contribution but i am not understanding anything properly can anyone help me little bit.....I am open to learn and contribute.

@EwoutH
Copy link
Member

EwoutH commented Aug 11, 2024

If you’re seriously interested in Agent-based modeling and in contributing to Mesa:

If you’ve done all that, you will be a lot better prepared to make contributions.

@jayash1973
Copy link
Author

i fixed the documentation added experimental feature ABMSimulator

epstien_civil_violence_experimental
epstienabms

wolf_sheep_experimental
wolfsheepabms

can it be merged now?

@jayash1973
Copy link
Author

why is it still showing

pre-commit.ci - pr — checks completed with failures

?

@EwoutH
Copy link
Member

EwoutH commented Aug 13, 2024

I will get back to you in detail as soon as I can, but reviewing this took a bit more time than I anticipated.

One quick idea I can share: The app.py visualisation you wrote is the most novel part. Maybe we can start with a smaller PR where you add that visualisation to an existing model. That would be a great help for #154.

@jayash1973
Copy link
Author

I will get back to you in detail as soon as I can, but reviewing this took a bit more time than I anticipated.

One quick idea I can share: The app.py visualisation you wrote is the most novel part. Maybe we can start with a smaller PR where you add that visualisation to an existing model. That would be a great help for #154.

should i update all the examples with experimental feature and solara vizualization

@EwoutH
Copy link
Member

EwoutH commented Aug 14, 2024

If you want to, yes. But please start with a single one, then we go one at the time.

I would start with either wolf_sheep or epstien_civil_violence, since you already wrote those.

@EwoutH
Copy link
Member

EwoutH commented Aug 14, 2024

Sorry, but I can't accept this PR. The goal was to simply move two examples from one repo to another, and do minimal fixes if needed. I feel that examples have now changes so much we have no idea more what came from where.

So unfortunately, I would propose closing this PR. That doesn't mean it all was for nothing:

  • First of all, I can imagine you learned a lot. Don't underestimate the importance of that.
  • Second, the visualisation part can be used in other models. I would really welcome (small) PRs to add the new visualisation to the models.
  • Third, maybe you were inspired to make some improvements to other models.
  • Fourth, if you want, you may give this another shot, in a new PR. But keep it clean.

I would really recommend you to works towards atomic commits. Here's an excellent article about it:

Thinking in atomic commits might help you organizing and structuring such a project way better.

@jayash1973
Copy link
Author

hey i updated the bank_reserves example to use latest solara visualization and experimental ABMSimulator feature these are the results of it.

bank

and this is the csv file generated after running batch_run.py
BankReservesModel_Data.csv

i dont think this pr will be merged now but can you tell me if there is anything else i can help with

@EwoutH
Copy link
Member

EwoutH commented Aug 14, 2024

Thanks, it looks great!

I'm going to close this PR, to make it clear that this huge monolithic PR is not going forward.

Like I said, I would welcome small, atomic PRs that:

  • Add visualisation to one model at the time
  • Add a single DEVS example, clearly structured, with a good readme.

The Readme's and visualisation from this PR is quite good, so I would use those as starting points if I were 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.

4 participants