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

Make the internal grid and empties_built in Grid class private #1568

Merged
merged 2 commits into from
Dec 28, 2022

Conversation

Tortar
Copy link
Contributor

@Tortar Tortar commented Dec 24, 2022

The internal grid in the Grid class should be made private as was done in #815, the internal mechanic of the class should not be used by the user (if he doesn't really want to do so) and we should be free to change it as we want if needed.

Something should be changed in the tests folder also, but I'd like to finish the PR when it gets some approval :-)

@Tortar Tortar marked this pull request as draft December 24, 2022 14:53
@rht
Copy link
Contributor

rht commented Dec 25, 2022

Yeah, I agree with this proposal.

And in general, it is indeed more effective if you sketch a draft PR and wait for agreement, so that your effort is not wasted.

@Tortar
Copy link
Contributor Author

Tortar commented Dec 26, 2022

will do that more often!

@codecov
Copy link

codecov bot commented Dec 26, 2022

Codecov Report

Base: 82.13% // Head: 82.13% // No change to project coverage 👍

Coverage data is based on head (ff048e2) compared to base (b36fce7).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1568   +/-   ##
=======================================
  Coverage   82.13%   82.13%           
=======================================
  Files          18       18           
  Lines        1388     1388           
  Branches      272      272           
=======================================
  Hits         1140     1140           
  Misses        204      204           
  Partials       44       44           
Impacted Files Coverage Δ
mesa/space.py 91.39% <83.33%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Tortar Tortar marked this pull request as ready for review December 26, 2022 23:59
@Tortar Tortar changed the title Make the internal grid in Grid class private Make the internal grid and empties_built in Grid class private Dec 26, 2022
@Tortar
Copy link
Contributor Author

Tortar commented Dec 27, 2022

Everything should be done now, I realized that also empties_built shouldn't be public because it's an internal optimization, so I put all together in this PR, hope this is welcomed!

@rht
Copy link
Contributor

rht commented Dec 28, 2022

Grid.grid has been a public attribute, but it has never been endorsed in the docs, so I think it's fine to make it private without having to wait to do the change in Mesa 2.0.

@rht rht merged commit 486ceca into projectmesa:main Dec 28, 2022
@jackiekazil jackiekazil added this to the v1.2.0 Taylor milestone Feb 27, 2023
@jackiekazil jackiekazil mentioned this pull request Mar 7, 2023
4 tasks
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