model: Implement initialize_data_collector#1287
Conversation
Codecov Report
@@ Coverage Diff @@
## main projectmesa/mesa#1287 +/- ##
==========================================
+ Coverage 89.05% 89.12% +0.06%
==========================================
Files 19 19
Lines 1243 1251 +8
Branches 244 246 +2
==========================================
+ Hits 1107 1115 +8
Misses 101 101
Partials 35 35
Continue to review full report at Codecov.
|
tpike3
left a comment
There was a problem hiding this comment.
To make sure I am getting the dev process for this down:
- we merge
- test is out (for example add to some of the example models)
- add to tests and documentation
This seems to be a break from our current approach where we would not merge into core until that is done
|
By trying this PR, I did not mean for it to be merged. I meant for the PR to be installed as is. |
|
Should we add [WIP] in this case then?
On Thu, Apr 21, 2022 at 6:13 AM rht ***@***.***> wrote:
By trying this PR, I did not mean for it to be merged. I meant for the PR
to be installed as is.
—
Reply to this email directly, view it on GitHub
<#1287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABIWTQAL6BDWG4LRQCB3KLVGES4NANCNFSM5T6FSEHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Jacqueline Kazil | @jackiekazil
|
This will prevent a user gotcha where they forget to call self.datacollector.collect(self) during the model init.
|
@tpike3 this PR is ready. |
tpike3
left a comment
There was a problem hiding this comment.
LGTM -- I will also update the tutorial with the namespace updates
|
This methods is not consequently used, and it now interferes with the removal of the schedulers, so I'm proposing to remove it. We can just include it somewhere in the conventions, and maybe add a warning in the batch_run function itself. And maybe the new batch runner will take a datacollector object or whatever that becomes inexplicitly. |
Fixes #1221, mesa/mesa-viz-tornado#25.
This will prevent a user gotcha where they forget to call
self.datacollector.collect(self) during the model init.
Additionally, this auto-assign the data collector to
self.datacollector.Though, an extra document is needed to tell users that the attribute name is
datacollector.Tests not yet written, because this PR is made so that this feature can be tried.