mesa
mesa copied to clipboard
Adding Pyplot visualization
This visualization allows the developer to add any pyplot visualization. removes all dependencies on the js components
This looks awsome! Could you add a few example screenshots?
Updated the code, Added Documentation
Codecov Report
Merging #1139 (c9e2694) into main (4a79705) will increase coverage by
0.18%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #1139 +/- ##
==========================================
+ Coverage 89.30% 89.48% +0.18%
==========================================
Files 19 20 +1
Lines 1253 1294 +41
Branches 256 255 -1
==========================================
+ Hits 1119 1158 +39
- Misses 98 100 +2
Partials 36 36
Impacted Files | Coverage Δ | |
---|---|---|
mesa/visualization/modules/PyPlotVisualization.py | 100.00% <100.00%> (ø) |
|
mesa/visualization/modules/__init__.py | 100.00% <100.00%> (ø) |
|
mesa/space.py | 94.91% <0.00%> (-1.00%) |
:arrow_down: |
mesa/batchrunner.py | 92.28% <0.00%> (+0.72%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4a79705...c9e2694. Read the comment docs.
Fixed
The CI fails because matplotlib
is not installed.
TODO:
- inside PyPlotVisualization.py, do a
try import matplotlib
. If this fail raises an error and say that the optional dependencymatplotlib
is missing - in setup.py, in extras_require, in dev, add
matplotlib
.
If the 3 TODOs are addressed, then this LGTM.
The CI fails because
matplotlib
is not installed. TODO:
- inside PyPlotVisualization.py, do a
try import matplotlib
. If this fail raises an error and say that the optional dependencymatplotlib
is missing- in setup.py, in extras_require, in dev, add
matplotlib
.
Not yet addressed.
Resolved issues
inside PyPlotVisualization.py, do a try import matplotlib. If this fail raises an error and say that the optional dependency matplotlib is missing
Not yet addressed.
Also the new const comments not yet addressed.
Anything pending??
- There is one issue with the
import matplotlib
still not yet resolved - You need to squash your commits into 1 commit
Here is an example UX in Pandas. I was trying to use the string[pyarrow]
feature, which depends on an optional dependency of PyArrow. I got this error message:
ImportError: pyarrow>=1.0.0 is required for PyArrow backed StringArray.
We could use this concise error message instead of the long one I suggested.
@vineetvermait are you still availabe for the remaining small points? If not would you mind me finishing the PR for you so we can get this merged?
It has been 2 days. @Corvince you should just go for it.
Bump.
Thanks for the bump, I totally forgot about this!
Closing, because I think the next-gent frontend for Mesa should be based on Streamlit/Panel/ipywidgets. This would result in simpler code (plus for maintainability), and that it is easier to be customized by the user. Followup discussion on https://github.com/projectmesa/mesa/discussions/1622.