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

test app init of examples #2491

Merged
merged 6 commits into from
Nov 11, 2024
Merged

test app init of examples #2491

merged 6 commits into from
Nov 11, 2024

Conversation

Corvince
Copy link
Contributor

First stab at testing the exmamples app.

This already tests if there are any errors in app.py itself and if solara starts without any exceptions by calling app.page. We still don't know if anything is displayed and if the buttons etc. do anything, but initial errors are caught.

@Corvince
Copy link
Contributor Author

@quaquel this seems to already catch an error in WolfSheep related to the ABMSimulator?

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔴 +6.1% [+3.7%, +8.5%] 🔵 -0.4% [-0.6%, -0.1%]
BoltzmannWealth large 🔵 +0.3% [-0.7%, +1.2%] 🔵 +0.2% [-1.4%, +1.5%]
Schelling small 🔵 +1.1% [+0.7%, +1.4%] 🔵 +0.3% [+0.1%, +0.5%]
Schelling large 🔵 -0.1% [-0.6%, +0.4%] 🔵 +3.2% [+1.8%, +4.8%]
WolfSheep small 🔵 +0.5% [+0.1%, +0.9%] 🔵 -2.1% [-2.3%, -1.8%]
WolfSheep large 🔵 -0.8% [-1.5%, -0.2%] 🟢 -6.5% [-9.0%, -4.1%]
BoidFlockers small 🔵 -0.8% [-1.3%, -0.3%] 🔵 +0.0% [-0.8%, +0.8%]
BoidFlockers large 🔵 +0.5% [-0.0%, +1.1%] 🔵 -0.3% [-0.9%, +0.5%]

@EwoutH
Copy link
Member

EwoutH commented Nov 11, 2024

I did so way more complex things to try to accomplish this.

Thanks, we really need it.

@quaquel
Copy link
Member

quaquel commented Nov 11, 2024

@quaquel this seems to already catch an error in WolfSheep related to the ABMSimulator?

in app.py, change the line to model = WolfSheep(simulator=simulator, grass=True). I don't understand how this has slipped through. My hunch is the split of #2470 into two separate PRs and the resulting rebase mess. I thought I tested everything afterwards, but I most somehow have overlooked this.

@quaquel
Copy link
Member

quaquel commented Nov 11, 2024

There is another subtle bug still there. I have a meeting now. I'll fix those afterwards.

basically, reset will error with simulator.

fixed

@Corvince
Copy link
Contributor Author

I did so way more complex things to try to accomplish this.

Same! Luckily, this is a simple solution

in app.py, change the line to model = WolfSheep(simulator=simulator, grass=True)

I thought I am crazy, because I wanted to do it on GitHub directly and it was already updated. But it was just you being faster. Thanks!

@Corvince Corvince merged commit 0b9cc1c into main Nov 11, 2024
10 of 11 checks passed
@EwoutH EwoutH added the testing Release notes label label Nov 11, 2024
EwoutH pushed a commit that referenced this pull request Nov 11, 2024
test app init of examples

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jan Kwakkel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants