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

JupyterViz: Automatically deduce display name from model class #1975

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

rht
Copy link
Contributor

@rht rht commented Jan 18, 2024

From

page = JupyterViz(
    Schelling,
    model_params,
    measures=["happy", make_text(get_happy_agents)],
    name="Schelling",
    agent_portrayal=agent_portrayal,
)

to

page = JupyterViz(
    Schelling,
    model_params,
    measures=["happy", make_text(get_happy_agents)],
    agent_portrayal=agent_portrayal,
)

@Corvince
Copy link
Contributor

Test is failing because its using an instance instead of a class. So I think the test needs to be adapted

@EwoutH
Copy link
Member

EwoutH commented Jan 18, 2024

Like the idea!

@rht
Copy link
Contributor Author

rht commented Jan 18, 2024

Fixed the test failure.

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (877d552) 79.27% compared to head (3c491fc) 79.07%.

Files Patch % Lines
mesa/experimental/jupyter_viz.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1975      +/-   ##
==========================================
- Coverage   79.27%   79.07%   -0.20%     
==========================================
  Files          16       16              
  Lines        1298     1300       +2     
  Branches      291      269      -22     
==========================================
- Hits         1029     1028       -1     
- Misses        230      233       +3     
  Partials       39       39              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Corvince
Copy link
Contributor

Thanks!

@Corvince Corvince merged commit 29ff9fc into projectmesa:main Jan 18, 2024
11 of 13 checks passed
@rht rht deleted the jupyterviz branch January 18, 2024 20:51
@rht rht added enhancement Release notes label visualisation labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Release notes label visualisation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants